Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] openntpd unsynced and keeps drifting, despite valid
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
manwe_
l33t
l33t


Joined: 01 Feb 2006
Posts: 621
Location: Kraków/Cracow, Poland

PostPosted: Wed Dec 14, 2016 12:22 pm    Post subject: [SOLVED] openntpd unsynced and keeps drifting, despite valid Reply with quote

Hi *.

I'm using openntpd on over 30 servers but one keeps drifting with "unsynced" status. Any ideas?

Code:
# ntpd -dsv
adjtimex returns frequency of 500.000000ppm
ntp engine ready
reply from 10.4.0.1: offset -0.007909 delay 0.000165, next query 9s
set local clock to Wed Dec 14 11:48:22 CET 2016 (offset -0.007909s)
reply from 10.4.0.1: offset -0.004553 delay 0.000146, next query 6s
reply from 10.4.0.1: offset -0.007579 delay 0.000217, next query 7s
peer 10.4.0.1 now valid
reply from 10.4.0.1: offset -0.011144 delay 0.000134, next query 7s
reply from 10.4.0.1: offset -0.014707 delay 0.000141, next query 5s
reply from 10.4.0.1: offset -0.017236 delay 0.000113, next query 8s
reply from 10.4.0.1: offset -0.021284 delay 0.000207, next query 33s
reply from 10.4.0.1: offset -0.038011 delay 0.000138, next query 31s
reply from 10.4.0.1: offset -0.036887 delay 0.000126, next query 33s
reply from 10.4.0.1: offset -0.053216 delay 0.000207, next query 33s
reply from 10.4.0.1: offset -0.069914 delay 0.000242, next query 30s
reply from 10.4.0.1: offset -0.085129 delay 0.000165, next query 31s
reply from 10.4.0.1: offset -0.100846 delay 0.000156, next query 32s
reply from 10.4.0.1: offset -0.117081 delay 0.000137, next query 31s
adjusting local clock by -0.036887s
clock is now synced
reply from 10.4.0.1: offset -0.096242 delay 0.000208, next query 34s
reply from 10.4.0.1: offset -0.113473 delay 0.000143, next query 32s
reply from 10.4.0.1: offset -0.129357 delay 0.000164, next query 33s
adjusting local clock by -0.080194s
reply from 10.4.0.1: offset -0.066212 delay 0.000153, next query 31s
reply from 10.4.0.1: offset -0.081904 delay 0.000221, next query 32s
reply from 10.4.0.1: offset -0.098150 delay 0.000196, next query 34s
reply from 10.4.0.1: offset -0.115373 delay 0.000195, next query 33s
reply from 10.4.0.1: offset -0.131805 delay 0.000165, next query 32s
adjusting local clock by -0.033279s
reply from 10.4.0.1: offset -0.115043 delay 0.000185, next query 34s
reply from 10.4.0.1: offset -0.132266 delay 0.000208, next query 32s
adjusting local clock by -0.033212s
clock is now unsynced
reply from 10.4.0.1: offset -0.115551 delay 0.000197, next query 32s
reply from 10.4.0.1: offset -0.131751 delay 0.000232, next query 31s
adjusting local clock by -0.066804s
reply from 10.4.0.1: offset -0.081871 delay 0.000211, next query 34s
reply from 10.4.0.1: offset -0.099099 delay 0.000144, next query 32s
reply from 10.4.0.1: offset -0.115330 delay 0.000128, next query 33s
reply from 10.4.0.1: offset -0.132050 delay 0.000171, next query 32s
adjusting local clock by -0.117134s
reply from 10.4.0.1: offset -0.032965 delay 0.000183, next query 32s
reply from 10.4.0.1: offset -0.049169 delay 0.000184, next query 32s
reply from 10.4.0.1: offset -0.065379 delay 0.000227, next query 31s
reply from 10.4.0.1: offset -0.081116 delay 0.000180, next query 33s
reply from 10.4.0.1: offset -0.097764 delay 0.000266, next query 31s
reply from 10.4.0.1: offset -0.113507 delay 0.000129, next query 34s
reply from 10.4.0.1: offset -0.130768 delay 0.000152, next query 31s
adjusting local clock by -0.118141s
reply from 10.4.0.1: offset -0.032984 delay 0.000181, next query 33s
reply from 10.4.0.1: offset -0.049692 delay 0.000161, next query 31s
………


Code:
# ntpctl -s all
1/1 peers valid, clock unsynced, clock offset is -97.986ms

peer
   wt tl st  next  poll          offset       delay      jitter
10.4.0.1 from pool
    1 10  3   31s   33s        23.978ms     0.236ms     0.049ms


Last edited by manwe_ on Thu Jan 26, 2017 10:59 am; edited 1 time in total
Back to top
View user's profile Send private message
manwe_
l33t
l33t


Joined: 01 Feb 2006
Posts: 621
Location: Kraków/Cracow, Poland

PostPosted: Sat Dec 24, 2016 1:26 pm    Post subject: Reply with quote

Shamless bump :roll:
Back to top
View user's profile Send private message
gerdesj
l33t
l33t


Joined: 29 Sep 2005
Posts: 621
Location: Yeovil, Somerset, UK

PostPosted: Mon Dec 26, 2016 11:37 pm    Post subject: Reply with quote

manwe_ wrote:
Shamless bump :roll:


You say that you have 30 servers and only one has a problem. The only person who can answer your question is you!
Back to top
View user's profile Send private message
manwe_
l33t
l33t


Joined: 01 Feb 2006
Posts: 621
Location: Kraków/Cracow, Poland

PostPosted: Mon Jan 09, 2017 9:57 pm    Post subject: Reply with quote

If I knew the answer, I wouldn't ask here. Kernel is the same, config fot ntpd is the same [simple "servers 10.4.0.1"] but somehow this machine drifts away.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5592

PostPosted: Wed Jan 11, 2017 10:31 pm    Post subject: Reply with quote

Can you rule out whether it's openntpd at fault? You'll have busybox ntpd installed, try running that for 24 hours and see if the drift gets worse with it.
Back to top
View user's profile Send private message
manwe_
l33t
l33t


Joined: 01 Feb 2006
Posts: 621
Location: Kraków/Cracow, Poland

PostPosted: Thu Jan 19, 2017 11:50 am    Post subject: Reply with quote

OK, that's something. Busybox's ntpd doesn't drift.

Code:
# busybox ntpd -d -n -p 10.4.0.1
ntpd: sending query to 10.4.0.1
ntpd: reply from 10.4.0.1: offset:-0.031530 delay:0.002000 status:0x24 strat:3 refid:0x052a70bc rootdelay:0.002014 reach:0x01
ntpd: sending query to 10.4.0.1
ntpd: reply from 10.4.0.1: offset:-0.031605 delay:0.002000 status:0x24 strat:3 refid:0x052a70bc rootdelay:0.002014 reach:0x03
ntpd: sending query to 10.4.0.1
ntpd: reply from 10.4.0.1: offset:-0.031697 delay:0.002000 status:0x24 strat:3 refid:0x052a70bc rootdelay:0.002014 reach:0x07
ntpd: sending query to 10.4.0.1
ntpd: reply from 10.4.0.1: offset:-0.031732 delay:0.002000 status:0x24 strat:3 refid:0x052a70bc rootdelay:0.002014 reach:0x0f
ntpd: sending query to 10.4.0.1
ntpd: reply from 10.4.0.1: offset:-0.031735 delay:0.002000 status:0x24 strat:3 refid:0x052a70bc rootdelay:0.002014 reach:0x1f
ntpd: sending query to 10.4.0.1
ntpd: reply from 10.4.0.1: offset:-0.035360 delay:0.002000 status:0x24 strat:3 refid:0x052a70bc rootdelay:0.002014 reach:0x3f
ntpd: sending query to 10.4.0.1
ntpd: reply from 10.4.0.1: offset:-0.036828 delay:0.002000 status:0x24 strat:3 refid:0x052a70bc rootdelay:0.002014 reach:0x7f
ntpd: sending query to 10.4.0.1
ntpd: reply from 10.4.0.1: offset:-0.037255 delay:0.002000 status:0x24 strat:3 refid:0x052a70bc rootdelay:0.002014 reach:0xff
ntpd: sending query to 10.4.0.1
ntpd: reply from 10.4.0.1: offset:-0.036809 delay:0.002000 status:0x24 strat:3 refid:0x052a70bc rootdelay:0.002014 reach:0xff
ntpd: sending query to 10.4.0.1
ntpd: reply from 10.4.0.1: offset:-0.035926 delay:0.002000 status:0x24 strat:3 refid:0x052a70bc rootdelay:0.002014 reach:0xff
………


So it's related to openntpd. Same binary package emerged on every machine (6.0_p1), same config ("servers 10.4.0.1"), same options in conf.d (NTPD_OPTS="-s"), same kernel. Any ideas?
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5592

PostPosted: Fri Jan 20, 2017 7:54 pm    Post subject: Reply with quote

Does openntpd make use of the /var/lib/ntp/ntp.drift file? Try removing it if it's there, maybe it got calibrated wrong.
Back to top
View user's profile Send private message
manwe_
l33t
l33t


Joined: 01 Feb 2006
Posts: 621
Location: Kraków/Cracow, Poland

PostPosted: Thu Jan 26, 2017 10:59 am    Post subject: Reply with quote

Yes, it was using that file. After removing ntpd started with:
Code:
# ntpd -dsv
adjtimex returns frequency of 0.000000ppm
/var/lib/openntpd/ntpd.drift is empty
ntp engine ready
reply from 10.4.0.1: offset -0.000081 delay 0.000130, next query 6s
set local clock to Wed Jan 25 10:32:40 CET 2017 (offset -0.000081s)
reply from 10.4.0.1: offset -0.000058 delay 0.000119, next query 9s
reply from 10.4.0.1: offset -0.000101 delay 0.000194, next query 6s
peer 10.4.0.1 now valid
reply from 10.4.0.1: offset -0.000166 delay 0.000167, next query 5s
reply from 10.4.0.1: offset -0.000176 delay 0.000214, next query 6s
reply from 10.4.0.1: offset -0.000228 delay 0.000133, next query 7s
reply from 10.4.0.1: offset -0.000265 delay 0.000186, next query 31s
reply from 10.4.0.1: offset -0.000482 delay 0.000180, next query 34s
reply from 10.4.0.1: offset -0.000629 delay 0.000131, next query 33s
reply from 10.4.0.1: offset -0.000849 delay 0.000193, next query 30s
clock is now synced
reply from 10.4.0.1: offset -0.000408 delay 0.000231, next query 34s
reply from 10.4.0.1: offset -0.000649 delay 0.000204, next query 33s
reply from 10.4.0.1: offset -0.000839 delay 0.000136, next query 31s


and so far, after 24h, is still in "synced" state
Code:
# ntpctl -s all
1/1 peers valid, clock synced, stratum 4

peer
   wt tl st  next  poll          offset       delay      jitter
10.4.0.1 from pool
 *  1 10  3 1358s 1606s        -1.388ms     0.266ms     0.268ms


Thanks a lot! :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum