Date: Thu, 06 Sep 2018 10:36:00 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 231193] ntpd peers stuck in INIT status when using local named Message-ID: <bug-231193-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D231193 Bug ID: 231193 Summary: ntpd peers stuck in INIT status when using local named Product: Base System Version: 11.2-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: conf Assignee: bugs@FreeBSD.org Reporter: ml@netfence.it On several of my servers, which resolve through a locally running named, af= ter boot ntp won't work. # ntpq ntpq> peers remote refid st t when poll reach delay offset jit= ter =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D ntp1.inrim.it .INIT. 16 u - 64 0 0.000 0.000 0.= 000 ntp2.inrim.it .INIT. 16 u - 64 0 0.000 0.000 0.= 000 RC order is fine: > # rcorder /etc/rc.d/* /usr/local/etc/rc.d/* | grep -E "(ntp|named)" > /usr/local/etc/rc.d/named > /etc/rc.d/ntpdate > /etc/rc.d/ntpd So named starts before ntpd.=20 However, named starts asynchronously, so it's not ready yet when ntpd queri= es for its peer. See the following log: # grep -E "ntp|named" /var/log/all.log > Aug 27 16:03:19 xxxxxx named[1158]: starting BIND 9.11.4-P1 (Extended Sup= port Version) <id:2b060b2> > Aug 27 16:03:19 xxxxxx kernel: Starting named. > Aug 27 16:03:19 xxxxxx named[1158]: running on FreeBSD amd64 11.2-RELEASE= -p2 FreeBSD 11.2-RELEASE-p2 #8 r338333: Mon Aug 27 09:33:23 CEST 2018 r= oot@xxxxxx.xxxxxxxxxxxxxxxxxxxxx.it:/usr/obj/usr/src/sys/XXXXXX > Aug 27 16:03:19 xxxxxx named[1158]: built with '--localstatedir=3D/var' '= --disable-linux-caps' '--disable-symtable' '--with-randomdev=3D/dev/random'= '--with-libxml2=3D/usr/local' '--with-readline=3D-L/usr/local/lib -ledit' = '--with-dlopen=3Dyes' '--sysconfdir=3D/usr/local/etc/namedb' '--disable-dns= tap' '--disable-filter-aaaa' '--disable-fixed-rrset' '--without-geoip' '--w= ith-idn=3D/usr/local' '--disable-ipv6' '--without-libjson' '--disable-large= file' '--without-lmdb' '--without-python' '--disable-querytrace' '--disable= -rpz-nsdname' '--disable-rpz-nsip' '--enable-threads' '--with-tuning=3Ddefa= ult' '--without-gssapi' '--disable-openssl-version-check' '--without-openss= l' '--disable-native-pkcs11' '--with-dlz-filesystem=3Dyes' '--without-gost'= '--prefix=3D/usr/local' '--mandir=3D/usr/local/man' '--infodir=3D/usr/loca= l/info/' '--build=3Damd64-portbld-freebsd11.2' 'build_alias=3Damd64-portbld= -freebsd11.2' 'CC=3Dcc' 'CFLAGS=3D-O2 -pipe -DLIBICONV_PLUG -fstack-protect= or -isystem /usr/local/include -fno-strict-aliasing' 'LDFLAGS=3D -fstack-pr= otector' 'LIB > Aug 27 16:03:19 xxxxxx named[1158]: running as: named -u bind -c /usr/loc= al/etc/namedb/named.conf > Aug 27 16:03:19 xxxxxx named[1158]: compiled by CLANG 4.2.1 Compatible Fr= eeBSD Clang 6.0.0 (tags/RELEASE_600/final 326565) > Aug 27 16:03:19 xxxxxx named[1158]: compiled with libxml2 version: 2.9.7 > Aug 27 16:03:19 xxxxxx named[1158]: linked to libxml2 version: 20907 > Aug 27 16:03:19 xxxxxx named[1158]: compiled with zlib version: 1.2.11 > Aug 27 16:03:19 xxxxxx named[1158]: linked to zlib version: 1.2.11 > Aug 27 16:03:19 xxxxxx named[1158]: threads support is enabled > Aug 27 16:03:19 xxxxxx named[1158]: -------------------------------------= --------------- > Aug 27 16:03:19 xxxxxx named[1158]: BIND 9 is maintained by Internet Syst= ems Consortium, > Aug 27 16:03:19 xxxxxx named[1158]: Inc. (ISC), a non-profit 501(c)(3) pu= blic-benefit Aug 27 16:03:19 xxxxxx named[1158]: corporation. Support and = training for BIND 9 are Aug 27 16:03:19 xxxxxx named[1158]: available at ht= tps://www.isc.org/support > Aug 27 16:03:19 xxxxxx named[1158]: -------------------------------------= --------------- > Aug 27 16:03:19 xxxxxx named[1158]: found 4 CPUs, using 4 worker threads > Aug 27 16:03:19 xxxxxx named[1158]: using 3 UDP listeners per interface > Aug 27 16:03:19 xxxxxx named[1158]: using up to 4096 sockets > Aug 27 16:03:19 xxxxxx named[1158]: loading configuration from '/usr/loca= l/etc/namedb/named.conf' > Aug 27 16:03:19 xxxxxx named[1158]: reading built-in trust anchors from f= ile '/usr/local/etc/namedb/bind.keys' > Aug 27 16:03:19 xxxxxx named[1158]: using default UDP/IPv4 port range: [4= 9152, 65535] > Aug 27 16:03:19 xxxxxx named[1158]: using default UDP/IPv6 port range: [4= 9152, 65535] > Aug 27 16:03:19 xxxxxx named[1158]: listening on IPv4 interface lo0, 127.= 0.0.1#53 > Aug 27 16:03:19 xxxxxx named[1158]: listening on IPv4 interface vlan1, 19= 2.168.xxx.1#53 > Aug 27 16:03:19 xxxxxx named[1158]: listening on IPv4 interface vlan2, 19= 2.168.xxx.1#53 > Aug 27 16:03:19 xxxxxx named[1158]: listening on IPv4 interface vlan3, 19= 2.168.xxx.1#53 > Aug 27 16:03:19 xxxxxx named[1158]: generating session key for dynamic DNS > Aug 27 16:03:19 xxxxxx named[1158]: sizing zone task pool based on 167 zo= nes > Aug 27 16:03:19 xxxxxx named[1158]: none:100: 'max-cache-size 90%' - sett= ing to 7109MB (out of 7898MB) > Aug 27 16:03:19 xxxxxx named[1158]: set up managed keys zone for view _de= fault, file 'managed-keys.bind' > Aug 27 16:03:19 xxxxxx named[1158]: automatic empty zone: EMPTY.AS112.ARPA > Aug 27 16:03:19 xxxxxx named[1158]: automatic empty zone: HOME.ARPA > Aug 27 16:03:19 xxxxxx named[1158]: none:100: 'max-cache-size 90%' - sett= ing to 7109MB (out of 7898MB) > Aug 27 16:03:19 xxxxxx named[1158]: configuring command channel from '/us= r/local/etc/namedb/rndc.key' > Aug 27 16:03:19 xxxxxx named[1158]: command channel listening on 127.0.0.= 1#953 > Aug 27 16:03:19 xxxxxx named[1158]: managed-keys-zone: loaded serial 0 > ... > Aug 27 16:03:19 xxxxxx named[1158]: all zones loaded > Aug 27 16:03:19 xxxxxx named[1158]: running > Aug 27 16:03:19 xxxxxx kernel: Setting date via ntp. > Aug 27 16:03:19 xxxxxx kernel: Error resolving ntp1.inrim.it: hostname no= r servname provided, or not known (8) > Aug 27 16:03:19 xxxxxx kernel: 27 Aug 16:03:19 ntpdate[1175]: Can't find = host ntp1.inrim.it: hostname nor servname provided, or not known (8) > Aug 27 16:03:19 xxxxxx kernel: Error resolving ntp2.inrim.it: hostname no= r servname provided, or not known (8) > Aug 27 16:03:19 xxxxxx kernel: 27 Aug 16:03:19 ntpdate[1175]: Can't find = host ntp2.inrim.it: hostname nor servname provided, or not known (8) > Aug 27 16:03:19 xxxxxx kernel: Error resolving 0.it.pool.ntp.org: hostnam= e nor servname provided, or not known (8) > Aug 27 16:03:19 xxxxxx kernel: 27 Aug 16:03:19 ntpdate[1175]: Can't find = host 0.it.pool.ntp.org: hostname nor servname provided, or not known (8) > Aug 27 16:03:19 xxxxxx kernel: 27 Aug 16:03:19 ntpdate[1175]: no servers = can be used, exiting > Aug 27 16:03:20 xxxxxx ntpd[1252]: ntpd 4.2.8p11-a (1): Starting > Aug 27 16:03:20 xxxxxx kernel: Starting ntpd. > Aug 27 16:03:20 xxxxxx ntpd[1252]: Command line: /usr/sbin/ntpd -c /etc/n= tp.conf -p /var/run/ntpd.pid -f /var/db/ntpd.drift > Aug 27 16:03:20 xxxxxx ntpd[1254]: proto: precision =3D 0.062 usec (-24) > Aug 27 16:03:20 xxxxxx ntpd[1254]: restrict: ignoring line 12, address/ho= st 'ntp1.inrim.it' unusable. > Aug 27 16:03:20 xxxxxx ntpd[1254]: restrict: ignoring line 14, address/ho= st 'ntp2.inrim.it' unusable. > Aug 27 16:03:20 xxxxxx ntpd[1254]: restrict: ignoring line 16, address/ho= st '0.it.pool.ntp.org' unusable. > Aug 27 16:03:20 xxxxxx ntpd[1254]: Listen and drop on 0 v4wildcard 0.0.0.= 0:123 > Aug 27 16:03:20 xxxxxx ntpd[1254]: Listen normally on 2 lo0 127.0.0.1:123 > Aug 27 16:03:20 xxxxxx ntpd[1254]: Listen normally on 7 vlan1 192.168.xxx= .1:123 > Aug 27 16:03:20 xxxxxx ntpd[1254]: Listening on routing socket on fd #28 = for interface updates > Aug 27 16:03:26 xxxxxx named[1158]: resolver priming query complete I found no way to have ntpd recheck DNS later, so I think a workaround is needed; perhaps inserting some delay either in /usr/local/etc/rc.d/named or /etc/rc.d/ntpd might work. I see named's RC script has named_wait, but it might be a bigger trouble th= an it solves, as the server could hang indefinitely if started without an Inte= rnet connection working (see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D144400). --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-231193-227>