I installed ntp on a centos server.
/etc/ntp.conf replacing the default server entries with one entry to my internal NTP server's IP (126.96.36.199 is the IP of the NTP server):
server 188.8.131.52 iburst
When I reboot the server and run ntpstat I see this:
unsynchronised polling server every 64 s
Then I run
sudo ntpdate 184.108.40.206 and see this message:
1 Dec 19:22:35 ntpdate: the NTP socket is in use, exiting
Then I stop the service (
systemctl stop ntpd) and run
sudo ntpdate 220.127.116.11 again to see it sync successfully:
1 Dec 19:25:11 ntpdate: adjust time server 18.104.22.168 offset 0.005316 sec
Now when I start the service back up and run ntpstat I see this message:
synchronised to NTP server (22.214.171.124) 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?