ntpd kernel reports TIME_ERROR: 0x2041: Clock Unsynchronized
Running Slack64-current witn latest Plasma5. Since installing the updates this morning I have been getting an error in the ntpd log file -
18 Aug 09:28:00 ntpd[21835]: 127.127.1.0 local addr 127.0.0.1 -> <null> 18 Aug 09:28:00 ntpd[21835]: 46.22.26.12 local addr 192.168.1.205 -> <null> 18 Aug 09:28:00 ntpd[21835]: 91.199.218.19 local addr 192.168.1.205 -> <null> 18 Aug 09:28:00 ntpd[21835]: 5.148.175.134 local addr 192.168.1.205 -> <null> 18 Aug 09:29:29 ntpd[14972]: Listen and drop on 0 v6wildcard [::]:123 18 Aug 09:29:29 ntpd[14972]: Listen and drop on 1 v4wildcard 0.0.0.0:123 18 Aug 09:29:29 ntpd[14972]: Listen normally on 2 lo 127.0.0.1:123 18 Aug 09:29:29 ntpd[14972]: Listen normally on 3 eth0 192.168.1.205:123 18 Aug 09:29:29 ntpd[14972]: Listen normally on 4 lo [::1]:123 18 Aug 09:29:29 ntpd[14972]: Listen normally on 5 eth0 [fe80::fa32:e4ff:fe9c:c3c4%2]:123 18 Aug 09:29:29 ntpd[14972]: Listening on routing socket on fd #22 for interface updates 18 Aug 09:29:29 ntpd[14972]: kernel reports TIME_ERROR: 0x2041: Clock Unsynchronized 18 Aug 09:29:29 ntpd[14972]: kernel reports TIME_ERROR: 0x2041: Clock Unsynchronized I rebuilt ntp from source but the error persists. Is anyone else seeing this? If so have you found any fixes? Thanks in advance |
Do the obvious. Run
Code:
ldd /path/to/ntpd |grep found |
Same problem!
The ldd command does not display anything and the configuration file is unchanged. |
The ldd command shows nothing
root@missi:~$ ldd /usr/sbin/ntpd |grep found root@missi:~$ .conf file with most # snipped (this file has worked, unchanged for a very long time - even this morning before the ntp update) server 127.127.1.0 # local clock fudge 127.127.1.0 stratum 10 # # NTP server (list one or more) to synchronize with: server 0.ch.pool.ntp.org iburst server 1.ch.pool.ntp.org iburst server 2.ch.pool.ntp.org iburst server 3.ch.pool.ntp.org iburst # # Full path of a directory where statistics files should be created # statsdir /var/lib/ntp/stats # # Location of an alternate log file to be used instead of the default system syslog(3) facility # logfile /var/log/ntp.log driftfile /var/lib/ntp/drift pidfile /var/run/ntpd.pid # # Don't serve time or stats to anyone else by default (more secure) restrict default limited kod nomodify notrap nopeer noquery restrict -6 default limited kod nomodify notrap nopeer noquery # # Trust ourselves. :-) restrict 127.0.0.1 restrict ::1 |
It's only an info message that the clock was unsynchronized (TIME_ERROR: 0x2041). Command 'ntptime' would have told you "status 0x2041 (PLL,UNSYNC,NANO)". And after a few minutes 'ntptime' would have said "status 0x2001 (PLL,NANO)" when the clock got sync.
There's a comment in ntpd/ntp_loopfilter.c, at line 403: Code:
/* |
Actually, I just built the latest kernel of the day, 4.14.65 and the error has changed -
18 Aug 13:29:05 ntpd[10034]: ntpd exiting on signal 15 (Terminated) 18 Aug 13:29:05 ntpd[10034]: 127.127.1.0 local addr 127.0.0.1 -> <null> 18 Aug 13:29:05 ntpd[10034]: 81.94.123.16 local addr 192.168.1.205 -> <null> 18 Aug 13:29:05 ntpd[10034]: 77.109.151.83 local addr 192.168.1.205 -> <null> 18 Aug 13:29:05 ntpd[10034]: 82.195.235.165 local addr 192.168.1.205 -> <null> 18 Aug 13:29:05 ntpd[10034]: 82.195.237.219 local addr 192.168.1.205 -> <null> 18 Aug 13:30:06 ntpd[1503]: Listen and drop on 0 v6wildcard [::]:123 18 Aug 13:30:06 ntpd[1503]: Listen and drop on 1 v4wildcard 0.0.0.0:123 18 Aug 13:30:06 ntpd[1503]: Listen normally on 2 lo 127.0.0.1:123 18 Aug 13:30:06 ntpd[1503]: Listen normally on 3 eth0 192.168.1.205:123 18 Aug 13:30:06 ntpd[1503]: Listen normally on 4 lo [::1]:123 18 Aug 13:30:06 ntpd[1503]: Listen normally on 5 eth0 [fe80::fa32:e4ff:fe9c:c3c4%2]:123 18 Aug 13:30:06 ntpd[1503]: Listening on routing socket on fd #22 for interface updates 18 Aug 13:30:06 ntpd[1503]: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized 18 Aug 13:30:06 ntpd[1503]: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized ntptime now gives - ntp_gettime() returns code 5 (ERROR) time df2283f9.788a7000 Sat, Aug 18 2018 13:39:37.470, (.470862), maximum error 16000000 us, estimated error 16000000 us, TAI offset 0 ntp_adjtime() returns code 5 (ERROR) modes 0x0 (), offset 0.000 us, frequency 16.241 ppm, interval 1 s, maximum error 16000000 us, estimated error 16000000 us, status 0x41 (PLL,UNSYNC), time constant 7, precision 1.000 us, tolerance 500 ppm, from 0x2041 to 0x41 an error. Seems to be dependent on the kernel version in use. |
Wait a few minutes and check ntptime again.
|
Did that and now it seems to be OK
root@missi:~$ ntptime ntp_gettime() returns code 0 (OK) time df2287a3.78c74b84 Sat, Aug 18 2018 13:55:15.471, (.471791157), maximum error 121577 us, estimated error 17234 us, TAI offset 0 ntp_adjtime() returns code 0 (OK) modes 0x0 (), offset 23.024 us, frequency 17.655 ppm, interval 1 s, maximum error 121577 us, estimated error 17234 us, status 0x2001 (PLL,NANO), time constant 6, precision 0.001 us, tolerance 500 ppm, Thanks for your responses and for pointing out that bit at line 403. All sees copacetic again. |
adjtimex returned TIME_ERROR: No such file or directory
Hi
I am trying to run ntp in a container and i am able to communicate with ntp server . but my adjtimex is not working . I was bit confused where it was going wrong and i am very much new to the ntp concept i am givng you the output i received and your post helped me some what but i want to know for sure if it is a serious error to be considere below is my ouptput creating new /usr/local/var/db/ntpd.drift adjtimex adjusted frequency by 0.000000ppm ntp engine ready reply from x.xx.xxx.xx: offset 0.000564 delay 0.017696, next query 5s set local clock to Wed Mar 27 18:07:29 UTC 2019 (offset 0.000564s) reply from : offset -0.000276 delay 0.017825, next query 7s reply from : offset -0.002522 delay 0.021848, next query 9s peer now valid reply from : offset -0.000271 delay 0.016526, next query 7s reply from : offset -0.000279 delay 0.016253, next query 6s reply from : offset -0.001126 delay 0.018155, next query 7s reply from : offset -0.000979 delay 0.017596, next query 33s reply from : offset 0.018309 delay 0.056201, next query 30s adjtimex returned TIME_ERROR: No such file or directory reply from : offset 0.000201 delay 0.016404, next query 34s reply from : offset 0.000246 delay 0.016588, next query 33s reply from : offset 0.000428 delay 0.016029, next query 32s reply from : offset 0.000514 delay 0.016582, next query 34s out put for ntptime command ntptime ntp_gettime() returns code 5 (ERROR) time e0463a58.320e0000 Wed, Mar 27 2019 14:07:20.195, (.195526), maximum error 16000000 us, estimated error 16000000 us, TAI offset 0 ntp_adjtime() returns code 5 (ERROR) modes 0x0 (), offset 0.000 us, frequency 0.000 ppm, interval 1 s, maximum error 16000000 us, estimated error 16000000 us, status 0x40 (UNSYNC), time constant 2, precision 1.000 us, tolerance 500 ppm, |
Hi, welcome to LQ.
You solved this before someone answered you. Please post how for the record, as people search these threads. |
yeah because I just searched this very same topic and found no solution in here to help me fix my issue.. not cool OP... soooo Not cool.. :tisk:
|
I object to your choice of smiley. The answers here are to real problems posted by volunteers. If nobody asked the question, there won't be an answer, meaning nobody else who has had difficulty ever posted here.
|
Apologies, no idea why I had marked that as solved so long ago. I did a great deal of searching back then and found no joy. I still get the same error but, on the bright side it does not seem to be a serious problem. Will remove the solved status.
|
All times are GMT -5. The time now is 06:56 PM. |