4

Using RHEL 5.x on a workstation.

I set the clock using ntpdate 0.us.pool.ntp.org and then start NTPD using service ntpd start. (this also happens at boot). Watching this over the next 20-30 minutes it appears to run at about 1/2 speed. After 20 minutes the clock is ~10 minutes behind.

Calling ntpq -p (after 20 minutes) shows three servers (coming from pool) all of which still have .INIT. in the refid column.

Looking at the system log shows an uneventful startup for NTPD. No errors to speak of.

Calling hwclock shows the correct current time.

Contents of /etc/ntp.conf:

restrict 127.0.0.1

server 0.us.pool.ntp.org
server 1.us.pool.ntp.org
server 2.us.pool.ntp.org

driftfile /var/lib/ntp/drift
statsdir /var/lib/ntp

Looking at nmap -p123 -sU -P0 servername I see 123/udp open|filtered ntp.

Not sure where else to look to diagnose this. Suggestions?

EDIT: iburst didn't seem to have any effect.

I tried running NTPD using -ddd to see what's going on. It starts out getting packets pretty steadily and then slows to a crawl. After 5 minutes my clock is 3 minutes behind. It was set initially using ntpdate.

Cristian Ciupitu
  • 5,513
  • 2
  • 37
  • 47
ethrbunny
  • 357
  • 2
  • 7
  • 18
  • 1
    Are you doing any sort of virtualisation? – William Hilsum Sep 03 '13 at 20:31
  • No virtualization. – ethrbunny Sep 03 '13 at 20:35
  • Add `iburst` to your server declarations. – Martin Schröder Sep 05 '13 at 06:40
  • Try a different pool, take the hard drive out and put it in a different machine and see if the issue continues. My money is on a bad network card in the workstation. – spuder Sep 06 '13 at 14:14
  • It looks like you have a firewall blocking port 123. – Calimo Oct 10 '13 at 09:40
  • Also, keep in mind that running the NTPd service on your box doesn't necessarily mean that your box uses it. You'll want to run a NTP client on your system (it looks like it's configured properly). Since you've mentioned ntpdate, assumption is that you're not acutally running NTP as a client. To fix, you can either run ntp as a client service or set up a cron job to run ntp (or ntpdate) periodically. Additional reading: http://www.cyberciti.biz/faq/rhel-fedora-centos-configure-ntp-client-server/ – joat Jul 05 '14 at 16:18

1 Answers1

1

It seems like your ntp does not recieve packets from the pool. Try running sudo tcpdump -n -i <ifname> port 123 after you have restarted ntpd. You should see packets going both ways, if not, then you have a firewall problem (which can not keep track/state of UDP-connections).

Sitron_NO
  • 113
  • 1
  • 6