NTP (02)

NTP on penrith1/2

Monday 21 April, 2008 - 23:26

I tried setting up NTP on penrith1 using the following procedure:

rpmquery ntp (to see if the package was installed - yes - ntp-4.1.2-4.EL3.1)

service ntpd status (to see if the daemon was running - ntpd is stopped)

chkconfig --list ntpd (to see if the service was defined - yes, but not enabled at any run level)

chkconfig --level 345 ntpd on (to run ntpd when in one of the multiuser modes)

vi /etc/ntp.conf (to add the following lines):

restrict central.yaocm.id.au mask 255.255.255.0 nomodify notrap

server central.yaocm.id.au

service ntpd restart (to read the updated configuration file)

date (to check if the image clock was the same as the PC clock - no)

tail -20 /var/log/messages (to see what the error messages were)

getnetum central.yaocm.id.au: invalid host number, line ignored

ping -c 4 central.yaocm.id.au (to check connectivity - failed - unknown host)

vi /etc/hosts (to add entry for 192.168.100.97 central.yaocm.id.au)

ping now works

date is still wrong

service ntpd restart (to rebuild ntp service)

date still wrong

Same error message in /var/log/messages

Google pointed me to Translation names to IP is not working. Problem was with the use of the host name instead of an IP address in the restrict statement.

vi /etc/ntp.conf (to change central.yaocm.id.au to 192.168.100.97 in restrict command)

service ntpd restart

date still wrong

No error messages for this incarnation of ntpd in /var/log/messages

Took a half-hour break.

Looked at /var/log/messages, found:

time correction of -7920 seconds exceeds sanity limit (1000); set clock manually to the correct UTC time.

date -u 042112402008 (the convoluted time format of month, day, hour, minute, and year is probably makes sense to some geek somewhere in the USA)

Mon Apr 21 12:40:00 UTC 2008

That sanity check message was the last thing sent before the daemon died. This I found out when I tried to restart ntpd.

Watched log via tail -f /var/log/messages for about twenty minutes with a problem on penrith1.

Made similar changes on penrith2. Except that I get messages of the following type in /var/log/messages:

kernel: set_rtc_mmss: can't update from nn to nn

ntpd and kernel message set_rtc_mmss: can't update could be relevant

Checked the time on all three (3) servers and found the following discrepencies:

From this, I would say that ntp is not set up correctly because the times should all be the same.