Xntpd restarted due to no time server selected

  • A+
Categories:Linux Unix

Handled a ntp issue these days and I want to share my learning here as I could not find the right and detail explanation until now.

The error message was like the title and when I checked the ntp service on the server, I found it worked well already while I needed to know the reason.

About the ntp configuration, we should follow below rules:

1. Better use 4 ntp servers as time source, at least 3 servers. 1 server is also OK while we should NOT use 2 servers.

2. If the time difference between the client and the server is more than 1000s, then the ntp service will exit and will not change the time. Have to run 'ntpdate' to set a closer time first.

3. If the time difference is less than 128ms, then client will slew the time with 0.5ms/s. If large than it, will reset the time directly. An option -x will increase the threshold to 600s.

4. NTP server was not designed to run inside of a virtual machine. It requires a high resolution system clock, with response times to clock interrupts that are serviced with a high level of accuracy.


Back to my issue and I found the client was configured with two ntp servers and one of them was restarted on the same day and the ntp server was a KVM VM.

After the reboot the time clock on the ntp server was a little different and I could confirm this from the client:

Such actions would last one hour then the ntp service would exit.

So there were two ntp servers while their time difference was more than 128ms and the client could not know which one it should select.

Our monitor team would start the ntp service manually per hour until the time difference was less than 128ms.

Now the client was synchronzied with the ntp server and the ntp service would not exit any more.


:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: