LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-13-2017, 06:16 AM   #1
pantdk
Member
 
Registered: Oct 2011
Location: New Delhi
Posts: 231
Blog Entries: 3

Rep: Reputation: 17
NTP server unable to sync


Hi All,

i had created the RHEL6.9 server as a NTP server

i am facing an issue on unsynchronised server. it is out of sync after some time and offset increase which makes the client server also out of sync.

configuration file

[root@NJDMTSVPPROX01 ~]# cat /etc/ntp.conf |grep -v [#^]

driftfile /var/lib/ntp/ntp.drift
logfile /var/log/ntp.log



restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery

restrict 127.0.0.1
restrict -6 ::1

restrict 10.132.10.0 mask 255.255.255.0 nomodify notrap

server 0.us.pool.ntp.org iburst
server 1.us.pool.ntp.org iburst
server 2.us.pool.ntp.org iburst
server 3.us.pool.ntp.org iburst
server 0.ro.pool.ntp.org iburst
server 1.ro.pool.ntp.org iburst
server 2.rhel.pool.ntp.org iburst



includefile /etc/ntp/crypto/pw

keys /etc/ntp/keys




tinker panic 0



[root@ ~]# ntpq -pn
remote refid st t when poll reach delay offset jitter
==============================================================================
132.163.4.101 .NIST. 1 u 21 64 1 54.644 94.563 55.043
+195.21.137.209 195.66.241.3 2 u 20 64 1 2.704 95.144 59.466
+173.255.246.13 207.224.49.219 2 u 19 64 1 78.077 97.007 60.761
74.120.81.219 45.56.123.24 3 u 18 64 1 40.164 96.811 56.992
+94.53.216.184 89.47.39.10 3 u 17 64 1 123.414 96.442 61.422
+82.78.227.6 80.96.120.251 2 u 16 64 1 131.298 91.141 60.437
*218.186.3.36 .GPS. 1 u 15 64 1 257.569 92.414 61.384
[root@ ~]# ntpstat
unsynchronised
polling server every 64 s
[root@ ~]# ntpstat
unsynchronised
polling server every 64 s
[root@ ~]# ntpstat
unsynchronised
polling server every 64 s
[root@ ~]# ntpstat
unsynchronised
polling server every 64 s
[root@ ~]# ntpstat
unsynchronised
polling server every 64 s
[root@ ~]# cat /etc/ntp.conf |grep -i server
# Use public servers from the pool.ntp.org project.
#server 0.rhel.pool.ntp.org iburst
#server 1.rhel.pool.ntp.org iburst
#server 2.rhel.pool.ntp.org iburst
#server 3.rhel.pool.ntp.org iburst
server 0.us.pool.ntp.org iburst
server 1.us.pool.ntp.org iburst
server 2.us.pool.ntp.org iburst
server 3.us.pool.ntp.org iburst
server 0.ro.pool.ntp.org iburst
server 1.ro.pool.ntp.org iburst
server 2.rhel.pool.ntp.org iburst
#broadcast 192.168.1.255 autokey # broadcast server
#broadcast 224.0.1.1 autokey # multicast server
#manycastserver 239.255.254.254 # manycast server
[root@ ~]# ntpdate -u 0.us.pool.ntp.org
13 Jul 06:50:44 ntpdate[21567]: step time server 129.6.15.30 offset 230.144424 sec
[root@ ~]#

[root@ ~]# ntpdate -u 0.us.pool.ntp.org
13 Jul 06:50:44 ntpdate[21567]: step time server 129.6.15.30 offset 230.144424 sec

[root@ ~]# ntpq -pn
remote refid st t when poll reach delay offset jitter
==============================================================================
132.163.4.101 .NIST. 1 u 12 64 1 54.699 33.321 115050.
195.21.137.209 195.66.241.3 2 u 11 64 1 2.612 33.908 102904.
173.255.246.13 207.224.49.219 2 u 10 64 1 78.529 35.795 102904.
74.120.81.219 45.56.123.24 3 u 9 64 1 40.400 35.885 115050.
94.53.216.184 89.47.39.10 3 u 8 64 1 125.488 36.769 102903.
82.78.227.6 80.96.120.253 2 u 7 64 1 131.917 29.807 102903.
218.186.3.36 .GPS. 1 u 5 64 1 259.381 32.068 102903.
You have new mail in /var/spool/mail/root

[root@ ~]# ntpstat
timeout
[root@ ~]# ntpstat
synchronised to NTP server (64.251.26.77) at stratum 3
time correct to within 329 ms
polling server every 64 s
[root@ ~]#

to resolve this issue i have added the ntp server restart & ntpdate command in cron
*/5 * * * * service ntpd restart;sleep 60; ntpdate -u 0.us.pool.ntp.org
*/2 * * * * sh /root/test.sh >> /root/log.txt

You have new mail in /var/spool/mail/root
[root@ ~]#


[root@ ~]# ntpq -pn
remote refid st t when poll reach delay offset jitter
==============================================================================
108.61.56.35 18.26.4.105 2 u 4971 64 7 3.471 -2.788 174756.
66.228.42.59 211.172.242.174 3 u 4971 64 17 3.476 -4.453 174756.
*129.6.15.29 .NIST. 1 u 4971 64 17 10.195 -4.093 2.380
82.77.52.43 194.102.58.173 3 u 4971 64 37 132.676 -7.132 174756.
+89.36.93.9 80.96.120.253 2 u 4971 64 17 116.055 -3.976 2.333
172.104.34.215 179.43.76.147 2 u 4971 64 37 240.543 -6.350 174757.
[root@ ~]# ntpq -pn
remote refid st t when poll reach delay offset jitter
==============================================================================
108.61.56.35 18.26.4.105 2 u 4971 64 7 3.471 -2.788 174756.
66.228.42.59 211.172.242.174 3 u 4971 64 17 3.476 -4.453 174756.
*129.6.15.29 .NIST. 1 u 4971 64 17 10.195 -4.093 2.380
82.77.52.43 194.102.58.173 3 u 4971 64 37 132.676 -7.132 174756.
+89.36.93.9 80.96.120.253 2 u 4971 64 17 116.055 -3.976 2.333
172.104.34.215 179.43.76.147 2 u 4971 64 37 240.543 -6.350 174757.
[root@ ~]# date
Thu Jul 13 07:25:09 EDT 2017
[root@ ~]# ntpq -pn
remote refid st t when poll reach delay offset jitter
==============================================================================
108.61.56.35 18.26.4.105 2 u 62 64 177 3.887 230995. 174616.
66.228.42.59 211.172.242.174 3 u 54 64 377 6.180 230992. 174615.
129.6.15.29 .NIST. 1 u 30 64 377 10.303 230993. 174616.
82.77.52.43 194.102.58.173 3 u 21 64 377 133.187 230990. 174616.
89.36.93.9 80.96.120.253 2 u 28 64 377 116.095 230993. 174616.
172.104.34.215 179.43.76.147 2 u 24 64 377 240.697 230991. 174616.
[root@ ~]# ntpq -pn
remote refid st t when poll reach delay offset jitter
==============================================================================
108.61.56.35 18.26.4.105 2 u 64 64 177 3.887 230995. 174616.
66.228.42.59 211.172.242.174 3 u 56 64 377 6.180 230992. 174615.
129.6.15.29 .NIST. 1 u 32 64 377 10.303 230993. 174616.
82.77.52.43 194.102.58.173 3 u 23 64 377 133.187 230990. 174616.
89.36.93.9 80.96.120.253 2 u 30 64 377 116.095 230993. 174616.
172.104.34.215 179.43.76.147 2 u 26 64 377 240.697 230991. 174616.
[root@ ~]#

Last edited by pantdk; 07-13-2017 at 06:39 AM.
 
Old 07-13-2017, 02:42 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 17,100

Rep: Reputation: 2185Reputation: 2185Reputation: 2185Reputation: 2185Reputation: 2185Reputation: 2185Reputation: 2185Reputation: 2185Reputation: 2185Reputation: 2185Reputation: 2185
I can not find anything obviously wrong with the posted configuration file. The server does seem to find the pools and does sync for a period of time but seems to diverge quickly.

Is this a physical or virtual machine?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Debian jessie NTP server sync to windows ntp server question rogzuser Linux - Server 1 09-08-2015 06:19 AM
Unable to get ntp to sync up grob115 Linux - Server 6 02-20-2013 05:22 AM
Unable to sync time NTP server Rohit_4739 Linux - Newbie 5 04-10-2012 08:44 AM
NTP unable to sync jeewiz Linux - Newbie 12 10-24-2011 03:07 PM
NTP server not sync sebash00 Linux - General 6 04-04-2008 01:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration