Time synchronization problem

Installing, Configuring, Troubleshooting server daemons such as Web and Mail
udy786
Posts: 35
Joined: 2014/04/29 15:43:51

Re: Time time synchronization problem

Post by udy786 » 2014/05/06 18:21:38

avij wrote:Try this on both:

Code: Select all

yum install ntp
service ntpd start
chkconfig ntpd on
Wait around 10 minutes, then run date to see if your clock is synchronized [yes, there are multiple ways to do this, but this is the easiest].

If you are already running ntpd, please provide the output of ntpq -pn


I have started ntpd but still getting same problem. Also I have rebooted my server still same.

Some one please help me.

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: Time synchronization problem

Post by gerald_clark » 2014/05/06 18:28:19

Are either of these virtual machines?

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

Re: Time synchronization problem

Post by avij » 2014/05/06 23:27:29

The above question about VMs is also a very good question.

In addition to that, let ntpd run for about 5-10 minutes, run ntpq -pn and post the output.

udy786
Posts: 35
Joined: 2014/04/29 15:43:51

Re: Time synchronization problem

Post by udy786 » 2014/05/07 14:36:28

gerald_clark wrote:Are either of these virtual machines?

No. I have installed on dedicated server. No other OS is installed on both server.

udy786
Posts: 35
Joined: 2014/04/29 15:43:51

Re: Time synchronization problem

Post by udy786 » 2014/05/07 16:46:41

avij wrote:The above question about VMs is also a very good question.

In addition to that, let ntpd run for about 5-10 minutes, run ntpq -pn and post the output.
Here is output of both server.

CentOS 6.2

Code: Select all

[root@DataBase ~]# ntpq -pn
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*120.88.47.10    10.84.87.146     2 u  551 1024  377   21.806    4.263  15.942
+123.108.225.6   200.98.196.212   2 u  477 1024  377   26.303   21.912  15.833
CentOS 5.5

Code: Select all

[root@Asterisk ~]# ntpq -pn
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
-125.62.193.121  129.6.15.29      2 u  899 1024  377   69.206   12.181  11.464
+120.88.47.10    10.84.87.146     2 u  950 1024  377   19.682   -5.153  13.109
*120.88.46.10    103.1.106.69     2 u  968 1024  377   27.375   -8.565  11.841
+202.71.136.67   203.185.69.60    2 u  960 1024  377   13.372   -9.959  15.117
 127.127.1.0     .LOCL.          10 l   62   64  377    0.000    0.000   0.001

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

Re: Time synchronization problem

Post by avij » 2014/05/07 17:07:38

According to that output, both servers are within 10 milliseconds of the 'correct' time. This is shown in the offset column, where the numbers signify the difference to the upstream clock in milliseconds. The clock source selected for time synchronization is marked with a * in the first column. The jitter is a bit high, but ntpd does not seem to have too much problems with it. You may get better results if you hand-pick upstream NTP servers that are closer to you, but your use case doesn't seem to require sub-millisecond accuracy, so I'd keep things as is for now.

I would comment out the "Undisciplined Local Clock" (127.127.1.0) clock source from the CentOS 5.x server's configuration (/etc/ntp.conf) for aesthetic reasons. Apart from that, your configuration seems fine. If the clock starts drifting again, run ntpq -pn again (before resetting the clock) to see what ntpd is doing when it can't sync the clock.

udy786
Posts: 35
Joined: 2014/04/29 15:43:51

Re: Time synchronization problem

Post by udy786 » 2014/05/07 17:38:46

I have made changes as per suggestion yesterday but problem was same yesterday. Today I have rebooted my server in down time and my server is live from last 5hrs but till yet not a single time had that time problem. :) :) :) :) :)

Hope my problem is solved. Let's see if its working fine.

Thank you so much all of you for your support and quick reply on post.

Post Reply

Return to “CentOS 5 - Server Support”