15

My ntp.conf file:

user@pc[0][07:37:40]:/etc$ cat /etc/ntp.conf
idriftfile /var/lib/ntp/ntp.drift
server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org
server pool.ntp.org

Command output:

user@pc[0][07:37:24]:/etc$ sudo ntpdate -dv pool.ntp.org
18 Jun 07:37:35 ntpdate[10737]: ntpdate 4.2.4p8@1.1612-o Tue Apr 19 07:15:05 UTC 2011 (1)
Looking for host pool.ntp.org and service ntp
host found : conquest.kjsl.com
transmit(198.137.202.16)
transmit(216.45.57.38)
transmit(64.6.144.6)
transmit(198.137.202.16)
transmit(216.45.57.38)
transmit(64.6.144.6)
transmit(198.137.202.16)
transmit(216.45.57.38)
transmit(64.6.144.6)
transmit(198.137.202.16)
transmit(216.45.57.38)
transmit(64.6.144.6)
transmit(198.137.202.16)
transmit(216.45.57.38)
transmit(64.6.144.6)
198.137.202.16: Server dropped: no data
216.45.57.38: Server dropped: no data
64.6.144.6: Server dropped: no data
server 198.137.202.16, port 123
stratum 0, precision 0, leap 00, trust 000
refid [198.137.202.16], delay 0.00000, dispersion 64.00000
transmitted 4, in filter 4
reference time:    00000000.00000000  Thu, Feb  7 2036  0:28:16.000
originate timestamp: 00000000.00000000  Thu, Feb  7 2036  0:28:16.000
transmit timestamp:  d1a71a93.1f16c1e3  Sat, Jun 18 2011  7:37:39.121
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 216.45.57.38, port 123
stratum 0, precision 0, leap 00, trust 000
refid [216.45.57.38], delay 0.00000, dispersion 64.00000
transmitted 4, in filter 4
reference time:    00000000.00000000  Thu, Feb  7 2036  0:28:16.000
originate timestamp: 00000000.00000000  Thu, Feb  7 2036  0:28:16.000
transmit timestamp:  d1a71a93.524a05dd  Sat, Jun 18 2011  7:37:39.321
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 64.6.144.6, port 123
stratum 0, precision 0, leap 00, trust 000
refid [64.6.144.6], delay 0.00000, dispersion 64.00000
transmitted 4, in filter 4
reference time:    00000000.00000000  Thu, Feb  7 2036  0:28:16.000

transmitted 4, in filter 4
reference time:    00000000.00000000  Thu, Feb  7 2036  0:28:16.000
originate timestamp: 00000000.00000000  Thu, Feb  7 2036  0:28:16.000
transmit timestamp:  d1a71a93.524a05dd  Sat, Jun 18 2011  7:37:39.321
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 64.6.144.6, port 123
stratum 0, precision 0, leap 00, trust 000
refid [64.6.144.6], delay 0.00000, dispersion 64.00000
transmitted 4, in filter 4
reference time:    00000000.00000000  Thu, Feb  7 2036  0:28:16.000
originate timestamp: 00000000.00000000  Thu, Feb  7 2036  0:28:16.000
transmit timestamp:  d1a71a93.857c6fbd  Sat, Jun 18 2011  7:37:39.521
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

18 Jun 07:37:40 ntpdate[10737]: no server suitable for synchronization found
Braiam
  • 67,791
  • 32
  • 179
  • 269
wting
  • 384

7 Answers7

6

my ntp (/etc/ntp.conf) says

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

change yours to this and do it as root (sudo -i)

service ntp stop

do the changes:

service ntp start

test it

date

UPDATE: last night I have to configure a machine and found this that could be helpful

~# dpkg-reconfigure tzdata

You can set your time zone and exit (as root: sudo -i)

:~# dpkg-reconfigure tzdata


Current default time zone: 'America/Montevideo'
Local time is now:      Tue Mar  6 13:18:00 UYST 2012.
Universal Time is now:  Tue Mar  6 15:18:00 UTC 2012.

:~# 
aidan
  • 364
maniat1k
  • 8,130
1

The ntp faq at the University of Delaware (the home of NTP, I'd say) mentions this error. The link is http://www.eecis.udel.edu/~ntp/ntpfaq/NTP-s-trouble.htm#AEN4972.

You can try to get ntpdate to run by using ntpdate -d servername or ntpdate -u servername. Stock ntpdate doesn't get the servername from the ntp config file. I think it's wise to get your time close to correct by hand before trying these commands, as suggested by William Ting in comments here.

The two ntpdate commands above send, and expect UDP responses, on a random public port number, not port 123, on your computer so they avoid potential complications from using that privileged port inbound. Of course outbound filters could still be a problem.


The FAQ suggests packet filtering as a cause as it may be eliminating the necessary UDP packets from passing to and from port 123 on your computer. You should adjust your packet filters on your systems and routers as necessary.

Note that ntpdate takes a server argument. ntpdate-debian uses the server specified in /etc/default/ntpdate. Using ntpdate without an argument can cause the error mentioned in the question (the questioner is specifying it properly, however).

John S Gruber
  • 13,336
1

Use it with option -u and a reliable server. E.g. sudo ntpdate -u pool.ntp.org

FNia
  • 361
1

Make sure your firewall allows the outbound connection.

Using commands:

sudo ntpdate ntp.ubuntu.com

and:

sudo ntpdate-debian

I was getting the similar error "ntpdate[14593]: no server suitable for synchronization found" before changing my router firewall to allow port 123, protocol UDP, outbound.

Skurfur
  • 111
  • 2
1

First of all, you do not need ntp server to synchronize time (I see you have /etc/ntp.conf that come from the package ntp, providing the server), and if you use that server, you do not need to use ntpdate manually.

To be more specific regarding the fact that ntp package is not required, time is synchronized every time your network connection go up using ntpdate-debian, that comes in the default installation.

So, to try manual synchronization, stop the server

sudo service ntp stop

then run

sudo ntpdate-debian

that is the debian helper application to run ntpdate without the hassle you have now.

enzotib
  • 93,831
  • I was manually synchronizing because ntp service wasn't running and the server time was off by ~90 minutes. I get the same error message with sudo ntpdate-debian as above. – wting Jun 18 '11 at 19:47
  • Exactly the same error message? The ntp.conf file is not the default, have you modified it? There is also a syntax error, first word should be driftfile. – enzotib Jun 19 '11 at 06:59
  • Thanks for catching the extra i. I removed it and ran sudo ntpdate-debian. The results:
    user@pc[0][11:06:06]:~$ sudo ntpdate-debian
    19 Jun 11:06:23 ntpdate[4087]: no server suitable for synchronization found
    
    – wting Jun 19 '11 at 16:07
  • Cannot understand wath's wrong with your ntp.conf, this direct call to ntpdate works for me, make me known: sudo ntpdate 0.ubuntu.pool.ntp.org 1.ubuntu.pool.ntp.org 2.ubuntu.pool.ntp.org 3.ubuntu.pool.ntp.org ntp.ubuntu.com – enzotib Jun 19 '11 at 16:22
  • @enzotib: I just tried your command, still gives me the "no server suitable..." error. – wting Jun 20 '11 at 03:10
  • Last try, given the 90min difference, make a raw correction of the time by hand, then try ntpdate-debian for a precision correction. – enzotib Jun 20 '11 at 05:08
  • I already set the time manually using sudo date before trying your commands. :( – wting Jun 20 '11 at 07:10
0

I have found the solution because I had to. If there are not any firewall intervertion problems https://serverfault.com/questions/277375/ntpdate-d-server-dropped-strata-too-high link gives the solution. At least mine.

edib
  • 230
0

I ran into this same problem when trying to synchronize time on a Raspberry Pi on my workplace network. It seems that external ntp packets were being blocked on my network. To fix this, I removed the servers listed in the default ntp.conf file and added my internal network server. If you aren't sure of the exact server name to use, you can find it in the /etc/resolv.conf.

Since only ntpdate-debian uses the ntp.conf file, this will only fix ntpdate-debian (not ntpdate).

Fabby
  • 34,259