Operating System - HP-UX
1823062 Members
3460 Online
109645 Solutions
New Discussion юеВ

NTP keeps losing synchronisation

 
SOLVED
Go to solution
Mark Tunnell
Advisor

NTP keeps losing synchronisation

I'm trying to sync an 11.11 server to an external time source but it keeps losing its synchronisation. Here's an excerpt from syslog:
Dec 4 10:01:09 rep2 xntpd[27557]: synchronized to 132.163.4.102, stratum=1
Dec 4 10:20:59 rep2 xntpd[27557]: time reset (step) -0.276097 s
Dec 4 10:20:59 rep2 xntpd[27557]: synchronisation lost
Dec 4 10:26:19 rep2 xntpd[27557]: synchronized to 132.163.4.102, stratum=1
Dec 4 12:42:22 rep2 xntpd[27557]: time reset (step) -0.279892 s
Dec 4 12:42:22 rep2 xntpd[27557]: synchronisation lost

I've just configured NTP through SAM so the only line in /etc/ntp.conf is "server 132.163.4.102 version 3" I know there's a whole bunch of other manual options. Do I need those to correct this problem?

Thanks.
3 REPLIES 3
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: NTP keeps losing synchronisation

One of the most important tasks is to choose your NTP servers wisely. Note that I used the plural. You really need a minimum of about 3 so the the NTP daemon can perform statistical analysis and choose which server is best for the moment. You probably have a less than robust network and with only one time server, poor xntpd is left with very limited options. Have a look at /usr/share/doc/NTP_Primer.txt; it's an excellent starting point.

One of the easist methods is to use the NTP pool of public servers; just add lines similar to this to /etc/ntp.conf.

server 0.us.pool.ntp.org
server 1.us.pool.ntp.org
server 2.us.pool.ntp.org

These are round-robin DNS replies so that you get a new set of servers each time xntpd is started. It also wise to add a localhost fallback entry:
server 127.127.1.1 stratum 10
If it ain't broke, I can fix that.
Mark Tunnell
Advisor

Re: NTP keeps losing synchronisation

Thanks. So, do you recommend restarting XNTPD on a regular basis?

Mark
A. Clay Stephenson
Acclaimed Contributor

Re: NTP keeps losing synchronisation

No. If you have reliable time sources, xntpd should essentially never lose synchronization. Fix your network and choose multiple time servers and you will almost never have to think about NTP any more and you time will be accurate to within a few tens of milliseconds at all times. If you have to restart xnptd, you are fixing the symptoms rather than the problem.
If it ain't broke, I can fix that.