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 (220.127.116.11 is the IP of the NTP server):
server 18.104.22.168 iburst
When I reboot the server and run ntpstat I see this:
unsynchronised polling server every 64 s
Then I run
sudo ntpdate 22.214.171.124 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 126.96.36.199 again to see it sync successfully:
1 Dec 19:25:11 ntpdate: adjust time server 188.8.131.52 offset 0.005316 sec
Now when I start the service back up and run ntpstat I see this message:
synchronised to NTP server (184.108.40.206) 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?