David Keegel
2014-Jan-07 11:04 UTC
[Samba] samba_dnsupdate: could not talk to any default name server
Every 10 minutes, my samba 4.0.9 (active directory domain controller) is logging messages like these :- 2014-01-07T14:26:09.896260+11:00 gumbo samba[5198]: /usr/sbin/samba_dnsupdate: ; Communication with 127.0.1.1#53 failed: operation canceled 2014-01-07T14:26:09.896281+11:00 gumbo samba[5198]: /usr/sbin/samba_dnsupdate: could not talk to any default name server 2014-01-07T14:26:09.917096+11:00 gumbo samba[5198]: /usr/sbin/samba_dnsupdate: ; Communication with 127.0.1.1#53 failed: operation canceled 2014-01-07T14:26:09.917119+11:00 gumbo samba[5198]: /usr/sbin/samba_dnsupdate: could not talk to any default name server 2014-01-07T14:26:09.940917+11:00 gumbo samba[5198]: /usr/sbin/samba_dnsupdate: ; Communication with 127.0.1.1#53 failed: operation canceled 2014-01-07T14:26:09.940953+11:00 gumbo samba[5198]: /usr/sbin/samba_dnsupdate: could not talk to any default name server Why is samba_dnsupdate trying to connect to 127.0.1.1 in particular? I think that 127.0.1.1 IP address must have come from /etc/hosts :- $ hostname gumbo.$domain $ grep gumbo /etc/hosts 127.0.1.1 gumbo.$domain $ I don't have 127.0.1.1 in /etc/resolv.conf or /etc/samba/smb.conf. -- ___________________________________________________________________________ David Keegel <djk-samba at cyber.com.au> Cyber IT Solutions Pty. Ltd. http://www.cyber.com.au/~djk/ Linux & Unix Systems Administration
David Keegel
2014-Jan-09 06:06 UTC
[Samba] samba_dnsupdate: could not talk to any default name server
I worked out part of what was going on by looking in the samba source code. Samba runs its samba_dnsupdate script every 10 minutes. This samba_dnsupdate python script looks in the file /var/lib/samba/private/dns_update_list for a list of DNS entries which should exist (according to samba) and uses dynamic DNS update for each entry which does not exist. The dns_update_list file has variables like ${HOSTNAME} and $IP which are expanded dynamically (and if $IP contains multiple IP addresses then multiple DNS records should exist, for each IP). The standard samba dns_update_list file says there should be entries: ${HOSTNAME} A $IP and ${DNSDOMAIN} A $IP. I'm not sure whether the above is documented somewhere - I couldn't find it on http://wiki.samba.org/index.php/DNS nor with google. In this particular case, the samba server has two IP addresses, a new one (which we want everything to use) and an old one (which the old samba 3.x server had, and which we have configured on the new server for compatibility, but which we don't want things to use). So I have edited /var/lib/samba/private/dns_update_list on that server and commented out the entries: ${HOSTNAME} A $IP and ${DNSDOMAIN} A $IP. This stops samba from trying to add the backwards-compability (old server) IP address every 10 minutes, and logging an error when that fails. I haven't yet finished inspecting the source code to work out where samba_dnsupdate gets the IP address of the nameserver to which it wants to send the DNS update (which in this case is 127.0.1.1, presumably taken from /etc/hosts). I also haven't reviewed the code to see whether there is anything to remove IP addresses which were valid but are no longer valid. For example, if samba adds an IP address of your server to the DNS and then later you change that IP address, samba will (try to) add the new IP address with a DNS update, but will it (try to) remove the old IP address with a DNS update? -- ___________________________________________________________________________ David Keegel <djk-samba at cyber.com.au> Cyber IT Solutions Pty. Ltd. http://www.cyber.com.au/~djk/ Linux & Unix Systems Administration On Tue, Jan 07, 2014 at 10:04:53PM +1100, David Keegel wrote:> Every 10 minutes, my samba 4.0.9 (active directory domain controller) > is logging messages like these :- > 2014-01-07T14:26:09.896260+11:00 gumbo samba[5198]: /usr/sbin/samba_dnsupdate: ; Communication with 127.0.1.1#53 failed: operation canceled...> Why is samba_dnsupdate trying to connect to 127.0.1.1 in particular? >