Chrony 4.0-2/4.0-3 not starting properly?

Is there some config or other changes needed after latest chrony 4.0-2/4.0-3 updates?

root@R7800:/etc/init.d# opkg list-installed |grep chrony
chrony - 4.0-3
collectd-mod-chrony - 5.12.0-1

OpenWrt SNAPSHOT r14985+64-4d4ef1058c / LuCI Master git-20.323.58290-61c2361

I cannot seem to get chrony to connect upstream NTP servers after 4.0-2/4.0-3 updates (kernel > 5.4.72) and obviously time is not updated correctly.

root@R7800:/sys# chronyc tracking
Reference ID    : 00000000 ()
Stratum         : 0
Ref time (UTC)  : Thu Jan 01 00:00:00 1970
System time     : 0.000000000 seconds fast of NTP time
Last offset     : +0.000000000 seconds
RMS offset      : 0.000000000 seconds
Frequency       : 0.000 ppm slow
Residual freq   : +0.000 ppm
Skew            : 0.000 ppm
Root delay      : 1.000000000 seconds
Root dispersion : 1.000000000 seconds
Update interval : 0.0 seconds
Leap status     : Not synchronised

It works ok with chrony 4.0-1 (kernel 5.4.72).

Seems while chrony is starting it is not reading config files;

root@R7800:/etc/init.d# ps -w |grep chrony
 6804 chrony     960 S    /usr/sbin/chronyd -n
 7648 root      1072 S    grep chrony

My chrony config;

root@R7800:/# cat /etc/chrony/chrony.conf 
# This file is included from config file generated from /etc/config/chrony

# Log clock errors above 0.5 seconds
logchange 0.5

# Don't log client accesses

# set the system clock else the kernel will always stay in UNSYNC state
root@R7800:/etc/init.d# cat /etc/config/chrony 
config pool
	option hostname ''
    option hostname ''
    option hostname ''
    option hostname ''
	option maxpoll '12'
	option iburst 'yes'

config dhcp_ntp_server
	option iburst 'yes'

config allow
	option interface 'lan'

config makestep
	option threshold '1.0'
	option limit '3'

When changing to ntpd using the same server config it is working ok.

root@R7800:/# opkg list-installed ntpd
ntpd - 4.2.8p15-3
root@R7800:/# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
+ns-vultr.nono.i    2 u   72  128  377    4.068   +4.025   2.934     2 u   76  128  377    4.363   +2.235   1.990
*vps-9ee2ad88.vp     2 u   10  128  377    4.492   +1.891   2.054
-time.cloudflare      3 u   67  128  377    4.109  +13.456   3.323
root@R7800:/etc/init.d# cat /var/etc/ntpd.conf
driftfile /var/lib/ntp/ntp.drift

restrict default limited kod nomodify notrap nopeer
restrict -6 default limited kod nomodify notrap nopeer
restrict source noquery

# No limits for local monitoring
restrict -6 ::1

server iburst
server iburst
server iburst
server iburst

Any advise as I kind of a like chrony over ntpd?

PS: Busybox ntpd has been removed.

Loading of the UCI-generated configuration has been reworked in the -2 package. I think you just need to switch to the new config file:

# mv /etc/chrony/chrony.conf-opkg /etc/chrony/chrony.conf
# /etc/init.d/chronyd restart

Your configuration file doesn't seem to be modified, so I'm not sure why opkg didn't do that automatically. IIRC it worked for me.


Thanks @mlichvar, works like a charm!

Managed to delete old chrony config files before reading your response.
Now ok after reinstalled chrony 4.0-3.

I'm not using opkg to update packages but building own + sysupgrade.
That's most likely the reason the config files were not updated.

All good now, thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.