Chrony Time Sync Not Working

iL0g!ca1

New Member
Oct 9, 2024
5
1
3
I created a proxmox cluster and 1 of the machines gives me a 401 error. Reading around it seems to be a time sync problem. Whenever I run "chronyc tracking" I get this back for output-

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

I'm not entirely sure what this means or how to fix this. Can someone lead me in the right direction?
 
I didn't configure it at all it should have been left as the default. Here is the output -

# Welcome to the chrony configuration file. See chrony.conf(5) for more
# information about usable directives.

# Include configuration files found in /etc/chrony/conf.d.
confdir /etc/chrony/conf.d

# Use Debian vendor zone.
pool 2.debian.pool.ntp.org iburst

# Use time sources from DHCP.
sourcedir /run/chrony-dhcp

# Use NTP sources found in /etc/chrony/sources.d.
sourcedir /etc/chrony/sources.d

# This directive specify the location of the file containing ID/key pairs for
# NTP authentication.
keyfile /etc/chrony/chrony.keys

# This directive specify the file into which chronyd will store the rate
# information.
driftfile /var/lib/chrony/chrony.drift

# Save NTS keys and cookies.
ntsdumpdir /var/lib/chrony

# Uncomment the following line to turn logging on.
#log tracking measurements statistics

# Log files location.
logdir /var/log/chrony

# Stop bad estimates upsetting machine clock.
maxupdateskew 100.0

# This directive enables kernel synchronisation (every 11 minutes) of the
# real-time clock. Note that it can't be used along with the 'rtcfile' directive.
rtcsync

# Step the system clock instead of slewing it if the adjustment is larger than
# one second, but only in the first three clock updates.
makestep 1 3

# Get TAI-UTC offset and leap seconds from the system tz database.
# This directive must be commented out when using time sources serving
# leap-smeared time.
leapsectz right/UTC
 
What is the output of nslookup 2.debian.pool.ntp.org ? Maybe there is an issue with resolving or connecting to that server (which will change one in a while)?
What is the output of systemctl status chrony ? Maybe the configuration is not correct (even if it is the default).
Instead of pool 2.debian.pool.ntp.org iburst you could use server 192.168.0.1 or something like it on your own local network (if you have a server that provides ntp).
 
Here is the output of the nslookup -

;; communications error to 127.0.0.1#53: connection refused
;; communications error to 127.0.0.1#53: connection refused
;; communications error to 127.0.0.1#53: connection refused
;; no servers could be reached

Here is the output for systemctl status chrony -

● chrony.service - chrony, an NTP client/server
Loaded: loaded (/lib/systemd/system/chrony.service; enabled; preset: enabled)
Active: active (running) since Wed 2024-10-09 02:59:19 CDT; 7h ago
Docs: man:chronyd(8)
man:chronyc(1)
man:chrony.conf(5)
Process: 10453 ExecStart=/usr/sbin/chronyd $DAEMON_OPTS (code=exited, status=0/SUCCESS)
Main PID: 10457 (chronyd)
Tasks: 2 (limit: 9301)
Memory: 1.3M
CPU: 39ms
CGroup: /system.slice/chrony.service
├─10457 /usr/sbin/chronyd -F 1
└─10458 /usr/sbin/chronyd -F 1

Oct 09 02:59:19 athena systemd[1]: Starting chrony.service - chrony, an NTP client/server...
Oct 09 02:59:19 athena chronyd[10457]: chronyd version 4.3 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP +SCFILTER +SIGND +ASYNCDNS +NTS +SECHASH +IPV6 -DE>
Oct 09 02:59:19 athena chronyd[10457]: Frequency 0.000 +/- 1000000.000 ppm read from /var/lib/chrony/chrony.drift
Oct 09 02:59:19 athena chronyd[10457]: Using right/UTC timezone to obtain leap second data
Oct 09 02:59:19 athena chronyd[10457]: Loaded seccomp filter (level 1)
Oct 09 02:59:19 athena systemd[1]: Started chrony.service - chrony, an NTP client/server.

I will look into changing the server to something that is local to see if that makes a difference.
 
Here is the output of the nslookup -

;; communications error to 127.0.0.1#53: connection refused
;; communications error to 127.0.0.1#53: connection refused
;; communications error to 127.0.0.1#53: connection refused
;; no servers could be reached
Looks like your DNS server is not working. Why did you configure 127.0.0.1 as the DNS server for your Proxmox. Since DNS does not work, updates and NTP will not work.
Here is the output for systemctl status chrony -

● chrony.service - chrony, an NTP client/server
Loaded: loaded (/lib/systemd/system/chrony.service; enabled; preset: enabled)
Active: active (running) since Wed 2024-10-09 02:59:19 CDT; 7h ago
Docs: man:chronyd(8)
man:chronyc(1)
man:chrony.conf(5)
Process: 10453 ExecStart=/usr/sbin/chronyd $DAEMON_OPTS (code=exited, status=0/SUCCESS)
Main PID: 10457 (chronyd)
Tasks: 2 (limit: 9301)
Memory: 1.3M
CPU: 39ms
CGroup: /system.slice/chrony.service
├─10457 /usr/sbin/chronyd -F 1
└─10458 /usr/sbin/chronyd -F 1

Oct 09 02:59:19 athena systemd[1]: Starting chrony.service - chrony, an NTP client/server...
Oct 09 02:59:19 athena chronyd[10457]: chronyd version 4.3 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP +SCFILTER +SIGND +ASYNCDNS +NTS +SECHASH +IPV6 -DE>
Oct 09 02:59:19 athena chronyd[10457]: Frequency 0.000 +/- 1000000.000 ppm read from /var/lib/chrony/chrony.drift
Oct 09 02:59:19 athena chronyd[10457]: Using right/UTC timezone to obtain leap second data
Oct 09 02:59:19 athena chronyd[10457]: Loaded seccomp filter (level 1)
Oct 09 02:59:19 athena systemd[1]: Started chrony.service - chrony, an NTP client/server.
Looks like chrony start fine but since DNS does not work, it cannot connect to the time servers (you configured, which is the default).
 
Wow I didn't even notice that, I was running through the set up and must have skipped over that part in the configuration process. Also I'm not sure if its related, but when I run timedatectl, it says system clock is not syncronised?
 
Wow I didn't even notice that, I was running through the set up and must have skipped over that part in the configuration process. Also I'm not sure if its related, but when I run timedatectl, it says system clock is not syncronised?
Please fix your DNS, as it will prevent your from accurate time but also update and security fixes.
 
I changed my DNS and that fixed it, and it fixed the timedatectl not syncronising also. Thank you for your help! I can't believe I skipped over something this simple.
 
  • Like
Reactions: leesteken

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!