LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   ntpd keeps dieing (https://www.linuxquestions.org/questions/fedora-35/ntpd-keeps-dieing-933268/)

homer_3 03-07-2012 12:38 PM

ntpd keeps dieing
 
After starting ntpd with "service start ntpd" I can check to see that it's running with "ps -ef | grep ntpd" and see that it's running. After some random amount of time, I will see that it's no longer running. Is there some reason ntpd would just die? I'm using FC 10.

michaelk 03-07-2012 12:54 PM

You can check the ntp logs for errors. If the time difference between your computer and the ntp server(s) is greater then 1000 seconds it assumes something is wrong and will exit.

Look at the output of the command ntpq -p. This will show you the statistics including the offset in milliseconds. If it is a large number then something is wrong.

Is this a real or virtual machine?

You do realize that FC10 is no longer supported?

homer_3 03-07-2012 01:32 PM

The logs did show something about being 1200 seconds off. I wouldn't expect ntpd to exit though. I also don't understand how ntpd could connect to the ntp server, adjust the time of the local clock to be in sync, stay that way for hours, and then suddenly be off by 1200 seconds.... on a LAN!

I'm using all real machines. I realize FC10 is no longer supported, but it's not like it's from 1990. It came out in 2008, which wasn't that long ago. I'd be surprised if ntpd changed much since 2000, let alone 2008.

anomie 03-07-2012 01:57 PM

Point is you can't get security fixes for an OS that's no longer supported.

Do a one-time sync with ntpdate(8), and then try firing up ntpd(8) again.

If it's still not working, check /var/log/messages for clues.

michaelk 03-07-2012 02:15 PM

ntp (or ntpdate depending on version) should sync with the server at start up but if the clock has a high drift rate the offset will become greater then 1000 seconds and so will quit. ntp will automatically adjust the poll interval.
The default min is 64 seconds and max is 1024 seconds but can be manually adjusted from 4 seconds to 36.4 hours). Basically the more stable the clock the longer the poll interval.

Can you post the output of the ntpq -p command?

Was ntp working previously?

homer_3 03-07-2012 02:22 PM

ntpq -p gives:

st t when poll reach delay offset jitter
===============================================
6 u 10 128 377 0.403 -0.237 0.146

Keep in mind, I started ntpd again when I created this thread because it wasn't running.

Quote:

Was ntp working previously?
That depends on what you mean by working. It's always been able to connect to the ntp server and sync the times. But it also has always died after a little while.

michaelk 03-07-2012 03:21 PM

Is there an * as the first character before the server? Everything looks reasonable at the moment.

Post the ntp.conf

homer_3 03-07-2012 03:37 PM

The ntp.conf looks like

driftfile /var/lib/ntp/drift
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noque
restrict 127.0.0.1
restrict -6 ::1
includefile /etc/ntp/crypto/pw
keys /etc/ntp/keys
server <ipaddress> dynamic

In the ntpq -p results, yes, there is an * before the IP address of the server.

michaelk 03-07-2012 04:58 PM

So the computer is synced at the moment. What is the offset currently?

homer_3 03-09-2012 07:57 AM

The offset has gone from -.237 (what I posted earlier) to .466.

michaelk 03-09-2012 08:07 AM

So ntp is still running and synched i.e. * in front of the IP address?

homer_3 03-09-2012 12:02 PM

Quote:

Originally Posted by michaelk (Post 4622690)
So ntp is still running and synched i.e. * in front of the IP address?

For right now, yes.

michaelk 03-09-2012 12:50 PM

How is the ntp server configured? i.e post its ntp.conf. With a stratum level of 6 the client might not think the server's time is good enough and since the client is not configured to fall back to its local time as a source it quits.

homer_3 03-09-2012 03:05 PM

The server's ntp.conf looks like:

Code:

driftfile /var/lib/ntp/drift
restrict 127.0.0.1
restrict -6 ::1
server 127.127.1.0
fudge 127.127.1.1 stratum 14 refid NIST
includefile /etc/ntp/crypto/pw
keys /etc/ntp/keys


michaelk 03-09-2012 04:12 PM

Quote:

Originally Posted by homer_3 (Post 4622978)
The server's ntp.conf looks like:

Code:

driftfile /var/lib/ntp/drift
restrict 127.0.0.1
restrict -6 ::1
server 127.127.1.0
fudge 127.127.1.1 stratum 14 refid NIST
includefile /etc/ntp/crypto/pw
keys /etc/ntp/keys


Do you have an external time source connected to the server?
The server and fudge IP address should be the same (127.127.1.0) AFIK.


All times are GMT -5. The time now is 10:50 AM.