NTP – How to Fix ‘ntpdate: no server suitable for synchronization found’

ntptime

My clock is off, so I would like to synchronize it using ntpdate. I tried several different NTP servers, but for some reason I always get the following error message:

$ sudo ntpdate ntp.ubuntu.com
4 Mar 12:27:35 ntpdate[1258]: no server suitable for synchronization found
$ sudo ntpdate pool.ntp.org
4 Mar 12:27:50 ntpdate[1267]: no server suitable for synchronization found
$ sudo ntpdate de.pool.ntp.org
4 Mar 12:28:01 ntpdate[1273]: no server suitable for synchronization found
$ sudo ntpdate us.pool.ntp.org
4 Mar 12:28:12 ntpdate[1276]: no server suitable for synchronization found

Related questions

I have looked through related questions, but none solve my problem:

Things I have tried

I installed the ntp package

…and tried using the ntpd daemon instead of the ntpdate utility. It won't sync my time either; the daemon starts fine, but my clock remains off. I even tried using the exact /etc/ntp.conf from the accepted answer in the latter post, and restarting the daemon. No go. Anyway, I don't want to use the daemon. I am perfectly aware that ntpdate is considered "deprecated", and it is advised to use ntpd -q instead. Also see here:

But since ntpd doesn't work for me either, the problem lies elsewhere. And I find that I would prefer not having to install any extra packages just for synchronizing the clock. ntpdate comes pre-installed with Ubuntu, and it should work just fine. So I uninstalled the ntp package again.

Maybe port 123 is blocked?

From this post:

…I got the idea that port 123 may be blocked from my computer / network at my work place. Indeed,

$ sudo nmap -p123 -sU -P0 localhost
...
PORT    STATE  SERVICE
123/udp closed ntp 
...
$ sudo ufw allow 123/udp
Rules updated
Rules updated (v6)
$ sudo nmap -p123 -sU -P0 localhost
...
PORT    STATE SERVICE
123/udp open  ntp
...

But still:

$ sudo ntpdate ntp.ubuntu.com
4 Mar 13:06:16 ntpdate[4361]: no server suitable for synchronization found

Even with the -u option, which tells ntpdate to use an unprivileged port for syncing (instead of port 123) which is certainly not blocked from my work place:

$ sudo ntpdate -u ntp.ubuntu.com
4 Mar 13:06:28 ntpdate[4427]: no server suitable for synchronization found

Maybe the strata are too high?

Lastly, from this post over at serverfault:

…I thought that maybe the strata from the NTP servers are too high. They aren't, though. Let's see a little more debugging info:

$ sudo ntpdate -dv ntp.ubuntu.com
 4 Mar 13:12:24 ntpdate[4523]: ntpdate 4.2.6p5@1.2349-o Wed Oct  9 19:08:07 UTC 2013 (1)
Looking for host ntp.ubuntu.com and service ntp
host found : golem.canonical.com
transmit(91.189.89.199)
transmit(91.189.94.4)
transmit(91.189.89.199)
transmit(91.189.94.4)
transmit(91.189.89.199)
transmit(91.189.94.4)
transmit(91.189.89.199)
transmit(91.189.94.4)
transmit(91.189.89.199)
transmit(91.189.94.4)
91.189.89.199: Server dropped: no data
91.189.94.4: Server dropped: no data
server 91.189.89.199, port 123
stratum 0, precision 0, leap 00, trust 000
refid [91.189.89.199], delay 0.00000, dispersion 64.00000
transmitted 4, in filter 4
reference time:    00000000.00000000  Mon, Jan  1 1900  1:00:00.000
originate timestamp: 00000000.00000000  Mon, Jan  1 1900  1:00:00.000
transmit timestamp:  d6c041ae.e6166441  Tue, Mar  4 2014 13:12:30.898
filter delay:  0.00000  0.00000  0.00000  0.00000 
         0.00000  0.00000  0.00000  0.00000 
filter offset: 0.000000 0.000000 0.000000 0.000000
         0.000000 0.000000 0.000000 0.000000
delay 0.00000, dispersion 64.00000
offset 0.000000

server 91.189.94.4, port 123
stratum 0, precision 0, leap 00, trust 000
refid [91.189.94.4], delay 0.00000, dispersion 64.00000
transmitted 4, in filter 4
reference time:    00000000.00000000  Mon, Jan  1 1900  1:00:00.000
originate timestamp: 00000000.00000000  Mon, Jan  1 1900  1:00:00.000
transmit timestamp:  d6c041af.1948fc50  Tue, Mar  4 2014 13:12:31.098
filter delay:  0.00000  0.00000  0.00000  0.00000 
         0.00000  0.00000  0.00000  0.00000 
filter offset: 0.000000 0.000000 0.000000 0.000000
         0.000000 0.000000 0.000000 0.000000
delay 0.00000, dispersion 64.00000
offset 0.000000

 4 Mar 13:12:33 ntpdate[4523]: no server suitable for synchronization found

Pfeeewww… this was a long one, sorry for that. I'm stumped. Any clues?

Update: additional infos

No matter whether an NTP server HOSTNAME figures in /etc/ntp.conf, and no matter whether the ntpd service is running or not, whenever I run sudo ntpdate -u HOSTNAME, I get no server suitable for synchronization found. Same thing when the ntpd service is not running and I omit the -u option. When the ntpd service is running and I omit the -u option, I instead get the NTP socket is in use, exiting.

Also:

$ timedatectl status
      Local time: Wed 2014-03-05 13:11:54 CET
  Universal time: Wed 2014-03-05 12:11:54 UTC
        Timezone: Europe/Berlin (CET, +0100)
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
      DST active: no
 Last DST change: DST ended at
                  Sun 2013-10-27 02:59:59 CEST
                  Sun 2013-10-27 02:00:00 CET
 Next DST change: DST begins (the clock jumps one hour forward) at
                  Sun 2014-03-30 01:59:59 CET
                  Sun 2014-03-30 03:00:00 CEST

But the UTC time is not correct here. Right now UTC time is 11:11, not 12:11.

And:

$ sudo hwclock --show
Wed 05 Mar 2014 01:11:56 PM CET  -0.625627 seconds

Best Answer

Your hosting provider is blocking ntp packets. This heavy handed approach has been implemented by some ISPs in response to the DDoS attacks. You can see that ntpdate is sending the packets fron the ntpdate -vd :

transmit(91.189.94.4)
transmit(91.189.89.199)
transmit(91.189.94.4)
transmit(91.189.89.199)

I would contact your ISP and ask if they are blocking external ntp requests and if they have a local server that you can use for time sync.

There are a couple more obscure possibilities but it is tough to rule them out since you have not posted any logs from syslog.