You are not logged in.

#1 2012-08-25 07:02:41

sup
Member
From: Earth
Registered: 2010-09-11
Posts: 21

NTPd produces wrong time

My hardware clock has given up the ghost so I am waiting on a replacment motherboard (gotta love warranties). In the meantime, I am using ntpd to sync my software clock. It syncs the time to the correct minute, but the hour is invariably four behind. This happens whether I run the daemon at startup or run ntpd -qg manually after I log in.

I am on the US East Coast (UTC -5) and have symlinked /etc/localtime to /usr/share/zoneinfo/America/New_York.

My ntpd.conf is as follows:

server 0.pool.ntp.org iburst
server 1.pool.ntp.org iburst
server 2.pool.ntp.org iburst
server 3.pool.ntp.org iburst

driftfile /var/lib/ntp/ntp.drift
logfile /var/log/ntp.log

And ntp.log for my last reboot read:

24 Aug 22:46:07 ntpd[581]: Listen normally on 5 eth0 [my IP]
24 Aug 22:46:07 ntpd[581]: peers refreshed
24 Aug 22:46:07 ntpd[581]: new interface(s) found: waking up resolver
24 Aug 22:46:09 ntpd[623]: DNS 0.pool.ntp.org -> 69.164.206.65
24 Aug 22:46:09 ntpd[623]: DNS 1.pool.ntp.org -> 209.114.111.1
24 Aug 22:46:09 ntpd[623]: DNS 2.pool.ntp.org -> 69.64.36.129
24 Aug 22:46:10 ntpd[623]: DNS 3.pool.ntp.org -> 69.167.160.102

Any thoughts?

Last edited by sup (2012-08-25 07:03:16)

Offline

#2 2012-08-25 07:44:39

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: NTPd produces wrong time

No security settings? I used to use (before I switched to chrony):

restrict default kod nomodify notrap nopeer noquery
restrict 127.0.0.1

See Gentoo wiki for debugging tips.

Offline

#3 2012-08-25 07:55:58

sup
Member
From: Earth
Registered: 2010-09-11
Posts: 21

Re: NTPd produces wrong time

Actually I had just commented out the security settings before posting to see if by some crazy miracle that would do anything (obviously it did not). I have since uncommented them.

The problem with setting the time by a specific server manually is that when I reboot I am just starting from scratch, even with the hwclock daemon running. Basically, my hardware clock is just dead, and my only hope of not having to set it manually after I log in is a daemon. Of course, it is not all that inconvienient to run one command, but it would be better if it would happen automatically.

I will try chrony and see if that works better.

Offline

Board footer

Powered by FluxBB