Results 1 to 5 of 5
We have an Oracle Enterprise Linux virtual machine which isn't syncing with NTP.
The time is behind by several hours, so it was past the 'sanity' threshold. I tried to ...
- 10-14-2009 #1Just Joined!
- Join Date
- Dec 2008
- Posts
- 11
NTP not syncing
We have an Oracle Enterprise Linux virtual machine which isn't syncing with NTP.
The time is behind by several hours, so it was past the 'sanity' threshold. I tried to manually re-sync the time with 'ntpd -gq', but this did not work either. When executing this command, the log file generated the following messages:
My ntp.conf file looks like this:Code:Oct 14 05:46:08 serverName ntpd[865]: precision = 2.000 usec Oct 14 05:46:08 serverName ntpd[865]: bind() fd 16, family 2, port 123, addr 0.0.0.0, in_classd=0 flags=9 fails: Address already in use Oct 14 05:46:08 serverName ntpd[865]: bind() fd 16, family 10, port 123, scope 0, addr ::, in6_is_addr_multicast=0 flags=1 fails: Address already in use Oct 14 05:46:08 serverName ntpd[865]: bind() fd 16, family 10, port 123, scope 0, addr ::1, in6_is_addr_multicast=0 flags=1 fails: Address already in use Oct 14 05:46:08 serverName ntpd[865]: bind() fd 16, family 10, port 123, scope 3, addr fe80::216:3eff:fe2d:d213, in6_is_addr_multicast=0 flags=1 fails: Address already in use Oct 14 05:46:08 serverName ntpd[865]: bind() fd 16, family 2, port 123, addr 127.0.0.1, in_classd=0 flags=5 fails: Address already in use Oct 14 05:46:08 serverName ntpd[865]: bind() fd 16, family 2, port 123, addr 172.16.205.209, in_classd=0 flags=25 fails: Address already in use Oct 14 05:46:08 serverName ntpd[865]: kernel time sync status 0040 Oct 14 05:46:08 serverName ntpd[865]: frequency initialized 79.636 PPM from /var/lib/ntp/drift Oct 14 05:46:09 serverName ntpd[865]: sendto(172.16.200.251) (fd=-1): Bad file descriptor Oct 14 05:46:10 serverName ntpd[865]: sendto(172.16.1.251) (fd=-1): Bad file descriptor Oct 14 05:46:11 serverName ntpd[865]: sendto(172.16.200.251) (fd=-1): Bad file descriptor Oct 14 05:46:12 serverName ntpd[865]: sendto(172.16.1.251) (fd=-1): Bad file descriptor Oct 14 05:46:13 serverName ntpd[865]: sendto(172.16.200.251) (fd=-1): Bad file descriptor Oct 14 05:46:14 serverName ntpd[865]: sendto(172.16.1.251) (fd=-1): Bad file descriptor Oct 14 05:46:15 serverName ntpd[865]: sendto(172.16.200.251) (fd=-1): Bad file descriptor Oct 14 05:46:16 serverName ntpd[865]: sendto(172.16.1.251) (fd=-1): Bad file descriptor Oct 14 05:46:17 serverName ntpd[865]: sendto(172.16.200.251) (fd=-1): Bad file descriptor Oct 14 05:46:18 serverName ntpd[865]: sendto(172.16.1.251) (fd=-1): Bad file descriptor Oct 14 05:46:19 serverName ntpd[865]: sendto(172.16.200.251) (fd=-1): Bad file descriptor Oct 14 05:46:20 serverName ntpd[865]: sendto(172.16.1.251) (fd=-1): Bad file descriptor Oct 14 05:46:21 serverName ntpd[865]: sendto(172.16.200.251) (fd=-1): Bad file descriptor Oct 14 05:46:22 serverName ntpd[865]: sendto(172.16.1.251) (fd=-1): Bad file descriptor Oct 14 05:46:23 serverName ntpd[865]: sendto(172.16.200.251) (fd=-1): Bad file descriptor Oct 14 05:46:24 serverName ntpd[865]: sendto(172.16.1.251) (fd=-1): Bad file descriptor Oct 14 05:46:25 serverName ntpd[865]: sendto(172.16.200.251) (fd=-1): Bad file descriptor Oct 14 05:46:26 serverName ntpd[865]: no reply; clock not set
The command 'ntpq -p' displays:Code:restrict default kod nomodify notrap nopeer noquery restrict 127.0.0.1 fudge 127.127.1.0 stratum 10 driftfile /var/lib/ntp/drift keys /etc/ntp/keys server NTPserver1.our.domain restrict NTPserver1.our.domain mask 255.255.255.255 nomodify notrap noquery server NTPserver2.our.domain restrict NTPserver2.our.domain mask 255.255.255.255 nomodify notrap noquery
Occasionally, the message log also shows the following messages:# ntpq -p
remote refid st t when poll reach delay offset jitter
================================================== ============================
+NTPserver1.our.domain 192.43.244.18 2 u 22 64 77 0.253 1785987 35.086
*NTPserver2.our.domain 172.16.200.251 3 u 61 64 77 0.446 1785990 13.532
But the time still isn't reset, despite the fact that it seems to acknowledge that it knows it is off.Code:Oct 14 05:18:00 serverName ntpd[30673]: time reset +17860.166397 s Oct 14 05:22:53 serverName ntpd[30673]: synchronized to 172.16.200.251, stratum 2
Any help is appreciated.
- 10-15-2009 #2Just Joined!
- Join Date
- Oct 2009
- Posts
- 1
NTP not syncing
Add the following commands in crontab
crontab -e
Syntax : */5 * * * * /usr/sbin/ntpdate -u time server ip
Example : */5 * * * * /usr/sbin/ntpdate -u 10.58.21.6
- 10-15-2009 #3Just Joined!
- Join Date
- Dec 2008
- Posts
- 11
I had tried running the ntpdate command also, but this doesn't work either.
- 10-15-2009 #4Just Joined!
- Join Date
- Dec 2008
- Posts
- 11
I figured this out. The time was off on the VM, because the Oracle VM physical host had the incorrect time. I would think that the VM would still sync to NTP regardless of the physical host, but I guess not.
- 10-15-2009 #5Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
A VM can sync to an external NTP server, but usually the VM is configured to sync to the host. In any case, you should make sure that all systems on your network are sync'd to a local NTP server which in turn is sync'd to a well known external NTP server such as one of the ones hosted by NIST or ntp.org (if you have more than a few local systems), or directly to an external NTP server (if you only have a few local systems). If you don't do that, then timestamps on local and shared files/directories etc will be incorrect and can cause problems with any number of applications that use the timestamps for activity triggering.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote