Opened 9 years ago

Closed 8 years ago

#274 closed defect (fixed)

Problem with time sync on danse.chem

Reported by: ajj Owned by: butler
Priority: minor Milestone: Admin Tasks
Component: SasView Keywords:
Cc: Work Package: SasView Admin

Description

danse.chem seems to have a fast clock. needs looking at.

Change History (5)

comment:1 Changed 9 years ago by butler

  • Work Package set to SasView Admin

comment:2 Changed 8 years ago by butler

  • Owner changed from ajj to butler
  • Status changed from new to accepted

the ntpd is using time.nist.gov which no longer exists (pinging gets zero response). It needs to be replaced with pool.npt.org (see for example http://unix.stackexchange.com/questions/79112/how-do-i-set-time-and-date-from-the-internet). specifically need to edit /etc/ntp.conf file with

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

Since clock is fast by 1.45h now best to wait till near midnight to change?

comment:3 Changed 8 years ago by ajj

This isn't the problem. ntpd is actually taking time servers from DHCPD (see config file in /var/lib/ntp). Problem seems to be, and has been for some while, that ntpd is not actually ever updating the time.

comment:4 Changed 8 years ago by butler

True … DHCPD was/is the problem. running

ntpq -pn

showed that the nist server was overwritten and ONLY the dhcpd returned ntp servers listed — NONE of them able to respond (refid = .INIT.). On danse2 for some reason the ntp.conf.dhpc did in fact also keep the original and the same ntpq command showed that is the only reason it was keeping time — the other three servers returned by DHCPD server were not responding but the NIST server was (refid - .NIST.)

Thanks to Andrew for updating the servers to the recommended pool.ntp.org servers.
I renamed the /var/lib/ntp/ntp.conf.dhcp to OLDCONFDHCP and /etc/dhcp3/dhclient-exit-hooks.d/ntp to OLDNTP. Both files were edited to show the date of the change and the initial file names)

I then stoped and restarted the ntp service

sevice ntp status
sudo service ntp stop
service ntp status
sudo service ntp start
service ntp status

after the restart only the 4 pool services registered in a ntpq call and all showed as connecting. Interestingly after about 10 min the clock reset despite being more than 600s (10min) out. Should check the threshold time.

We can close this ticket once the threshold time is checked and once danse2 is updated as well. I don't have sudo privileges on danse2 so cannot edit files there, but should add the pool servers and remove the failing dhcpd servers. Actually it may be already done as there is no ntp file in dhclient-exit-hooks.d on danse2.

comment:5 Changed 8 years ago by butler

  • Resolution set to fixed
  • Status changed from accepted to closed

As Andrew pointed out to me just changing the name of the file in etc/dhcp3/dhclient-exit-hooks.d/ does nothing since all scripts are run regardless of name. Have now returned to the old name of ntp but altered script in two ways:

  • added a RUN="no"/"yes" flag to turn off the script for now
  • replaced the line that appends the original ntp.conf file to the end of the ntp.conf.dhcp so that it should no longer strip out servers originally specified therein.

I have placed reminders on my calendar to check over the next week or so but believe we can now close this ticket.

Note: See TracTickets for help on using tickets.