Context
- Centos 7
- chronyd (chrony) version 3.1
Issue
I am encountering an issue with chonyd
and server date.
First, change current date to old date
I changed the hardware clock date from the current real date mar. nov. 27 15:57:12 CET 2018
to mer. déc. 12 12:12:12 CET 2012
using the following commands :
hwclock --set --date="12/12/2012 12:12:12"
hwclock -s
Then, start chronyd service to fetch the real good date
I start the chronyd service using systemctl start chronyd
, and check the status using systemctl status chronyd
, here is the output to show you that the chronyd
service is running correctly :
● chronyd.service - NTP client/server
Loaded: loaded (/usr/lib/systemd/system/chronyd.service; enabled; vendor preset: enabled)
Active: active (running) since mer. 2012-12-12 12:20:14 CET; 27min ago
...
déc. 12 12:20:17 pad chronyd[1808]: Selected source 178.32.220.7
déc. 12 12:20:17 pad chronyd[1808]: System clock wrong by 188017778.899985 seconds, adjustment started
déc. 12 12:25:37 pad chronyd[1808]: Selected source 62.210.211.218
Here is the /etc/chrony.conf
configuration file :
# Record the rate at which the system clock gains/losses time.
driftfile /var/lib/chrony/drift
# Enable kernel synchronization of the real-time clock (RTC).
rtcsync
# Enable hardware timestamping on all interfaces that support it.
hwtimestamp *
# Specify directory for log files.
logdir /var/log/chrony
server 0.fr.pool.ntp.org minpoll 0 maxpoll 0
server 1.fr.pool.ntp.org minpoll 0 maxpoll 0
server 2.fr.pool.ntp.org minpoll 0 maxpoll 0
server 3.fr.pool.ntp.org minpoll 0 maxpoll 0
Here is the chronyc sources
output after chronyd
start :
^+ obelix.fraho.eu 2 0 377 0 -876us[ -876us] +/- 12ms
^- bb8.dousse.eu 2 7 377 40 -1547us[-1547us] +/- 52ms
^- cdg1.m-d.net 2 6 377 39 -806us[ -806us] +/- 33ms
^* cluster004.linocomm.net 2 7 377 100 +330us[ +384us] +/- 7957us
The output tells that the server is connected, showing the ^+
characters at that of obelix.fraho.eu
ntp host server.
Finally, i wait that the chronyd daemon update the date and show the date
After more than 60 minutes, i run the command date
in my terminal and get the following output :
mer. déc. 12 13:15:04 CET 2012
The date has not been updated by chronyd ...
The folder /var/log/chronyd/
is empty
Any idea ?