1

Today one of my servers hosted on Digital Ocean (the only one hosted there) is reporting wrong time. It's two hours late.

sudo dpkg-reconfigure tzdata
# then I set up the timezone to Europe/Rome

Current default time zone: 'Europe/Rome'
Local time is now:      Sat Jan 31 12:35:21 CET 2015.
Universal Time is now:  Sat Jan 31 11:35:21 UTC 2015.

But the time now is 10:35 in Rome and 9:35 UTC.

The command date is reporting the same time. I tried updating the time with:

sudo ntpdate -s ntp.ubuntu.com
# the same
sudo ntpdate -s time.nist.gov
# same again

By removing the -s flag I receive some errors:

sudo ntpdate time.nist.gov
31 Jan 14:11:49 ntpdate[18243]: sendto(time-a.timefreq.bldrdoc.gov): Operation not permitted
31 Jan 14:11:51 ntpdate[18243]: sendto(time-a.timefreq.bldrdoc.gov): Operation not permitted
31 Jan 14:11:53 ntpdate[18243]: sendto(time-a.timefreq.bldrdoc.gov): Operation not permitted
31 Jan 14:11:55 ntpdate[18243]: sendto(time-a.timefreq.bldrdoc.gov): Operation not permitted
31 Jan 14:11:57 ntpdate[18243]: no server suitable for synchronization found

What else do I have to change in order to fix the problem ?

  • Drop the -s flag to ntpdate, for a start: we'd like to see the output, and forcibly sending it to syslog isn't the best way of doing that! It may be, for example, that ntpd is running, in which case ntpdate won't fix the clock and ntpd won't fix it because you're running without -g and the clock's two hours wrong. Only more output can help us isolate these issues! – MadHatter Jan 31 '15 at 11:04
  • Right, if I drop the -s flag I receive some errors. I have updated the post. – Nicola Ferraro Jan 31 '15 at 11:14
  • Is this a containerised server using OpenVZ? – MadHatter Jan 31 '15 at 11:39
  • 1
    Are you allowing 123/udp out through your firewall? – Håkan Lindqvist Jan 31 '15 at 13:31
  • 1
    @MadHatter DigitalOcean are all KVM. No containers. – Michael Hampton Jan 31 '15 at 15:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.