NTP not syncing automatically with my internal NTP server
Looks like I was just being impatient. After a reboot if I wait about 6 minutes and ran ntpstat it will show it is synchronized.
The polling interval says 64 s which I assumed meant it polls every 64 s, but it looks like it doesn't work like that exactly.
Related videos on Youtube
Geoffrey McCosker
Updated on September 18, 2022Comments
-
Geoffrey McCosker over 1 year
I installed ntp on a centos server.
I modified
/etc/ntp.conf
replacing the default server entries with one entry to my internal NTP server's IP (1.2.3.4 is the IP of the NTP server):server 1.2.3.4 iburst
When I reboot the server and run ntpstat I see this:
unsynchronised polling server every 64 s
Then I run
sudo ntpdate 1.2.3.4
and see this message:1 Dec 19:22:35 ntpdate[2339]: the NTP socket is in use, exiting
Then I stop the service (
systemctl stop ntpd
) and runsudo ntpdate 1.2.3.4
again to see it sync successfully:1 Dec 19:25:11 ntpdate[2351]: adjust time server 1.2.3.4 offset 0.005316 sec
Now when I start the service back up and run ntpstat I see this message:
synchronised to NTP server (1.2.3.4) at stratum 4 time correct to within 8065 ms polling server every 64 s
If I reboot now and run ntpstat it will say unsynchronized. What am I doing wrong? It should be automatically syncing to the IP of the NTP server I put in the config file right?
-
pete over 8 yearshow far off is it if you reboot again? as far as i can see, after running
ntpdate
and restarting ntpd, everything is fine - ntp makes small adjustments on its own after being 'roughed in'
-