NTP issue
Posted: 2019/04/12 09:35:17
Hello gentlemen,
I have the trouble with ntp syncronization. There is two servers, ntp.conf the same, but first syncronized succesfully, second is not.
ntp.conf:
For more information about this file, see the man pages
ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5).
driftfile /var/lib/ntp/drift
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.rhel.pool.ntp.org #server 1.rhel.pool.ntp.org #server 2.rhel.pool.ntp.org
server 10.144.18.133
server 10.191.0.65
server 10.144.18.165
server 10.144.6.1
#broadcast 192.168.1.255 autokey # broadcast server #broadcastclient # broadcast client #broadcast 224.0.1.1 autokey # multicast server #multicastclient 224.0.1.1 # multicast client #manycastserver 239.255.254.254 # manycast server #manycastclient 239.255.254.254 autokey # 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
Enable public key cryptography.
#crypto
includefile /etc/ntp/crypto/pw
logfile /var/log/ntpstats/ntp1.log
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
Enable writing of statistics records.
#statistics clockstats cryptostats loopstats peerstats
ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
10.144.18.133 0.0.0.0 1 u 48 64 1 1.145 10904.3 0.000
10.191.0.65 10.144.18.133 2 u 47 64 1 0.534 11015.3 0.000
10.144.18.165 0.0.0.0 1 u 46 64 1 1.623 11126.3 0.000
10.144.6.1 10.191.0.65 3 u 45 64 1 0.500 11237.5 0.000
Ntp logs:
cat /var/log/ntpstats/ntp1.log
11 Apr 21:21:25 ntpd[3901]: ntpd exiting on signal 15
11 Apr 21:22:21 ntpd[3928]: ntpd exiting on signal 15
System logs more:
Apr 11 22:32:42 ntpd[3956]: ntpd 4.2.4p8@1.1612-o Wed Aug 25 13:54:50 UTC 2010 (1)
Apr 11 22:32:42 ntpd[3958]: precision = 0.059 usec
Apr 11 22:32:42 ntpd[3958]: Listening on interface #0 wildcard, 0.0.0.0#123 Disabled
Apr 11 22:32:42 ntpd[3958]: Listening on interface #1 wildcard, ::#123 Disabled
Apr 11 22:32:42 ntpd[3958]: Listening on interface #2 eth0, fe80::20c:29ff:fe28:cca4#123 Enabled
Apr 11 22:32:42 ntpd[3958]: Listening on interface #3 lo, ::1#123 Enabled
Apr 11 22:32:42 ntpd[3958]: Listening on interface #4 eth1, fe80::20c:29ff:fe28:ccae#123 Enabled
Apr 11 22:32:42 ntpd[3958]: Listening on interface #5 lo, 127.0.0.1#123 Enabled
Apr 11 22:32:42 ntpd[3958]: Listening on interface #6 eth0, 10.144.6.33#123 Enabled
Apr 11 22:32:42 ntpd[3958]: Listening on interface #7 eth1, 217.118.72.58#123 Enabled
Apr 11 22:32:42 ntpd[3958]: Listening on routing socket on fd #24 for interface updates
Apr 11 22:32:42 ntpd[3958]: kernel time sync status 2040
Apr 11 22:32:42 ntpd[3958]: frequency initialized 123.949 PPM from /var/lib/ntp/drift
Also, i found interesting moment, hwclock --systohc after manualy syncronizing with, for example, 10.144.18.133 this server works fine but after ~4 minutes sys time late about 20 sec. Аnd lags behind more over time. Doesn't matter ntpd enable or not.
Thank's!
I have the trouble with ntp syncronization. There is two servers, ntp.conf the same, but first syncronized succesfully, second is not.
ntp.conf:
For more information about this file, see the man pages
ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5).
driftfile /var/lib/ntp/drift
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.rhel.pool.ntp.org #server 1.rhel.pool.ntp.org #server 2.rhel.pool.ntp.org
server 10.144.18.133
server 10.191.0.65
server 10.144.18.165
server 10.144.6.1
#broadcast 192.168.1.255 autokey # broadcast server #broadcastclient # broadcast client #broadcast 224.0.1.1 autokey # multicast server #multicastclient 224.0.1.1 # multicast client #manycastserver 239.255.254.254 # manycast server #manycastclient 239.255.254.254 autokey # 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
Enable public key cryptography.
#crypto
includefile /etc/ntp/crypto/pw
logfile /var/log/ntpstats/ntp1.log
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
Enable writing of statistics records.
#statistics clockstats cryptostats loopstats peerstats
ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
10.144.18.133 0.0.0.0 1 u 48 64 1 1.145 10904.3 0.000
10.191.0.65 10.144.18.133 2 u 47 64 1 0.534 11015.3 0.000
10.144.18.165 0.0.0.0 1 u 46 64 1 1.623 11126.3 0.000
10.144.6.1 10.191.0.65 3 u 45 64 1 0.500 11237.5 0.000
Ntp logs:
cat /var/log/ntpstats/ntp1.log
11 Apr 21:21:25 ntpd[3901]: ntpd exiting on signal 15
11 Apr 21:22:21 ntpd[3928]: ntpd exiting on signal 15
System logs more:
Apr 11 22:32:42 ntpd[3956]: ntpd 4.2.4p8@1.1612-o Wed Aug 25 13:54:50 UTC 2010 (1)
Apr 11 22:32:42 ntpd[3958]: precision = 0.059 usec
Apr 11 22:32:42 ntpd[3958]: Listening on interface #0 wildcard, 0.0.0.0#123 Disabled
Apr 11 22:32:42 ntpd[3958]: Listening on interface #1 wildcard, ::#123 Disabled
Apr 11 22:32:42 ntpd[3958]: Listening on interface #2 eth0, fe80::20c:29ff:fe28:cca4#123 Enabled
Apr 11 22:32:42 ntpd[3958]: Listening on interface #3 lo, ::1#123 Enabled
Apr 11 22:32:42 ntpd[3958]: Listening on interface #4 eth1, fe80::20c:29ff:fe28:ccae#123 Enabled
Apr 11 22:32:42 ntpd[3958]: Listening on interface #5 lo, 127.0.0.1#123 Enabled
Apr 11 22:32:42 ntpd[3958]: Listening on interface #6 eth0, 10.144.6.33#123 Enabled
Apr 11 22:32:42 ntpd[3958]: Listening on interface #7 eth1, 217.118.72.58#123 Enabled
Apr 11 22:32:42 ntpd[3958]: Listening on routing socket on fd #24 for interface updates
Apr 11 22:32:42 ntpd[3958]: kernel time sync status 2040
Apr 11 22:32:42 ntpd[3958]: frequency initialized 123.949 PPM from /var/lib/ntp/drift
Also, i found interesting moment, hwclock --systohc after manualy syncronizing with, for example, 10.144.18.133 this server works fine but after ~4 minutes sys time late about 20 sec. Аnd lags behind more over time. Doesn't matter ntpd enable or not.
Thank's!