[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.
For some reason ntpd seems to be working for everyone else besides me. Just my luck!
I reinstalled 13.1 ... same problem.
Unless someone has a suggestion and quick, I'm 5 seconds from typing 'reboot' and putting a different distribution on. I thought Slackware was going to be a rock and I've enjoyed using it, but I just don't know what to do to get ntpd working correctly. Even according to http://support.ntp.org/bin/view/Servers/NTPPoolServers a minimal ntp.conf is:
Code:
driftfile /var/lib/ntp/ntp.drift
server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org
server 3.pool.ntp.org
Which looks pretty close to what I have:
Code:
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10
server 0.us.pool.ntp.org
server 1.us.pool.ntp.org
server 2.us.pool.ntp.org
server 3.us.pool.ntp.org
driftfile /etc/ntp/drift
When I tried using a sub pool as you have above, the servers given to me would never sync up. Their refid was always .INIT. .
Did you try my configuration file? It should work for you too.
However, my offset values appear to be increasing. I don't remember the earlier values, so I'll post the output of ntpq -p here so I can compare and post later.
Code:
remote refid st t when poll reach delay offset jitter
==============================================================================
+153.16.4.136 129.6.15.29 2 u 926 1024 377 154.652 42.061 3.950
*bindcat.fhsu.ed 132.163.4.102 2 u 278 1024 377 36.894 -14.729 1.457
+triangle.kansas 128.252.19.1 2 u 900 1024 363 24.186 -11.746 3.413
LOCAL(0) .LOCL. 10 l 18h 64 0 0.000 0.000 0.000
Sorry, I didn't try your ntp.conf. I did try various servers, but always with the same result of ntpd failing. The server setup I used is what is recommended at the ntp website using public pool servers. From the times I've posted my ntpq -p output I never had an issue with the 'refid'.
I had reached my frustration tipping point and just couldn't take it anymore. I've switched distributions, currently all is running well.
I definitely am curious if you have continued success with ntpd. Thanks!
What version of ntpd is your new distribution using?
I'll wait a day or so before I re-post on this topic, unless my ntpd process dies (in which case I will post shortly after I find out about it). I don't think that it shall, but you never know.
Well ... I knew in my gut that this was not a Slackware problem. I know Slackware is a rock, that's why I put it on my server and I'll be putting in back on today hopefully.
ntpd crashed on the new distribution.
I think this is a hwclock drift issue. The hwclock is currently 15 minutes in the future which is probably why ntpd crashed. I did recently replace the ethernet card, but I don't know why that would affect the hwclock.
Any ideas or should I post a new thread after I do some research, since this doesn't seem to be an ntp problem?
Hmm. Dang nab it, I read a thread that may have some bearing on your problem...
OK, see if this has any bearing on your problem. (The link, as I understand it, claims that if your hardware clock drifts too much, then ntpd will eventually give up and exit.)
My gateway has been running ntpd since 9:36pm on 2010-07-09 with no issues.
Wow ... that's a lot of information to try to learn. I don't think I found any real issues or solutions. I did find this:
Quote:
Can I use my system clock as reference clock?
In short: You can, but you should not. See also What is LCL, the Local Clock?.
Warning
Using the free-running system clock means that your NTP server announces that time as reference time to any client, no matter how wrong it is. Especially when connected to the Internet this can cause severe confusion.
A recent survey[2] discovered that about 95% of bad stratum-1 servers had configured LCL, the local clock, as time reference. So please don't make the same mistake after having read this!
Slackware has the LCL clock configured as a time server by default:
Code:
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10
But this doesn't seem to be causing any trouble in your configuration.
Just thinking out loud here ... maybe the hwclock drifted or the local clock drifted, then the local clock was used as a time server and ntpd couldn't adjust to the large difference and crashed. Maybe something like that???
I need to research the relationship between the hwclock and local clock.
Anyway, I'm back on Slackware now. I've commented out the local clock lines and we'll see how it goes. It's been running for 4 hours now. Crossing my fingers. Thanks!
Yeah, but that would mean that there was something goofy with your motherboard's hardware clock. I think (but do not know for sure) that if you turn off your local clock that ntpd may simply barf off if you had to reboot after a sufficient period of time.
You could Google "USB hardware clocks" to see what comes up, but it might be cheaper to simply get a new motherboard.
*shakes head* Dude (*frowns* or whatever the female form of "Dude" would be), I wish that I could provide more specific help, but I think that the clock on your motherboard is failing.
If the theory that the problem is caused by a "bad" hardware clock is correct -- and it sounds credible -- then a workaround might be to set the hardware clock from the system clock as often as is necessary, say every 15 minutes ... ?
From what I have read ntp will update the hardware clock every 11 minutes. AFIK besides the 11 minute update mode the only other time the hardware clock is read or written is boot up and shut down. The hardware clock could be bad...
After commenting out the Local server lines in ntp.conf, it has been running for 2 days now.
My "theory" is that "somehow" the hwclock messed up the local clock. The local clock was then acting as a server and conflicting with the other servers, ntp couldn't navigate the discrepancies between servers and gave up.
Though I realize I really have no clue ... and my theory may be completely wrong ... and ntp may crash in the next ten minutes.
Only time (ha ha) will tell. I'll wait a few days to see if it continues to run.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.