Bug#892610: Address already in use /etc/init.d/pdns-recursor restart

2018-03-13 Thread René
Hi,

thanks for your reply.

I've switched to systemd, will let you know if the issue persist.

Rene



Bug#892610: Address already in use /etc/init.d/pdns-recursor restart

2018-03-12 Thread Chris Hofstaedtler
Hi,

* are...@buxtehude.debian.org  [180311 11:51]:
> When restarting pdns-recursor with the initscript, "/etc/init.d/pdns-recursor 
> restart", we sometimes get an Address already in use Exception:
> Mar 11 06:55:09 recurse01 pdns_recursor[30857]: Exception: Resolver binding 
> to server socket on port 53 for 0.0.0.0: Address already in use 
[..]
> Whenever we run "/etc/init.d/pdns-recursor stop", wait a few seconds and 
> "/etc/init.d/pdns-recursor start" again it always works. 
> So it seems like a timing issue, being sometimes too fast starting 
> pdns-recursor again before the socket is completely closed. 

I imagine pdns-recursor doesn't quit fast enough, and the init
script may not do enough checking.

> ii  sysvinit-core2.88dsf-59.9   amd64
> System-V-like init utilities

If you need a fix for this in stable, I'd suggest switching over to
systemd, which handles this situation just fine.

Cheers,
Chris



Bug#892610: Address already in use /etc/init.d/pdns-recursor restart

2018-03-11 Thread René
Package: pdns-recursor
Version: 4.0.4-1+deb9u3+b1

When restarting pdns-recursor with the initscript, "/etc/init.d/pdns-recursor 
restart", we sometimes get an Address already in use Exception:
Mar 11 06:55:09 recurse01 pdns_recursor[30857]: Exception: Resolver binding to 
server socket on port 53 for 0.0.0.0: Address already in use 

This is problematic whenever this is done automatically and it never comes up 
again. Effectivly resulting in no pdns-recursor running.
This does not happen always, for example when trying to reproduce it right now, 
it restarts correctly. 
It seems to happen while being in heavy use or running for a while longer.

Whenever we run "/etc/init.d/pdns-recursor stop", wait a few seconds and 
"/etc/init.d/pdns-recursor start" again it always works. 
So it seems like a timing issue, being sometimes too fast starting 
pdns-recursor again before the socket is completely closed. 

$ cat /etc/debian_version
9.4

$ uname -a
Linux recurse01 4.9.0-6-amd64 #1 SMP Debian 4.9.82-1+deb9u2 (2018-02-21) x86_64 
GNU/Linux

$ dpkg -l |grep sysvinit
ii  sysvinit-core2.88dsf-59.9   amd64
System-V-like init utilities
ii  sysvinit-utils   2.88dsf-59.9   amd64
System-V-like utilities

$ dpkg -l |grep systemd
ii  libpam-systemd:amd64 232-25+deb9u2  amd64
system and service manager - PAM module
ii  libsystemd0:amd64232-25+deb9u2  amd64
systemd utility library
ii  python-systemd   233-1  amd64
Python 2 bindings for systemd
ii  systemd  232-25+deb9u2  amd64
system and service manager
ii  systemd-shim 10-3   amd64
shim for systemd