[LEDE-DEV] busybox ntpd not syncing if any server is bad

Magnus Kroken mkroken at gmail.com
Fri Aug 18 08:58:50 PDT 2017


Hi Karl

On 17.08.2017 15:13, Karl Palsson wrote:
> It certainly _looks_ better, but isn't actually syncing...
> 
> Sincerely,
> Karl Palsson
> 
> 
> # /usr/sbin/ntpd -d -n -N -l -S /usr/sbin/ntpd-hotplug -p 0.lede.pool.ntp.org  -p working.good.org
> ntpd: bad address '0.lede.pool.ntp.org'
> ntpd: sending query to 192.168.255.124
> ntpd: bad address '0.lede.pool.ntp.org'
> ntpd: reply from 192.168.255.124: offset:-2.453565 delay:5.006456
> status:0x24 strat:3 refid:0xc1043a2c rootdelay:0.001495
> reach:0x01
[...]

Could you elaborate on what to look for to verify a well behaved ntpd? 
How do you tell if it's synced? I can't tell what is different about the 
above log (which you state never actually syncs) and your "good" log 
from OpenWrt 15.05 mentioned in your first message about the issue.

To test this I'm running OpenWrt 15.05.1 in a VM, and LEDE master with 
Busybox 1.27.2 on my router, see logs below. To my untrained eye they 
appear to behave the same as your supposedly bad ntpd with backported patch.

Regards
/Magnus

* LEDE master
/usr/sbin/ntpd -d -n -N -l -S /usr/sbin/ntpd-hotplug -p bad.example.org 
-p ntp.uio.no
ntpd: bad address 'bad.example.org'
ntpd: 'ntp.uio.no' is 129.240.2.6
ntpd: sending query to 129.240.2.6
ntpd: reply from 129.240.2.6: offset:+0.004915 delay:0.012800 
status:0x24 strat:2 refid:0xc23aca94 rootdelay:0.006836 reach:0x01
ntpd: sending query to 129.240.2.6
ntpd: reply from 129.240.2.6: offset:+0.004270 delay:0.011344 
status:0x24 strat:2 refid:0xc23aca94 rootdelay:0.006836 reach:0x03
ntpd: sending query to 129.240.2.6
ntpd: reply from 129.240.2.6: offset:+0.004963 delay:0.012624 
status:0x24 strat:2 refid:0xc23aca94 rootdelay:0.006836 reach:0x07
ntpd: executing '/usr/sbin/ntpd-hotplug stratum'
ntpd: sending query to 129.240.2.6
ntpd: reply from 129.240.2.6: offset:+0.005244 delay:0.013224 
status:0x24 strat:2 refid:0xc23aca94 rootdelay:0.006836 reach:0x0f
ntpd: sending query to 129.240.2.6
ntpd: bad address 'bad.example.org'
ntpd: reply from 129.240.2.6: offset:+0.004792 delay:0.012428 
status:0x24 strat:2 refid:0xc23aca94 rootdelay:0.006836 reach:0x1f
ntpd: sending query to 129.240.2.6
ntpd: reply from 129.240.2.6: offset:+0.004734 delay:0.012564 
status:0x24 strat:2 refid:0xc23aca94 rootdelay:0.006836 reach:0x3f
ntpd: sending query to 129.240.2.6
ntpd: reply from 129.240.2.6: offset:+0.004723 delay:0.012973 
status:0x24 strat:2 refid:0xc23aca94 rootdelay:0.006836 reach:0x7f
ntpd: bad address 'bad.example.org'
ntpd: sending query to 129.240.2.6
ntpd: reply from 129.240.2.6: offset:+0.004097 delay:0.011920 
status:0x24 strat:2 refid:0xc23aca94 rootdelay:0.006836 reach:0xff
ntpd: bad address 'bad.example.org'
ntpd: bad address 'bad.example.org'
ntpd: bad address 'bad.example.org'


* OpenWrt 15.05.1
/usr/sbin/ntpd -d -n -N -l -S /usr/sbin/ntpd-hotplug -p bad.example.org 
-p ntp.uio.no
ntpd: resolved peer ntp.uio.no to 129.240.2.6
ntpd: sending query to 129.240.2.6
ntpd: bad address 'bad.example.org'
ntpd: could not resolve peer bad.example.org, skipping
ntpd: reply from 129.240.2.6: offset:-0.123495 delay:0.265047 
status:0x24 strat:2 refid:0x14cb3ac2 rootdelay:0.013519 reach:0x01
ntpd: sending query to 129.240.2.6
ntpd: reply from 129.240.2.6: offset:+0.001292 delay:0.013400 
status:0x24 strat:2 refid:0x14cb3ac2 rootdelay:0.013519 reach:0x03
ntpd: sending query to 129.240.2.6
ntpd: reply from 129.240.2.6: offset:+0.002661 delay:0.013586 
status:0x24 strat:2 refid:0x14cb3ac2 rootdelay:0.013519 reach:0x07
ntpd: sending query to 129.240.2.6
ntpd: reply from 129.240.2.6: offset:+0.002305 delay:0.013042 
status:0x24 strat:2 refid:0x14cb3ac2 rootdelay:0.013519 reach:0x0f
ntpd: sending query to 129.240.2.6
ntpd: reply from 129.240.2.6: offset:+0.001862 delay:0.012432 
status:0x24 strat:2 refid:0x14cb3ac2 rootdelay:0.013519 reach:0x1f
ntpd: sending query to 129.240.2.6
ntpd: reply from 129.240.2.6: offset:+0.003147 delay:0.015610 
status:0x24 strat:2 refid:0x14cb3ac2 rootdelay:0.013519 reach:0x3f
ntpd: sending query to 129.240.2.6
ntpd: reply from 129.240.2.6: offset:+0.001558 delay:0.012942 
status:0x24 strat:2 refid:0x14cb3ac2 rootdelay:0.013519 reach:0x7f
ntpd: sending query to 129.240.2.6
ntpd: reply from 129.240.2.6: offset:+0.000526 delay:0.012033 
status:0x24 strat:2 refid:0x14cb3ac2 rootdelay:0.013519 reach:0xff
ntpd: sending query to 129.240.2.6
ntpd: reply from 129.240.2.6: offset:+0.001346 delay:0.013074 
status:0x24 strat:2 refid:0x14cb3ac2 rootdelay:0.013519 reach:0xff
ntpd: bad address 'bad.example.org'
ntpd: could not resolve peer bad.example.org, skipping
ntpd: sending query to 129.240.2.6
ntpd: reply from 129.240.2.6: offset:-0.001533 delay:0.012639 
status:0x24 strat:2 refid:0x14cb3ac2 rootdelay:0.013519 reach:0xff
ntpd: executing '/usr/sbin/ntpd-hotplug stratum'
ntpd: bad address 'bad.example.org'
ntpd: could not resolve peer bad.example.org, skipping
ntpd: sending query to 129.240.2.6
ntpd: reply from 129.240.2.6: offset:-0.001225 delay:0.015714 
status:0x24 strat:2 refid:0x94ca3ac2 rootdelay:0.006851 reach:0xff



More information about the Lede-dev mailing list