LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-18-2018, 03:34 AM   #1
3rensho
Senior Member
 
Registered: Mar 2008
Location: Deutschland
Distribution: Slackware64-current
Posts: 1,070

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
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
 
Old 08-18-2018, 04:57 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,228

Rep: Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539
Do the obvious. Run
Code:
ldd /path/to/ntpd |grep found
to check libraries and post the active lines of the conf file. You can skip or snip all the ones with hashes.
 
Old 08-18-2018, 05:10 AM   #3
teoberi
Member
 
Registered: Jan 2018
Location: Romania
Distribution: Slackware64-current (servers)/Windows 11 (workstations)
Posts: 757

Rep: Reputation: 418Reputation: 418Reputation: 418Reputation: 418Reputation: 418
Same problem!
The ldd command does not display anything and the configuration file is unchanged.

Last edited by teoberi; 08-18-2018 at 05:38 AM. Reason: Complete answer
 
Old 08-18-2018, 05:55 AM   #4
3rensho
Senior Member
 
Registered: Mar 2008
Location: Deutschland
Distribution: Slackware64-current
Posts: 1,070

Original Poster
Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
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
 
Old 08-18-2018, 07:31 AM   #5
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 2,395

Rep: Reputation: 2010Reputation: 2010Reputation: 2010Reputation: 2010Reputation: 2010Reputation: 2010Reputation: 2010Reputation: 2010Reputation: 2010Reputation: 2010Reputation: 2010
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:
                /*                                                              
                 * This code may be returned when ntp_adjtime() has just        
                 * been called for the first time, quite a while after          
                 * startup, when ntpd just starts to discipline the kernel      
                 * time. In this case the occurrence of this message            
                 * can be pretty confusing.                                     
                 *                                                              
                 * HMS: How about a message when we begin kernel processing:    
                 *    Determining kernel clock state...                         
                 * so an initial TIME_ERROR message is less confising,          
                 * or skipping the first message (ugh),                         
                 * or ???                                                       
                 * msyslog(LOG_INFO, "kernel reports time synchronization lost");
                 */
                msyslog(LOG_INFO, "kernel reports TIME_ERROR: %#x: %s",
                        ptimex->status, des);

Last edited by Petri Kaukasoina; 08-18-2018 at 07:39 AM.
 
1 members found this post helpful.
Old 08-18-2018, 07:41 AM   #6
3rensho
Senior Member
 
Registered: Mar 2008
Location: Deutschland
Distribution: Slackware64-current
Posts: 1,070

Original Poster
Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
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.
 
Old 08-18-2018, 07:45 AM   #7
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 2,395

Rep: Reputation: 2010Reputation: 2010Reputation: 2010Reputation: 2010Reputation: 2010Reputation: 2010Reputation: 2010Reputation: 2010Reputation: 2010Reputation: 2010Reputation: 2010
Wait a few minutes and check ntptime again.
 
2 members found this post helpful.
Old 08-18-2018, 07:56 AM   #8
3rensho
Senior Member
 
Registered: Mar 2008
Location: Deutschland
Distribution: Slackware64-current
Posts: 1,070

Original Poster
Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
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.

Last edited by 3rensho; 08-18-2018 at 08:00 AM.
 
1 members found this post helpful.
Old 03-27-2019, 02:19 PM   #9
surya1
LQ Newbie
 
Registered: Mar 2019
Posts: 1

Rep: Reputation: Disabled
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,
 
Old 03-28-2019, 06:06 AM   #10
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,228

Rep: Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539
Hi, welcome to LQ.

You solved this before someone answered you. Please post how for the record, as people search these threads.
 
Old 02-29-2020, 12:10 PM   #11
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243
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..
 
Old 03-01-2020, 04:30 AM   #12
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,228

Rep: Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539
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.
 
Old 03-01-2020, 06:23 AM   #13
3rensho
Senior Member
 
Registered: Mar 2008
Location: Deutschland
Distribution: Slackware64-current
Posts: 1,070

Original Poster
Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
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.
 
  


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
ntpd communicates with server, doesn't set clock csmith7383 Linux - Software 5 03-16-2012 08:07 PM
ntpd synchronizes only local clock (redhat) ? Vilius Linux - Software 4 07-16-2010 01:04 AM
Keeping clock in sync with ntpd as client only? lukesc Linux - Server 7 12-04-2009 12:10 PM
ntpd does not adjust system clock kannerke Linux - Software 1 01-15-2009 11:31 AM
GPS or Atomic Clock for NTPD slacky Linux - Networking 3 12-15-2006 07:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:00 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