luffywallis |
01-09-2013 08:50 AM |
ntpd problem with CentOs 5.8
Hi
i'm stuck with a problem with ntp. i want to synchronize the time of my centos VM (hyper-V) with a windows Domain Controller.
i tried this config on my ntp.conf:
Code:
# Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery
# Permit all access over the loopback interface. This could
# be tightened as well, but to do so would effect some of
# the administrative functions.
restrict 127.0.0.1
restrict -6 ::1
# Hosts on local network are less restricted.
#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
#server 0.centos.pool.ntp.org
#server 1.centos.pool.ntp.org
#server 2.centos.pool.ntp.org
#server 192.168.10.251 burst iburst minpoll 4 maxpoll 4
server 192.168.10.251
server 192.168.10.242 burst iburst
#broadcast 192.168.1.255 key 42 # broadcast server
#broadcastclient # broadcast client
#broadcast 224.0.1.1 key 42 # multicast server
#multicastclient 224.0.1.1 # multicast client
#manycastserver 239.255.254.254 # manycast server
#manycastclient 239.255.254.254 key 42 # manycast client
# Undisciplined Local Clock. This is a fake driver intended for backup
# and when no outside source of synchronized time is available.
#server 127.127.1.0 # local clock
#fudge 127.127.1.0 stratum 10
#fudge 192.168.10.251
# Drift file. Put this in a directory which the daemon can write to.
# No symbolic links allowed, either, since the daemon updates the file
# by creating a temporary in the same directory and then rename()'ing
# it to the file.
driftfile /var/lib/ntp/drift
# Key file containing the keys and key identifiers used when operating
# with symmetric key cryptography.
keys /etc/ntp/keys
# Specify the key identifiers which are trusted.
#trustedkey 4 8 42
# Specify the key identifier to use with the ntpdc utility.
#requestkey 8
# Specify the key identifier to use with the ntpq utility.
#controlkey 8
#log configuration
logfile /var/log/ntpd.log
when i do a ntpq -p
Code:
[root@nagios log]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
srvdc.domain.com .LOCL. 1 u 17 64 377 0.818 -66746. 11626.4
srvsecdc.domain. 192.168.10.251 2 u 2 64 377 0.658 -85287. 302.901
weird thing i don't have an asterisk (*)
when i add localhost as a server on ntp.conf, the asterisk appears on localhost
on my ntpd.log i have
Code:
[root@nagios log]# cat /var/log/ntpd.log
9 Jan 13:20:52 ntpd[3575]: synchronized to LOCAL(0), stratum 10
9 Jan 13:20:52 ntpd[3575]: kernel time sync enabled 0001
9 Jan 13:28:28 ntpd[3575]: ntpd exiting on signal 15
9 Jan 13:38:48 ntpd[4355]: ntpd exiting on signal 15
9 Jan 15:08:23 ntpd[5129]: ntpd exiting on signal 15
9 Jan 15:16:31 ntpd[12463]: ntpd exiting on signal 15
9 Jan 15:18:01 ntpd[13175]: ntpd exiting on signal 15
when i do a grep ntpd /var/log/messages*
Code:
Jan 8 14:58:45 nagios ntpd[2944]: ntpd 4.2.2p1@1.1570-o Fri Nov 18 13:21:21 UTC 2011 (1)
Jan 8 14:58:47 nagios ntpd[2945]: precision = 1.000 usec
Jan 8 14:58:47 nagios ntpd[2945]: Listening on interface wildcard, 0.0.0.0#123 Disabled
Jan 8 14:58:47 nagios ntpd[2945]: Listening on interface wildcard, ::#123 Disabled
Jan 8 14:58:47 nagios ntpd[2945]: Listening on interface lo, ::1#123 Enabled
Jan 8 14:58:47 nagios ntpd[2945]: Listening on interface eth0, fe80::215:5dff:fe05:e010#123 Enabled
Jan 8 14:58:47 nagios ntpd[2945]: Listening on interface lo, 127.0.0.1#123 Enabled
Jan 8 14:58:47 nagios ntpd[2945]: Listening on interface eth0, 192.168.5.240#123 Enabled
Jan 8 14:58:47 nagios ntpd[2945]: kernel time sync status 0040
Jan 8 15:02:27 nagios ntpd[2945]: synchronized to LOCAL(0), stratum 10
Jan 8 15:05:16 nagios ntpd[2945]: ntpd exiting on signal 15
Jan 8 15:03:02 nagios ntpd[4026]: ntpd 4.2.2p1@1.1570-o Fri Nov 18 13:21:21 UTC 2011 (1)
Jan 8 15:03:02 nagios ntpd[4027]: precision = 1.000 usec
Jan 8 15:03:02 nagios ntpd[4027]: Listening on interface wildcard, 0.0.0.0#123 Disabled
Jan 8 15:03:02 nagios ntpd[4027]: Listening on interface wildcard, ::#123 Disabled
Jan 8 15:03:02 nagios ntpd[4027]: Listening on interface lo, ::1#123 Enabled
Jan 8 15:03:02 nagios ntpd[4027]: Listening on interface eth0, fe80::215:5dff:fe05:e010#123 Enabled
Jan 8 15:03:02 nagios ntpd[4027]: Listening on interface lo, 127.0.0.1#123 Enabled
Jan 8 15:03:02 nagios ntpd[4027]: Listening on interface eth0, 192.168.5.240#123 Enabled
Jan 8 15:03:02 nagios ntpd[4027]: kernel time sync status 0040
Jan 8 15:03:16 nagios ntpd[4027]: frequency initialized 0.000 PPM from /var/lib/ntp/drift
Jan 8 15:06:33 nagios ntpd[4027]: synchronized to LOCAL(0), stratum 10
Jan 8 15:06:33 nagios ntpd[4027]: kernel time sync enabled 0001
Jan 8 15:51:26 nagios ntpd[4027]: ntpd exiting on signal 15
Jan 8 15:56:01 nagios ntpd[1934]: ntpd 4.2.2p1@1.1570-o Fri Nov 18 13:21:21 UTC 2011 (1)
Jan 8 15:56:01 nagios ntpd[1935]: precision = 1.000 usec
Jan 8 15:56:01 nagios ntpd[1935]: Listening on interface wildcard, 0.0.0.0#123 Disabled
Jan 8 15:56:01 nagios ntpd[1935]: Listening on interface wildcard, ::#123 Disabled
Jan 8 15:56:01 nagios ntpd[1935]: Listening on interface lo, ::1#123 Enabled
Jan 8 15:56:01 nagios ntpd[1935]: Listening on interface eth0, fe80::215:5dff:fe05:e010#123 Enabled
Jan 8 15:56:01 nagios ntpd[1935]: Listening on interface lo, 127.0.0.1#123 Enabled
Jan 8 15:56:01 nagios ntpd[1935]: Listening on interface eth0, 192.168.5.240#123 Enabled
Jan 8 15:56:01 nagios ntpd[1935]: kernel time sync status 0040
Jan 8 15:56:05 nagios ntpd[1935]: frequency initialized 0.000 PPM from /var/lib/ntp/drift
Jan 8 15:59:29 nagios ntpd[1935]: synchronized to LOCAL(0), stratum 10
Jan 8 15:59:29 nagios ntpd[1935]: kernel time sync enabled 0001
Jan 9 10:44:16 nagios ntpd[1935]: ntpd exiting on signal 15
Jan 9 10:01:26 nagios ntpd[22640]: ntpd 4.2.2p1@1.1570-o Fri Nov 18 13:21:21 UTC 2011 (1)
Jan 9 10:01:26 nagios ntpd[22641]: precision = 1.000 usec
Jan 9 10:01:26 nagios ntpd[22641]: Listening on interface wildcard, 0.0.0.0#123 Disabled
Jan 9 10:01:26 nagios ntpd[22641]: Listening on interface wildcard, ::#123 Disabled
Jan 9 10:01:26 nagios ntpd[22641]: Listening on interface lo, ::1#123 Enabled
Jan 9 10:01:26 nagios ntpd[22641]: Listening on interface eth0, fe80::215:5dff:fe05:e010#123 Enabled
Jan 9 10:01:26 nagios ntpd[22641]: Listening on interface lo, 127.0.0.1#123 Enabled
Jan 9 10:01:26 nagios ntpd[22641]: Listening on interface eth0, 192.168.5.240#123 Enabled
Jan 9 10:01:26 nagios ntpd[22641]: kernel time sync status 0040
Jan 9 10:01:37 nagios ntpd[22641]: frequency initialized 0.000 PPM from /var/lib/ntp/drift
Jan 9 10:04:51 nagios ntpd[22641]: synchronized to LOCAL(0), stratum 10
Jan 9 10:04:51 nagios ntpd[22641]: kernel time sync enabled 0001
Jan 9 11:47:36 nagios ntpd[22641]: ntpd exiting on signal 15
Jan 9 11:47:36 nagios ntpd[29527]: ntpd 4.2.2p1@1.1570-o Fri Nov 18 13:21:21 UTC 2011 (1)
Jan 9 11:47:36 nagios ntpd[29528]: precision = 1.000 usec
Jan 9 11:47:36 nagios ntpd[29528]: Listening on interface wildcard, 0.0.0.0#123 Disabled
Jan 9 11:47:36 nagios ntpd[29528]: Listening on interface wildcard, ::#123 Disabled
Jan 9 11:47:36 nagios ntpd[29528]: Listening on interface lo, ::1#123 Enabled
Jan 9 11:47:36 nagios ntpd[29528]: Listening on interface eth0, fe80::215:5dff:fe05:e010#123 Enabled
Jan 9 11:47:36 nagios ntpd[29528]: Listening on interface lo, 127.0.0.1#123 Enabled
Jan 9 11:47:36 nagios ntpd[29528]: Listening on interface eth0, 192.168.5.240#123 Enabled
Jan 9 11:47:36 nagios ntpd[29528]: kernel time sync status 0040
Jan 9 11:47:45 nagios ntpd[29528]: frequency initialized 0.000 PPM from /var/lib/ntp/drift
Jan 9 11:51:07 nagios ntpd[29528]: synchronized to LOCAL(0), stratum 10
Jan 9 11:51:07 nagios ntpd[29528]: kernel time sync enabled 0001
Jan 9 11:59:44 nagios ntpd[29528]: ntpd exiting on signal 15
Jan 9 11:59:45 nagios ntpd[30499]: ntpd 4.2.2p1@1.1570-o Fri Nov 18 13:21:21 UTC 2011 (1)
Jan 9 11:59:45 nagios ntpd[30500]: precision = 1.000 usec
Jan 9 11:59:45 nagios ntpd[30500]: Listening on interface wildcard, 0.0.0.0#123 Disabled
Jan 9 11:59:45 nagios ntpd[30500]: Listening on interface wildcard, ::#123 Disabled
Jan 9 11:59:45 nagios ntpd[30500]: Listening on interface lo, ::1#123 Enabled
Jan 9 11:59:45 nagios ntpd[30500]: Listening on interface eth0, fe80::215:5dff:fe05:e010#123 Enabled
Jan 9 11:59:45 nagios ntpd[30500]: Listening on interface lo, 127.0.0.1#123 Enabled
Jan 9 11:59:45 nagios ntpd[30500]: Listening on interface eth0, 192.168.5.240#123 Enabled
Jan 9 11:59:45 nagios ntpd[30500]: kernel time sync status 0040
Jan 9 11:59:45 nagios ntpd[30500]: frequency initialized 0.000 PPM from /var/lib/ntp/drift
Jan 9 12:02:59 nagios ntpd[30500]: synchronized to LOCAL(0), stratum 10
Jan 9 12:02:59 nagios ntpd[30500]: kernel time sync enabled 0001
Jan 9 12:56:45 nagios ntpd[30500]: ntpd exiting on signal 15
Jan 9 12:56:46 nagios ntpd[2156]: ntpd 4.2.2p1@1.1570-o Fri Nov 18 13:21:21 UTC 2011 (1)
Jan 9 12:56:46 nagios ntpd[2158]: precision = 1.000 usec
Jan 9 12:56:46 nagios ntpd[2158]: Listening on interface wildcard, 0.0.0.0#123 Disabled
Jan 9 12:56:46 nagios ntpd[2158]: Listening on interface wildcard, ::#123 Disabled
Jan 9 12:56:46 nagios ntpd[2158]: Listening on interface lo, ::1#123 Enabled
Jan 9 12:56:46 nagios ntpd[2158]: Listening on interface eth0, fe80::215:5dff:fe05:e010#123 Enabled
Jan 9 12:56:46 nagios ntpd[2158]: Listening on interface lo, 127.0.0.1#123 Enabled
Jan 9 12:56:46 nagios ntpd[2158]: Listening on interface eth0, 192.168.5.240#123 Enabled
Jan 9 12:56:46 nagios ntpd[2158]: kernel time sync status 0040
Jan 9 12:56:46 nagios ntpd[2158]: frequency initialized 0.000 PPM from /var/lib/ntp/drift
Jan 9 12:58:38 nagios ntpd[2158]: ntpd exiting on signal 15
Jan 9 12:58:39 nagios ntpd[2314]: ntpd 4.2.2p1@1.1570-o Fri Nov 18 13:21:21 UTC 2011 (1)
Jan 9 12:58:39 nagios ntpd[2315]: precision = 1.000 usec
Jan 9 12:58:39 nagios ntpd[2315]: Listening on interface wildcard, 0.0.0.0#123 Disabled
Jan 9 12:58:39 nagios ntpd[2315]: Listening on interface wildcard, ::#123 Disabled
Jan 9 12:58:39 nagios ntpd[2315]: Listening on interface lo, ::1#123 Enabled
Jan 9 12:58:39 nagios ntpd[2315]: Listening on interface eth0, fe80::215:5dff:fe05:e010#123 Enabled
Jan 9 12:58:39 nagios ntpd[2315]: Listening on interface lo, 127.0.0.1#123 Enabled
Jan 9 12:58:39 nagios ntpd[2315]: Listening on interface eth0, 192.168.5.240#123 Enabled
Jan 9 12:58:39 nagios ntpd[2315]: kernel time sync status 0040
Jan 9 12:58:39 nagios ntpd[2315]: 192.168.5.251 is inappropriate address for the fudge command, line ignored
Jan 9 12:58:39 nagios ntpd[2315]: frequency initialized 0.000 PPM from /var/lib/ntp/drift
Jan 9 13:03:34 nagios ntpd[2315]: ntpd exiting on signal 15
Jan 9 13:03:34 nagios ntpd[2658]: ntpd 4.2.2p1@1.1570-o Fri Nov 18 13:21:21 UTC 2011 (1)
Jan 9 13:03:34 nagios ntpd[2659]: precision = 1.000 usec
Jan 9 13:03:34 nagios ntpd[2659]: Listening on interface wildcard, 0.0.0.0#123 Disabled
Jan 9 13:03:34 nagios ntpd[2659]: Listening on interface wildcard, ::#123 Disabled
Jan 9 13:03:34 nagios ntpd[2659]: Listening on interface lo, ::1#123 Enabled
Jan 9 13:03:34 nagios ntpd[2659]: Listening on interface eth0, fe80::215:5dff:fe05:e010#123 Enabled
Jan 9 13:03:34 nagios ntpd[2659]: Listening on interface lo, 127.0.0.1#123 Enabled
Jan 9 13:03:34 nagios ntpd[2659]: Listening on interface eth0, 192.168.5.240#123 Enabled
Jan 9 13:03:34 nagios ntpd[2659]: kernel time sync status 0040
Jan 9 13:03:34 nagios ntpd[2659]: frequency initialized 0.000 PPM from /var/lib/ntp/drift
Jan 9 13:06:51 nagios ntpd[2659]: synchronized to LOCAL(0), stratum 10
Jan 9 13:06:51 nagios ntpd[2659]: kernel time sync enabled 0001
Jan 9 13:17:37 nagios ntpd[2659]: ntpd exiting on signal 15
Jan 9 13:17:38 nagios ntpd[3574]: ntpd 4.2.2p1@1.1570-o Fri Nov 18 13:21:21 UTC 2011 (1)
Jan 9 13:17:38 nagios ntpd[3575]: precision = 1.000 usec
Jan 9 13:17:38 nagios ntpd[3575]: Listening on interface wildcard, 0.0.0.0#123 Disabled
Jan 9 13:17:38 nagios ntpd[3575]: Listening on interface wildcard, ::#123 Disabled
Jan 9 13:17:38 nagios ntpd[3575]: Listening on interface lo, ::1#123 Enabled
Jan 9 13:17:38 nagios ntpd[3575]: Listening on interface eth0, fe80::215:5dff:fe05:e010#123 Enabled
Jan 9 13:17:38 nagios ntpd[3575]: Listening on interface lo, 127.0.0.1#123 Enabled
Jan 9 13:17:38 nagios ntpd[3575]: Listening on interface eth0, 192.168.5.240#123 Enabled
Jan 9 13:17:38 nagios ntpd[3575]: kernel time sync status 0040
Jan 9 13:17:38 nagios ntpd[3575]: frequency initialized 0.000 PPM from /var/lib/ntp/drift
Jan 9 13:28:28 nagios ntpd[4354]: ntpd 4.2.2p1@1.1570-o Fri Nov 18 13:21:21 UTC 2011 (1)
Jan 9 13:28:28 nagios ntpd[4355]: precision = 1.000 usec
Jan 9 13:28:28 nagios ntpd[4355]: Listening on interface wildcard, 0.0.0.0#123 Disabled
Jan 9 13:28:28 nagios ntpd[4355]: Listening on interface wildcard, ::#123 Disabled
Jan 9 13:28:28 nagios ntpd[4355]: Listening on interface lo, ::1#123 Enabled
Jan 9 13:28:28 nagios ntpd[4355]: Listening on interface eth0, fe80::215:5dff:fe05:e010#123 Enabled
Jan 9 13:28:28 nagios ntpd[4355]: Listening on interface lo, 127.0.0.1#123 Enabled
Jan 9 13:28:28 nagios ntpd[4355]: Listening on interface eth0, 192.168.5.240#123 Enabled
Jan 9 13:28:28 nagios ntpd[4355]: kernel time sync status 0040
Jan 9 13:28:28 nagios ntpd[4355]: frequency initialized 0.000 PPM from /var/lib/ntp/drift
Jan 9 13:38:48 nagios ntpd[5128]: ntpd 4.2.2p1@1.1570-o Fri Nov 18 13:21:21 UTC 2011 (1)
Jan 9 13:38:48 nagios ntpd[5129]: precision = 1.000 usec
Jan 9 13:38:48 nagios ntpd[5129]: Listening on interface wildcard, 0.0.0.0#123 Disabled
Jan 9 13:38:48 nagios ntpd[5129]: Listening on interface wildcard, ::#123 Disabled
Jan 9 13:38:48 nagios ntpd[5129]: Listening on interface lo, ::1#123 Enabled
Jan 9 13:38:48 nagios ntpd[5129]: Listening on interface eth0, fe80::215:5dff:fe05:e010#123 Enabled
Jan 9 13:38:48 nagios ntpd[5129]: Listening on interface lo, 127.0.0.1#123 Enabled
Jan 9 13:38:48 nagios ntpd[5129]: Listening on interface eth0, 192.168.5.240#123 Enabled
Jan 9 13:38:48 nagios ntpd[5129]: kernel time sync status 0040
Jan 9 13:38:48 nagios ntpd[5129]: frequency initialized 0.000 PPM from /var/lib/ntp/drift
Jan 9 15:08:23 nagios ntpd[12462]: ntpd 4.2.2p1@1.1570-o Fri Nov 18 13:21:21 UTC 2011 (1)
Jan 9 15:08:23 nagios ntpd[12463]: precision = 1.000 usec
Jan 9 15:08:23 nagios ntpd[12463]: Listening on interface wildcard, 0.0.0.0#123 Disabled
Jan 9 15:08:23 nagios ntpd[12463]: Listening on interface wildcard, ::#123 Disabled
Jan 9 15:08:23 nagios ntpd[12463]: Listening on interface lo, ::1#123 Enabled
Jan 9 15:08:23 nagios ntpd[12463]: Listening on interface eth0, fe80::215:5dff:fe05:e010#123 Enabled
Jan 9 15:08:23 nagios ntpd[12463]: Listening on interface lo, 127.0.0.1#123 Enabled
Jan 9 15:08:23 nagios ntpd[12463]: Listening on interface eth0, 192.168.5.240#123 Enabled
Jan 9 15:08:23 nagios ntpd[12463]: kernel time sync status 0040
Jan 9 15:08:23 nagios ntpd[12463]: frequency initialized 0.000 PPM from /var/lib/ntp/drift
Jan 9 15:16:31 nagios ntpd[13174]: ntpd 4.2.2p1@1.1570-o Fri Nov 18 13:21:21 UTC 2011 (1)
Jan 9 15:16:31 nagios ntpd[13175]: precision = 1.000 usec
Jan 9 15:16:31 nagios ntpd[13175]: Listening on interface wildcard, 0.0.0.0#123 Disabled
Jan 9 15:16:31 nagios ntpd[13175]: Listening on interface wildcard, ::#123 Disabled
Jan 9 15:16:31 nagios ntpd[13175]: Listening on interface lo, ::1#123 Enabled
Jan 9 15:16:31 nagios ntpd[13175]: Listening on interface eth0, fe80::215:5dff:fe05:e010#123 Enabled
Jan 9 15:16:31 nagios ntpd[13175]: Listening on interface lo, 127.0.0.1#123 Enabled
Jan 9 15:16:31 nagios ntpd[13175]: Listening on interface eth0, 192.168.5.240#123 Enabled
Jan 9 15:16:31 nagios ntpd[13175]: kernel time sync status 0040
Jan 9 15:16:31 nagios ntpd[13175]: frequency initialized 0.000 PPM from /var/lib/ntp/drift
Jan 9 15:05:29 nagios ntpd[13372]: ntpd 4.2.2p1@1.1570-o Fri Nov 18 13:21:21 UTC 2011 (1)
Jan 9 15:05:29 nagios ntpd[13373]: precision = 1.000 usec
Jan 9 15:05:29 nagios ntpd[13373]: Listening on interface wildcard, 0.0.0.0#123 Disabled
Jan 9 15:05:29 nagios ntpd[13373]: Listening on interface wildcard, ::#123 Disabled
Jan 9 15:05:29 nagios ntpd[13373]: Listening on interface lo, ::1#123 Enabled
Jan 9 15:05:29 nagios ntpd[13373]: Listening on interface eth0, fe80::215:5dff:fe05:e010#123 Enabled
Jan 9 15:05:29 nagios ntpd[13373]: Listening on interface lo, 127.0.0.1#123 Enabled
Jan 9 15:05:29 nagios ntpd[13373]: Listening on interface eth0, 192.168.5.240#123 Enabled
Jan 9 15:05:29 nagios ntpd[13373]: kernel time sync status 0040
Jan 9 15:05:29 nagios ntpd[13373]: frequency initialized 0.000 PPM from /var/lib/ntp/drift
the time on this server is going too fast to the future. when i do a cronjob to start ntp manually to synchronize, i have a problem this nagios checks..
The server is synchronized only when trying this:
Code:
service ntpd stop
ntpdate 192.168.10.242
any ideas? thanks
|