LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 02-09-2019, 03:24 AM   #1
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 690

Rep: Reputation: 34
ntpd inconsistency


Hello

I have several Centos 6.8 servers. Latest version of ntpd (ntp-4.2.6p5-15).

On most of my servers the time is in perfect sync.
Example :
Code:
9 Feb 10:12:37 ntpdate[10141]: adjust time server 149.210.199.182 offset -0.006567 sec
On another server however the time is never in sync, although ntpd is running :
Code:
9 Feb 07:15:12 ntpdate[11103]: step time server 185.99.49.103 offset 5.757200 sec
The only config difference I see is this :
working:
Code:
restrict default kod nomodify notrap nopeer 
restrict -6 default kod nomodify notrap nopeer noquery
not working :
Code:
#restrict default kod nomodify notrap nopeer noquery
#restrict -6 default kod nomodify notrap nopeer noquery
restrict default ignore noquery
This is an install 'out-of-the-box', no modification made to the config file. Only "yum install ntp".
 
Old 02-09-2019, 05:19 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Is ntpd running?
Post the output of the command ntpq -pn
 
Old 02-09-2019, 06:42 AM   #3
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
Quote:
Originally Posted by jonaskellens View Post
On another server however the time is never in sync, although ntpd is running :
ntpd will not update the date/time when the difference is TOO large:
Code:
-g, --panicgate
      Allow the first adjustment to be Big.  This option may appear an unlimited
      number of times.

      Normally, ntpd exits with a message to the system log if the offset exceeds
      the panic threshold, which is 1000s by default. This option allows the time
      to be set to any value without restriction; however, this can happen only
      once.
So make sure the first startup of ntpd (after reboot) has this option added
Code:
CMDLINE="/usr/sbin/ntpd -g" in whatever your system uses to start it
so that a faulty hardware clock doesn't prevent ntpd from working.
 
Old 02-09-2019, 08:53 AM   #4
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 690

Original Poster
Rep: Reputation: 34
Yes ntpd is running.
Code:
[root@41 admin]# ntpq -pn
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 195.200.224.66  .INIT.          16 u    - 1024    0    0.000    0.000   0.000
 51.255.138.215  .INIT.          16 u    - 1024    0    0.000    0.000   0.000
 185.99.49.101   .INIT.          16 u    - 1024    0    0.000    0.000   0.000
 185.99.49.102   .INIT.          16 u    - 1024    0    0.000    0.000   0.000
I always stop ntpd, then run "/usr/sbin/ntpdate pool.ntp.org" and then restart ntpd. So the difference should not be "too large". But after a day or 2, it gets larger...
 
Old 02-09-2019, 09:08 AM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Wait until reach is 177 and post the numbers again.

By default ntpd is configured to use the -g option. Is the computer a real or virtual machine and is it on continuously or does it go to sleep/hibernate?
 
Old 02-18-2019, 07:19 AM   #6
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 690

Original Poster
Rep: Reputation: 34
While clock is again running behind by 10 seconds, 'reach' stays at '0' :
Code:
[root@41 admin]# ntpq -pn
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 4.53.160.75     .INIT.          16 u    - 1024    0    0.000    0.000   0.000
 208.75.89.4     .INIT.          16 u    - 1024    0    0.000    0.000   0.000
 208.67.72.50    .INIT.          16 u    - 1024    0    0.000    0.000   0.000
 216.230.228.242 .INIT.          16 u    - 1024    0    0.000    0.000   0.000
 
Old 02-18-2019, 08:00 AM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
It looks like ntp is never getting past the INIT stage.

This isn't an out of the box installation since the ntp.conf file is using "restrict default ignore noquery" and the default restrict directives have been commented out. Using that restrict blocks time polls unless specific servers are allowed.

https://support.ntp.org/bin/view/Sup...ection_6.5.1.1.

Last edited by michaelk; 02-18-2019 at 08:04 AM.
 
  


Reply



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
DHCP client inconsistency drewcaplan Linux - Networking 2 05-15-2003 02:30 PM
smbmount inconsistency? esael Linux - Networking 0 11-13-2002 08:46 AM
hostname inconsistency lacrimae Linux - General 7 02-12-2002 10:01 AM
error unexpected inconsistency rromeli Linux - Software 0 02-07-2002 01:55 AM
inconsistency Dynamo Linux - General 2 08-04-2001 10:36 AM

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

All times are GMT -5. The time now is 07:49 PM.

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
Open Source Consulting | Domain Registration