[Samba] dns update with bind9 is not working

L.P.H. van Belle belle at bazuin.nl
Tue May 18 13:19:45 UTC 2021


for X in your number of DC"s. 
do.. 
dig a hostname_of_DC.$(hostname -d)
dig -x ip_of_DC  
done
 
are these all correct ? 




Van: Patrik [mailto:alabard at gmail.com] 
Verzonden: dinsdag 18 mei 2021 14:20
Aan: L.P.H. van Belle
CC: samba at lists.samba.org
Onderwerp: Re: [Samba] dns update with bind9 is not working



I fixed, the reverse zone, now i get this error:
May 18 14:19:09 p3x-dc samba[45245]:   /usr/sbin/samba_dnsupdate:     raise Exception("Timeout while waiting to contact a working DNS server while looking for %s as %s" % (d, normalised_name)) 
May 18 14:19:09 p3x-dc samba[45245]: [2021/05/18 14:19:09.895807,  0] ../../lib/util/util_runcmd.c:352(samba_runcmd_io_handler) 
May 18 14:19:09 p3x-dc samba[45245]:   /usr/sbin/samba_dnsupdate: Exception: Timeout while waiting to contact a working DNS server while looking for A server.p3x-dc.patrikx3.com 192.168.78.20 as server.p3x-dc.patrikx3.com. 
May 18 14:19:09 p3x-dc samba[45245]: [2021/05/18 14:19:09.913061,  0] ../../source4/dsdb/dns/dns_update.c:85(dnsupdate_nameupdate_done)





Patrik

WWW | GitHub | NPM | Corifeus | +36 20 342 8046











On Tue, May 18, 2021 at 2:05 PM L.P.H. van Belle via samba <samba at lists.samba.org> wrote:

Your resolv.conf should look like this. 

echo "search $(hostname -d) patrikx3.com corifeus.com" > /etc/resolv.conf.new
echo "nameserver $(hostname -i)" >> /etc/resolv.conf.new
Add the other nameserver dc's  ip's below that last line 

Then 
cp /etc/resolv.conf,{.old}
Do this per DC. 

Reverse zone : 
https://wiki.samba.org/index.php/DNS_Administration 

Greetz, 

Louis


> -----Oorspronkelijk bericht-----
> Van: samba [mailto:samba-bounces at lists.samba.org] Namens 
> Patrik via samba
> Verzonden: dinsdag 18 mei 2021 13:38
> Aan: Rowland penny
> CC: samba at lists.samba.org
> Onderwerp: Re: [Samba] dns update with bind9 is not working
> 
> after i changed the resolve to be like this:
> root at server:/usr/lib/x86_64-linux-gnu/samba# cat /etc/resolv.conf c
> #nameserver 8.8.8.8
> search p3x-dc.patrikx3.com
> search patrikx3.com
> search corifeus.com
> nameserver 0.0.0.0
> namesearch ::0


> 
> 
> now i get this error, it is a bit better:
> May 18 13:31:18 p3x-dc samba[22451]:   
> /usr/sbin/samba_dnsupdate:   File
> "/usr/lib/python3/dist-packages/dns/resolver.py", line 950, in
> _compute_timeout
> May 18 13:31:18 p3x-dc samba[22451]: [2021/05/18 13:31:18.935647,  0,
> pid=22451, effective(0, 0), real(0, 0)]
> ../../lib/util/util_runcmd.c:352(samba_runcmd_io_handler)
> May 18 13:31:18 p3x-dc samba[22451]:   
> /usr/sbin/samba_dnsupdate:     raise
> Timeout(timeout=duration)
> May 18 13:31:18 p3x-dc samba[22451]: [2021/05/18 13:31:18.935782,  0,
> pid=22451, effective(0, 0), real(0, 0)]
> ../../lib/util/util_runcmd.c:352(samba_runcmd_io_handler)
> May 18 13:31:18 p3x-dc samba[22451]:   /usr/sbin/samba_dnsupdate:
> dns.exception.Timeout: The DNS operation timed out after 
> 15.145985126495361
> seconds
> May 18 13:31:18 p3x-dc samba[22451]: [2021/05/18 13:31:18.935868,  0,
> pid=22451, effective(0, 0), real(0, 0)]
> ../../lib/util/util_runcmd.c:352(samba_runcmd_io_handler)
> May 18 13:31:18 p3x-dc samba[22451]:   /usr/sbin/samba_dnsupdate:
> May 18 13:31:18 p3x-dc samba[22451]: [2021/05/18 13:31:18.935934,  0,
> pid=22451, effective(0, 0), real(0, 0)]
> ../../lib/util/util_runcmd.c:352(samba_runcmd_io_handler)
> May 18 13:31:18 p3x-dc samba[22451]:   
> /usr/sbin/samba_dnsupdate: During
> handling of the above exception, another exception occurred:
> May 18 13:31:18 p3x-dc samba[22451]: [2021/05/18 13:31:18.935998,  0,
> pid=22451, effective(0, 0), real(0, 0)]
> ../../lib/util/util_runcmd.c:352(samba_runcmd_io_handler)
> May 18 13:31:18 p3x-dc samba[22451]:   /usr/sbin/samba_dnsupdate:
> May 18 13:31:18 p3x-dc samba[22451]: [2021/05/18 13:31:18.936058,  0,
> pid=22451, effective(0, 0), real(0, 0)]
> ../../lib/util/util_runcmd.c:352(samba_runcmd_io_handler)
> May 18 13:31:18 p3x-dc samba[22451]:   
> /usr/sbin/samba_dnsupdate: Traceback
> (most recent call last):
> May 18 13:31:18 p3x-dc samba[22451]: [2021/05/18 13:31:18.936119,  0,
> pid=22451, effective(0, 0), real(0, 0)]
> ../../lib/util/util_runcmd.c:352(samba_runcmd_io_handler)
> May 18 13:31:18 p3x-dc samba[22451]:   
> /usr/sbin/samba_dnsupdate:   File
> "/usr/sbin/samba_dnsupdate", line 848, in <module>
> May 18 13:31:18 p3x-dc samba[22451]: [2021/05/18 13:31:18.936190,  0,
> pid=22451, effective(0, 0), real(0, 0)]
> ../../lib/util/util_runcmd.c:352(samba_runcmd_io_handler)
> May 18 13:31:18 p3x-dc samba[22451]:   
> /usr/sbin/samba_dnsupdate:     elif
> not check_dns_name(d):
> May 18 13:31:18 p3x-dc samba[22451]: [2021/05/18 13:31:18.936252,  0,
> pid=22451, effective(0, 0), real(0, 0)]
> ../../lib/util/util_runcmd.c:352(samba_runcmd_io_handler)
> May 18 13:31:18 p3x-dc samba[22451]:   
> /usr/sbin/samba_dnsupdate:   File
> "/usr/sbin/samba_dnsupdate", line 300, in check_dns_name
> May 18 13:31:18 p3x-dc samba[22451]: [2021/05/18 13:31:18.936482,  0,
> pid=22451, effective(0, 0), real(0, 0)]
> ../../lib/util/util_runcmd.c:352(samba_runcmd_io_handler)
> May 18 13:31:18 p3x-dc samba[22451]:   
> /usr/sbin/samba_dnsupdate:     raise
> Exception("Timeout while waiting to contact a working DNS server while
> looking for %s as %s" % (d, normalised_name))
> May 18 13:31:18 p3x-dc samba[22451]: [2021/05/18 13:31:18.936657,  0,
> pid=22451, effective(0, 0), real(0, 0)]
> ../../lib/util/util_runcmd.c:352(samba_runcmd_io_handler)
> May 18 13:31:18 p3x-dc samba[22451]:   /usr/sbin/samba_dnsupdate:
> Exception: Timeout while waiting to contact a working DNS server while
> looking for A server.p3x-dc.patrikx3.com 192.168.78.20 as
> server.p3x-dc.patrikx3.com.
> May 18 13:31:18 p3x-dc samba[22451]: [2021/05/18 13:31:18.953754,  0,
> pid=22451, effective(0, 0), real(0, 0)]
> ../../source4/dsdb/dns/dns_update.c:85(dnsupdate_nameupdate_done)
> May 18 13:31:18 p3x-dc samba[22451]:   
> dnsupdate_nameupdate_done: Failed
> DNS update with exit code 1
> 
> 
> *Patrik*
> WWW <https://patrikx3.com> | GitHub 
> <https://github.com/patrikx3/> | NPM
> <https://www.npmjs.com/~patrikx3> | Corifeus 
> <https://corifeus.com> | +36
> 20 342 8046
> 
> 
> 
> On Tue, May 18, 2021 at 12:03 PM Rowland penny via samba <
> samba at lists.samba.org> wrote:
> 
> > On 18/05/2021 10:40, Patrik via samba wrote:
> > > As I start the bind9 service all work it shows:
> > > May 18 11:32:49 p3x-dc named[515735]: Loading 'AD DNS 
> Zone' using driver
> > > dlopen
> > > May 18 11:32:49 p3x-dc named[515735]: samba_dlz: started for DN
> > > DC=p3x-dc,DC=patrikx3,DC=com
> > > May 18 11:32:49 p3x-dc named[515735]: samba_dlz: starting 
> configure
> > > May 18 11:32:49 p3x-dc named[515735]: samba_dlz: 
> configured writeable
> > zone '
> > > p3x-dc.patrikx3.com'
> > > May 18 11:32:49 p3x-dc named[515735]: samba_dlz: 
> configured writeable
> > zone
> > > '_msdcs.p3x-dc.patrikx3.com'
> > > May 18 11:32:49 p3x-dc named[515735]: none:102: 
> 'max-cache-size 90%' -
> > > setting to 28633MB (out of 31814MB)
> > > May 18 11:32:49 p3x-dc named[515735]: obtaining root key for view
> > > internal-enp1s0f3 from '/etc/bind/bind.keys'
> > > May 18 11:32:49 p3x-dc named[515735]: set up managed keys 
> zone for view
> > > internal-enp1s0f3, file
> > > 
> '5674904fa710122a641c7076461c76afc1eb2059904e3c9151796da905312
> 484.mkeys'
> > > May 18 11:32:49 p3x-dc named[515735]: automatic empty zone: view
> > > internal-enp1s0f3: 10.IN-ADDR.ARPA
> > >
> > > But as I restart the samba active directory. i get this error:
> > > May 18 11:33:53 p3x-dc samba[516177]: [2021/05/18 
> 11:33:53.188152,  0]
> > > ../../source4/dsdb/dns/dns_update.c:85(dnsupdate_nameupdate_done)
> > > May 18 11:33:53 p3x-dc samba[516177]:   
> dnsupdate_nameupdate_done: Failed
> > > DNS update with exit code 110
> > >
> > > I missed this error as in my samba config i removed the dns_update
> > service,
> > > and i think i was getting the old ip address as the dns 
> update service
> > was
> > > missing. Now, I added this service into samba config, i 
> get the above
> > error.
> > >
> > > What it could be?
> >
> >
> > Can you post your named.conf files, I do not think yours are set up
> > correctly, you do not seem to have 'empty-zones-enable no' 
> for one thing.
> >
> > Rowland
> >
> >
> >
> > --
> > To unsubscribe from this list go to the following URL and read the
> > instructions:  https://lists.samba.org/mailman/options/samba
> >
> -- 
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba
> 
> 


-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba



More information about the samba mailing list