[GH-ISSUE #211] Traceback on DNS server Timeout #191

Closed
opened 2026-02-26 09:36:26 +03:00 by kerem · 2 comments
Owner

Originally created by @ThomasWaldmann on GitHub (Jul 3, 2015).
Original GitHub issue: https://github.com/nsupdate-info/nsupdate.info/issues/211

When a DNS server is offline these Tracebacks are triggered frequently:

Internal Server Error: /nic/update_authorized
Traceback (most recent call last):
  File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/django/views/generic/base.py", line 69, in view
    return self.dispatch(request, *args, **kwargs)
  File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/django/utils/decorators.py", line 29, in _wrapper
    return bound_func(*args, **kwargs)
  File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 22, in _wrapped_view
    return view_func(request, *args, **kwargs)
  File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/django/utils/decorators.py", line 25, in bound_func
    return func.__get__(self, type(self))(*args2, **kwargs2)
  File "/srv/nsupdate.info/repo/nsupdate/api/views.py", line 262, in dispatch
    return super(AuthorizedNicUpdateView, self).dispatch(*args, **kwargs)
  File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/django/views/generic/base.py", line 87, in dispatch
    return handler(request, *args, **kwargs)
  File "/srv/nsupdate.info/repo/nsupdate/utils/log.py", line 124, in caller
    return func(*args, **kwargs)
  File "/srv/nsupdate.info/repo/nsupdate/api/views.py", line 292, in get
    return _update_or_delete(host, ipaddr, secure, logger=logger, _delete=delete)
  File "/srv/nsupdate.info/repo/nsupdate/api/views.py", line 361, in _update_or_delete
    update(fqdn, ipaddr)
  File "/srv/nsupdate.info/repo/nsupdate/main/dnstools.py", line 193, in update
    update_ns(fqdn, rdtype, ipaddr, action='upd', ttl=ttl)
  File "/srv/nsupdate.info/repo/nsupdate/main/dnstools.py", line 321, in update_ns
    response = dns.query.tcp(upd, nameserver, timeout=UPDATE_TIMEOUT)
  File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/dns/query.py", line 316, in tcp
    _net_write(s, tcpmsg, expiration)
  File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/dns/query.py", line 259, in _net_write
    _wait_for_writable(sock, expiration)
  File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/dns/query.py", line 143, in _wait_for_writable
    _wait_for(s, False, True, True, expiration)
  File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/dns/query.py", line 117, in _wait_for
    raise dns.exception.Timeout
Timeout
Originally created by @ThomasWaldmann on GitHub (Jul 3, 2015). Original GitHub issue: https://github.com/nsupdate-info/nsupdate.info/issues/211 When a DNS server is offline these Tracebacks are triggered frequently: ``` Internal Server Error: /nic/update_authorized Traceback (most recent call last): File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/django/views/generic/base.py", line 69, in view return self.dispatch(request, *args, **kwargs) File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/django/utils/decorators.py", line 29, in _wrapper return bound_func(*args, **kwargs) File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 22, in _wrapped_view return view_func(request, *args, **kwargs) File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/django/utils/decorators.py", line 25, in bound_func return func.__get__(self, type(self))(*args2, **kwargs2) File "/srv/nsupdate.info/repo/nsupdate/api/views.py", line 262, in dispatch return super(AuthorizedNicUpdateView, self).dispatch(*args, **kwargs) File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/django/views/generic/base.py", line 87, in dispatch return handler(request, *args, **kwargs) File "/srv/nsupdate.info/repo/nsupdate/utils/log.py", line 124, in caller return func(*args, **kwargs) File "/srv/nsupdate.info/repo/nsupdate/api/views.py", line 292, in get return _update_or_delete(host, ipaddr, secure, logger=logger, _delete=delete) File "/srv/nsupdate.info/repo/nsupdate/api/views.py", line 361, in _update_or_delete update(fqdn, ipaddr) File "/srv/nsupdate.info/repo/nsupdate/main/dnstools.py", line 193, in update update_ns(fqdn, rdtype, ipaddr, action='upd', ttl=ttl) File "/srv/nsupdate.info/repo/nsupdate/main/dnstools.py", line 321, in update_ns response = dns.query.tcp(upd, nameserver, timeout=UPDATE_TIMEOUT) File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/dns/query.py", line 316, in tcp _net_write(s, tcpmsg, expiration) File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/dns/query.py", line 259, in _net_write _wait_for_writable(sock, expiration) File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/dns/query.py", line 143, in _wait_for_writable _wait_for(s, False, True, True, expiration) File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/dns/query.py", line 117, in _wait_for raise dns.exception.Timeout Timeout ```
kerem 2026-02-26 09:36:26 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@elnappo commented on GitHub (Jul 6, 2015):

maybe also set a flag to the domain?

<!-- gh-comment-id:118879426 --> @elnappo commented on GitHub (Jul 6, 2015): maybe also set a flag to the domain?
Author
Owner

@ThomasWaldmann commented on GitHub (Sep 22, 2015):

Internal Server Error: /nic/update
Traceback (most recent call last):
  File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/django/views/generic/base.py", line 69, in view
    return self.dispatch(request, *args, **kwargs)
  File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/django/views/generic/base.py", line 87, in dispatch
    return handler(request, *args, **kwargs)
  File "/srv/nsupdate.info/repo/nsupdate/utils/log.py", line 124, in caller
    return func(*args, **kwargs)
  File "/srv/nsupdate.info/repo/nsupdate/api/views.py", line 237, in get
    return _update_or_delete(host, ipaddr, secure, logger=logger, _delete=delete)
  File "/srv/nsupdate.info/repo/nsupdate/api/views.py", line 361, in _update_or_delete
    update(fqdn, ipaddr)
  File "/srv/nsupdate.info/repo/nsupdate/main/dnstools.py", line 193, in update
    update_ns(fqdn, rdtype, ipaddr, action='upd', ttl=ttl)
  File "/srv/nsupdate.info/repo/nsupdate/main/dnstools.py", line 321, in update_ns
    response = dns.query.tcp(upd, nameserver, timeout=UPDATE_TIMEOUT)
  File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/dns/query.py", line 317, in tcp
    ldata = _net_read(s, 2, expiration)
  File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/dns/query.py", line 243, in _net_read
    _wait_for_readable(sock, expiration)
  File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/dns/query.py", line 140, in _wait_for_readable
    _wait_for(s, True, False, True, expiration)
  File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/dns/query.py", line 117, in _wait_for
    raise dns.exception.Timeout
Timeout

Similar thing for automated updates. In this case, the primary DNS was unreachable, the secondary would have worked.

<!-- gh-comment-id:142297956 --> @ThomasWaldmann commented on GitHub (Sep 22, 2015): ``` Internal Server Error: /nic/update Traceback (most recent call last): File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/django/views/generic/base.py", line 69, in view return self.dispatch(request, *args, **kwargs) File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/django/views/generic/base.py", line 87, in dispatch return handler(request, *args, **kwargs) File "/srv/nsupdate.info/repo/nsupdate/utils/log.py", line 124, in caller return func(*args, **kwargs) File "/srv/nsupdate.info/repo/nsupdate/api/views.py", line 237, in get return _update_or_delete(host, ipaddr, secure, logger=logger, _delete=delete) File "/srv/nsupdate.info/repo/nsupdate/api/views.py", line 361, in _update_or_delete update(fqdn, ipaddr) File "/srv/nsupdate.info/repo/nsupdate/main/dnstools.py", line 193, in update update_ns(fqdn, rdtype, ipaddr, action='upd', ttl=ttl) File "/srv/nsupdate.info/repo/nsupdate/main/dnstools.py", line 321, in update_ns response = dns.query.tcp(upd, nameserver, timeout=UPDATE_TIMEOUT) File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/dns/query.py", line 317, in tcp ldata = _net_read(s, 2, expiration) File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/dns/query.py", line 243, in _net_read _wait_for_readable(sock, expiration) File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/dns/query.py", line 140, in _wait_for_readable _wait_for(s, True, False, True, expiration) File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/dns/query.py", line 117, in _wait_for raise dns.exception.Timeout Timeout ``` Similar thing for automated updates. In this case, the primary DNS was unreachable, the secondary would have worked.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nsupdate.info-nsupdate-info#191
No description provided.