NTP issues : time doesn't get synchronized

General support questions
Post Reply
vhwim
Posts: 4
Joined: 2018/04/18 13:22:52

NTP issues : time doesn't get synchronized

Post by vhwim » 2018/04/18 13:32:27

I already looked at many topics in many forum about ntp issues, so the configuration is as I read everywhere.

I found some commands that will do a a force sync, but they give random values each time I run the command:

radar@eval3 ~]$ sudo ntpd -gq
ntpd: time slew -0.119539s
[radar@eval3 ~]$ sudo ntpd -gq
ntpd: time set -0.652434s
[radar@eval3 ~]$ sudo ntpd -gq
ntpd: time set +0.142635s
[radar@eval3 ~]$ sudo ntpdate evaltime1
18 Apr 13:24:23 ntpdate[29905]: adjust time server 10.249.5.60 offset -0.220401 sec
[radar@eval3 ~]$ sudo ntpdate evaltime1
18 Apr 13:24:26 ntpdate[29907]: adjust time server 10.249.5.60 offset -0.293155 sec
[radar@eval3 ~]$ sudo ntpdate evaltime1
18 Apr 13:24:30 ntpdate[29909]: adjust time server 10.249.5.60 offset -0.253996 sec
[radar@eval3 ~]$ sudo ntpdate evaltime1
18 Apr 13:24:35 ntpdate[29911]: adjust time server 10.249.5.60 offset 0.449381 sec
[radar@eval3 ~]$ sudo ntpdate evaltime1
18 Apr 13:24:38 ntpdate[29913]: adjust time server 10.249.5.60 offset 0.326847 sec

When I ping the server then delay is typical 2ms, still the time is about 1 sec wrong. I would expect that the forced sync commands would lower the offset but the offset to apply goes from - to +. The time sometimes follows each step but not always.

Could it be the the timeserver itself?

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: NTP issues : time doesn't get synchronized

Post by TrevorH » 2018/04/18 14:16:52

Are you running either in a VM or is your ntp server a VM?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

vhwim
Posts: 4
Joined: 2018/04/18 13:22:52

Re: NTP issues : time doesn't get synchronized

Post by vhwim » 2018/04/18 19:45:05

I am not running in a VM, the ntp server that I don't know. I only have its IP address, it is on another network where my network is connected to by means of a firewall.

A pingto the ntp server is always within 2msec.

vhwim
Posts: 4
Joined: 2018/04/18 13:22:52

Re: NTP issues : time doesn't get synchronized

Post by vhwim » 2018/04/20 09:39:27

Think the problems comes from the time server which has a "peer clock precision" of 1 sec.

User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: NTP issues : time doesn't get synchronized

Post by avij » 2018/04/20 10:34:48

If you have access to the outside world, you can try testing against some other NTP server to see if the problem is with the NTP server in your network. Try for example ntpdate 92.243.6.5. That server is mine and it should have correct time (see its entry on NTP Pool).

You can also use the -q option to ntpdate to only query the server and not set the time, if you prefer.

vhwim
Posts: 4
Joined: 2018/04/18 13:22:52

Re: NTP issues : time doesn't get synchronized

Post by vhwim » 2018/04/20 11:14:31

The problem is that the time server is only accurate to 1 second. This explains the fluctuations of the offset.
I tried your server and indeed now i am synchronized.

Post Reply