Closed aii-shanker-jj closed 1 year ago
Try the -F option, as htpdate does double forking, which systemd doesn't understand.
Please let me know if below startup option solve the issue
HTP_OPTIONS="-DFx -p 7 -f /var/lib/chrony/chrony.drift"
Please also have a look at the example in scripts/htpdate.service
referred to scripts/htpdate.service
and updated Type=forking
to Type=exec
Also modified HTP_OPTIONS to included -F.
but still doesn't look sync
> chronyc tracking
Reference ID : 7F7F0101 ()
Stratum : 5
Ref time (UTC) : Wed Sep 28 06:46:00 2022
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 : 0.000000000 seconds
Root dispersion : 0.000000000 seconds
Update interval : 0.0 seconds
Leap status : Normal
> chronyc clients
Hostname NTP Drop Int IntL Last Cmd Drop Int Last
===============================================================================
502 Invalid command
Only now I get what you are trying to do, I think. Ntpd, chrony and htpdate all use drift files, but thier content isn't compatible. Htpdate is only storing the frequency as a number, nothing more.
Having two programs writing to the same file is asking for trouble (race conditions) anyway,
I have updated HTP_OPTIONS="-Dx -p 7 -f /var/lib/chrony/chrony.drift"
with HTP_OPTIONS="-Dx -p 7 -f /etc/htpdate.drift"
and still no change in chronyc tracking
or chronyc clients
results.
Seems like a chronyc issue than.... htpdate doesn't know about chrony and the other way around... they are complete separate entities. Even without htpdate installed/running, chrony probably doesn't work in your case, please check.
oh ok. for now, I shall close this ticket and get back after verification. thank you @twekkel
Environment
htpdate service environment file contents
htpdate service status
Looking for inputs on resolving "Error reading frequency from /etc/htpdate.drift"
Added below lines in /etc/chrony/chrony.conf
On execution of
chronyc sourcestats -v
, it returns a empty list.Exepecting localhost will be displayed.
On execution of
chronyc activity
, it returns a 0 sources. I was expecting 1 source as localhost.Looking for some guidance/inputs to sync between htpdate and chrony.