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:
- Unable to synchronize time using NTP - this guy gets a different error than I; his problem was a conflict with the
ntpddaemon. I do not have thentppackage (which includes thentpddaemon) installed at all. - How to force a clock update using ntp? - this guy's problem is that the
ntpdatecommand wouldn't properly work at boot time when he put it into his/etc/rc.local, and the problem was similarly a conflict with thentpddaemon that was running. Neither am I trying to runntpdateat boot time, nor (again) do I have thentpddaemon installed. - Unable to sync time using `ntpdate`, error: "no server suitable for synchronization found" - this is my error alright, but the accepted answer is basically "Use
ntpdinstead ofntpdate". Aaarggh...
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