[Pdns-dev] [patch] recover from backend restart

Norbert Sendetzky norbert at linuxnetworks.de
Thu Dec 2 14:18:14 CET 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 30 November 2004 09:34, you wrote:
> On Tue, 2004-11-30 at 01:11 +0100, Norbert Sendetzky wrote:
> > > 2: If i restart my slapd powerdns doesnt seem to be able to connect to
> > > the ldap server until i restart powerdns. Do you know about this issue?
> >
> >  If the connection is dropped, an exception is thrown and the pdns
> > server should reinstiate the backend. Could you please increase the log
> > level and send me the relevant output after restarting the LDAP server?
>
> Nov 30 09:29:52 mezzanine pdns[73464]: [LdapBackend] Search failed:
> Error waiting for LDAP result: Can't contact LDAP server
> Nov 30 09:29:52 mezzanine pdns[73464]: Backend error: LDAP server
> unreachable
> Nov 30 09:29:52 mezzanine pdns[73464]: [LdapBackend] Ldap connection
> closed

It seems to be that the counting of the instantiated backends has changed 
somewhere in the past. By default there will be three backend instances 
querying the server, but if the server is restarted and the backends throw 
exceptions to get killed and reinstantiated, only one backend thread will 
recreated. This is because there are two more threads with backends available 
(one in the main program and one for AXFR requests) and they are counted as 
normal backend threads.

As a quick hack, I added +2 to the number of backends which must be alive, 
which should be true in most cases.

I also found another bug, which is more critical: After the backend for AXFR 
requests has lost the connection to the backend server, it won't recreate a 
new backend and all further AXFR requests will fail until pdns is restarted. 
The tcpreceiver patch fixes this. The first AXFR request after the losing the 
connection will fail but all subsequent requests will succeed.


Norbert

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAkGvFhYACgkQxMLs5v5/7eCW+ACguRytr8V9rECVNGVKyNFZuCcy
iIkAn2bH8FvUSEOLMZgTSfy2MXMhlGLV
=vhi0
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: distributor.hh.diff
Type: text/x-diff
Size: 289 bytes
Desc: not available
Url : http://mailman.powerdns.com/pipermail/pdns-dev/attachments/20041202/30df65e1/distributor.hh.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tcpreceiver.cc.diff
Type: text/x-diff
Size: 583 bytes
Desc: not available
Url : http://mailman.powerdns.com/pipermail/pdns-dev/attachments/20041202/30df65e1/tcpreceiver.cc.bin


More information about the Pdns-dev mailing list