This is my configuration:
Start script:
[/etc/init.d]$ cat chrony
#!/bin/sh
#
# Start chrony
[ -r /etc/default/chrony ] && . /etc/default/chrony
case "$1" in
start)
printf "Starting chrony: "
chronyd $CHRONY_ARGS && echo "OK" || echo "FAIL"
;;
stop)
printf "Stopping chrony: "
killall chronyd && echo "OK" || echo "FAIL"
;;
restart|reload)
"$0" stop
sleep 1
"$0" start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?
The file /etc/default/chrony:
[/etc/default]$ cat chrony
CHRONY_ARGS="-s -r -f /home/user/etc/chrony.conf"
The file /home/user/etc/chrony.conf:
[~/etc]$ cat chrony.conf
driftfile /var/lib/chrony/drift
makestep 1.0 3
rtcfile /var/lib/chrony/rtc
rtconutc
rtcautotrim 30
dumpdir /var/run/chronyI have a strange problem: When chrony is started after boot all works fine.
chronyc --version
chronyc (chrony) version 4.1 (-READLINE +SECHASH +IPV6 -DEBUG)
After 5 min:
chronyc sources
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^? cloud.discloud.biz 2 6 3 13 +2145us[ +729us] +/- 26ms
Now I restart chrony
sudo service chrony restart
and I get after 1 min:
MS Name/IP address Stratum Poll Reach LastRx Last sample ===============================================================================
^? ntp1.trans-ix.nl 0 6 0 - +0ns[ +0ns] +/- 0ns
And after 2min
[bmterra@armxl ~]$ chronyc sourcesMS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^? aardbei.vanderzwet.net 0 6 0 - +0ns[ +0ns] +/- 0ns
I mean, I can ping the time servers:
ping nts1.time.nl64 bytes from nts1.time.nl (2a00:d78:0:712:94:198:159:11): icmp_seq=1 ttl=56 time=53.5 ms 64 bytes from nts1.time.nl (2a00:d78:0:712:94:198:159:11): icmp_seq=2 ttl=56 time=36.6 ms 64 bytes from nts1.time.nl (2a00:d78:0:712:94:198:159:11): icmp_seq=3 ttl=56 time=34.8 ms
3 packets transmitted, 3 received, 0% packet loss, time 5ms
rtt min/avg/max/mdev = 34.818/41.657/53.519/8.423 ms
3 packets transmitted, 2 received, 33.3333% packet loss, time 5ms
rtt min/avg/max/mdev = 76.662/83.883/91.104/7.221 ms
Any idea why chrony stops to work after a restart of the service?
Or how to debug that further?
Uwe