Time synchronization problem
Time synchronization problem
Hi,
I have two server with CentOS 5.5(32-bit) and 6.2(64-bit). On both server time zone is same and also time was same at configuration time. I have installed Asterisk on 5.5 CentOS and Apache and PHP on CentOS 6.2.
On both server time zone is same and everything configured same in time zone configuration. Problem is both server don't have same time. Some time its showing same time and some time difference going 5sec to 1min and automatically its coming same. When time difference coming then I am not able to use Asterisk so everything going stopped.
I am using date command to check time and I can see time difference. I have also tried with PHP code to see both server time. DB, PHP and Asterisk time. In every time, getting 5sec to 1min difference. Some time all showing same. Both server located on same location and connected in same switch. There is no delay to reach both server.
Any one please help me. Why have time difference if both server have same time zone.
I have two server with CentOS 5.5(32-bit) and 6.2(64-bit). On both server time zone is same and also time was same at configuration time. I have installed Asterisk on 5.5 CentOS and Apache and PHP on CentOS 6.2.
On both server time zone is same and everything configured same in time zone configuration. Problem is both server don't have same time. Some time its showing same time and some time difference going 5sec to 1min and automatically its coming same. When time difference coming then I am not able to use Asterisk so everything going stopped.
I am using date command to check time and I can see time difference. I have also tried with PHP code to see both server time. DB, PHP and Asterisk time. In every time, getting 5sec to 1min difference. Some time all showing same. Both server located on same location and connected in same switch. There is no delay to reach both server.
Any one please help me. Why have time difference if both server have same time zone.
Re: Time time synchronization problem
I have tried to configure same time zone using tzselect command. Also I have tried to modify /usr/share/zoneinfo/$ZONEINFO but always getting same problem. Its working 1hrs or 2hrs without any time difference and after some difference coming and automatically working.
-
- Posts: 10642
- Joined: 2005/08/05 15:19:54
- Location: Northern Illinois, USA
Re: Time time synchronization problem
Both are badly in need of a 'yum update'.
-
- Posts: 519
- Joined: 2012/06/26 14:20:47
Re: Time time synchronization problem
You can configure and run the NTP daemon ntpd to synchronise the time.
Re: Time time synchronization problem
Hi stevemowbray,
Can you please guide me to run NTP?
Can you please guide me to run NTP?
Re: Time time synchronization problem
Hi gerald_clark,
If I will run yum update then I think it will my OS (CentOS 5.5 to 6.5) that I can't do because my application Asterisk not supportable with latest CentOS version.
If I will run yum update then I think it will my OS (CentOS 5.5 to 6.5) that I can't do because my application Asterisk not supportable with latest CentOS version.
-
- Posts: 10642
- Joined: 2005/08/05 15:19:54
- Location: Northern Illinois, USA
Re: Time time synchronization problem
5.5 will only update to 5.10, not 6.5.
The system-config-date gui application will configure ntpd.
The system-config-date gui application will configure ntpd.
Re: Time time synchronization problem
There is some limitation in application so I am not able to update my OS.gerald_clark wrote:5.5 will only update to 5.10, not 6.5.
I have already used this command configured but still same....gerald_clark wrote: The system-config-date gui application will configure ntpd.
Re: Time time synchronization problem
Try this on both:
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
Code: Select all
yum install ntp
service ntpd start
chkconfig ntpd on
If you are already running ntpd, please provide the output of ntpq -pn
Re: Time time synchronization problem
Hi avij,
I have ntp was installed on my server. Just I have started this service. Hope it will solve this problem. I will keep you posted my update.
I have ntp was installed on my server. Just I have started this service. Hope it will solve this problem. I will keep you posted my update.