[Samba] samba_dnsupdate: could not talk to any default name server

David Keegel djk-samba at cyber.com.au
Wed Jan 8 23:06:42 MST 2014

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
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,
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 failed: operation canceled
> Why is samba_dnsupdate trying to connect to in particular?

More information about the samba mailing list