[SOLVED] Slackware server - ntp time sync stops after a day
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Well, it's been 4 days now and ntpd is still running ... this is a good sign!
I'm not entirely sure what the solution was, but it seems that commenting out the local server lines in ntp.conf has helped in my case.
I'm kind of a distro jumper on the desktop. I recently installed Salix OS and it had ntpd running by default so I looked at their ntp.conf file and they have removed the local server lines as well. So, maybe there is something to it.
Not sure if I should mark this thread as solved or not, as others seem to be using the local server lines successfully?? I'm just glad it's finally working. Thanks for everyone's assistance!
I'm worried again, DAMN, just when I thought everything was fine. We'll see if ntpd can recover. If not it may be time for a new hardware clock or motherboard.
I hope you are using more than one remote time server. The ntp docs tell you to use 3 of them.
It's my understanding that this is simply to avoid the potential for a time server being down, so that you have a backup. The default ntp.conf for Debian and Ubuntu includes just one time server.
I agree it's probably better to have more servers, but I think one will suffice and you can see from my post that the 'Reach' for time.nist.gov was at 377 meaning it had full connectivity to the server.
Quote:
Originally Posted by Richard Cranium
BTW, are you running a stock system? Or have you installed other software? Maybe something else is resetting your system time.
The only thing I've installed is fail2ban from Slackbuilds, otherwise it's a stock 13.1 system.
Yeah, something strange happens where the hardware clock all of a sudden jumps like 10 minutes into the future and the system clock falls back exactly 1 hour from the hwclock. Then since the system clock is an hour different than the time server ntpd can't recover and fails. Strange??
Are you overclocking your system? This is a common side effect on some motherboards from overclocking.
If you must make this work, simply make a cron job that kills ntpd, runs ntpdate pool.ntp.org periodically, then starts ntpd again. If your not syncing to this machine from other PCs, I wouldn't even bother running ntpd, just do the periodic sync.
ntpd has been running without error here for the last few days on 13.1 x86_64.
Code:
# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
*clock-a.develoo 164.67.62.212 2 u 657 1024 377 84.404 -4.770 4.090
+point2.adamants 69.93.111.178 3 u 862 1024 377 78.845 -4.933 3.071
-153.16.4.134 129.6.15.29 2 u 902 1024 377 173.397 55.162 3.847
+clock.trit.net 192.12.19.20 2 u 932 1024 377 81.024 -3.642 1.100
LOCAL(0) .LOCL. 10 l 15 64 377 0.000 0.000 0.001
Code:
#
restrict default kod nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict 192.168.1.0 mask 255.255.255.0 nomodify
server 0.north-america.pool.ntp.org iburst
server 1.north-america.pool.ntp.org iburst
server 2.north-america.pool.ntp.org iburst
server 3.north-america.pool.ntp.org iburst
## local server
server 127.127.1.0
fudge 127.127.1.0 stratum 10
## NTP drift file - corrects for hardware clock time deviation
driftfile /etc/ntp/drift
## NTP log file
logfile /var/log/ntp.log
That's from a MythTV Backend. Time is very important there. Hate having a program end 2 mintues early
I'm drawing straws at this point hoping this is going to work, one step at a time I guess.
I've replaced the CMOS battery, reset the CMOS, and reset the date and time. The CMOS does not even have any sort of overclocking parameters so that shouldn't be an issue.
I've copied disturbed1's ntp.conf from post #66.
I'll just let it run and see how it goes ... crosses fingers ... knocks on wood ... prays to the sun god ... hoping he doesn't have to replace the motherboard.
So far so good ...
Code:
# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
-no-ptr.set 204.9.54.119 2 u 136 256 377 70.950 -14.380 5.984
+mirror 128.233.154.245 2 u 129 256 377 70.309 2.913 6.168
+153.16.4.139 192.5.41.40 2 u 200 256 377 116.312 -13.705 6.360
*white.web-ster. 198.60.22.240 2 u 214 256 377 36.923 3.762 0.825
LOCAL(0) .LOCL. 10 l 150m 64 0 0.000 0.000 0.000
# hwclock;date
Sat 17 Jul 2010 06:15:17 PM MDT -0.040621 seconds
Sat Jul 17 18:15:17 MDT 2010
I'll just let it run and see how it goes ... crosses fingers ... knocks on wood ... prays to the sun god ... hoping he doesn't have to replace the motherboard.
So far so good ...
Noticed my config is quite similar to Richard Cranium's. We must have consulted the same articles.
Can't say I've ever experienced or noticed the effects of a dying / weak CMOS battery. I know what happens when one is dead though. Keep us updated on the situation. It's interesting.
# ntpq -p
ntpq: read: Connection refused
# hwclock;date
Sun 18 Jul 2010 09:22:34 AM MDT -0.090434 seconds
Sun Jul 18 04:22:34 MDT 2010
The only theory I have left is that the motherboard hardware clock is failing. Not sure how that affects the system clock.
I read this, "Bizarre results from the system clock may mean there is a problem with interrupts" from here. I think they were referring to the motherboard.
I'm not sure what to do. Either set the date in a cron job (a workaround and I don't really like workarounds) or start looking at used computer stores or ebay for a replacement motherboard.
Saw four capacitors that are bulging with dried up gunk on top of them. No bueno .
No bueno indeed but at least it simplifies the decision about replacing the motherboard.
In the interim my earlier workaround suggestion about setting the hwclock from the system clock might buy some time.
BTW the version of ntpd in 13.1 allows use of the pool command in ntp.conf as documented at file:///usr/share/doc/ntp-4.2.6p1/html/manyopt.html#pool
Here's my ntp.conf
Code:
# Configuration file for ntpd.
# Time sources
# ~~~~~~~~~~~~
# Using pool method from /usr/share/doc/ntp-4.2.6p1/html/manyopt.html#pool
# also at http://www.eecis.udel.edu/~mills/ntp/html/manyopt.html#pool
# For India
# (Asia also required because India is inadequate)
#pool in.pool.ntp.org
#pool asia.pool.ntp.org
# For UK
pool uk.pool.ntp.org
# Local, for use when not connected to the Internet
server 127.127.1.0
fudge 127.127.1.0 stratum 10
# Drift file
# ~~~~~~~~~~
driftfile /etc/ntp/drift
Almost exact same thing happened to me a few years back, I tried to no avail (much like you) for weeks to try and fix. I replaced motherboard with el cheapo I had laying around and then bam time kept perfect. Mine I can only deduce came from power spikes (old wiring in house and faulty surge protector) nothing ever fried completely but once I had motherboard out I saw all sorts of gooked up resistors.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.