0

I’m running this flavor of Linux on identical machines …

[dalvarado@machine2 ~]$ uname -a
Linux mydomain.org 3.10.32-35.201.amzn1.x86_64 #1 SMP Thu Aug 14 22:00:02 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

I want the ntpd service installed and running on both

[dalvarado@machine2 ~]$ service ntpd status
ntpd (pid  3927) is running...

However, when I run the “date” command on each machine, the time differs by 30 seconds on each. I thought the point of ntpd was it was supposed to sync the machine’s time with the actual time (according to the all knowing Internet). How can I troubleshoot this problem or is there some other configuration I need to make with ntpd to get it to work?

1 Answer 1

0

If the ntpd daemon is running on both machines then you can verify if it is contacting the pool ntp servers by running

ntpq -p

This will show a list of connected ntp servers.

It would probably be worth checking you are connecting to the same ntp servers on each host by verifying the server directives in /etc/ntp.conf.

Also verify both boxes are set with the correct timezone and UDP port 123 is open both ways in any firewalls...

2
  • Hi, The /etc/ntp.conf files are identical on both machines, however, the output from "ntpq -p" is different on each machine. How does the output from "ntpq -p" get configured?
    – Dave
    Dec 29, 2014 at 21:42
  • @Dave If you are using pooled servers, they are configured by doing a DNS lookup on startup. The pools are configured so that you are likely to get different servers every time you start the NTP daemon. Consider modifying your configuration so your two servers are peered.
    – BillThor
    Dec 30, 2014 at 3:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .