I am trying to setup the NTP server on Ubuntu machine. Am breaking my head in this particular issue.

Getting an error ntpdate[5005]: no server suitable for synchronization found when doing the command ntppdate.

Can anyone please help me out in this?


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

Also when I gave command netstat -anltp | grep "LISTEN"

tcp    0   0  *         LISTEN   1816/dnsmasq
tcp    0   0    *         LISTEN   939/sshd
tcp    0   0 *         LISTEN   1013/cupsd
tcp    0   0*         LISTEN   5529/rsession
tcp    0   0   *         LISTEN   1275/vmware-authdla
tcp    0   0*         LISTEN   5822/rsession
tcp6   0   0 :::80                   :::*              LISTEN   1400/apache2
tcp6   0   0 :::22                   :::*              LISTEN   939/sshd
tcp6   0   0 ::1:631                 :::*              LISTEN   1013/cupsd

So what should I do so that it listens on 123?

If I get output as

123/udp open  ntp

If I give command nmap -p 123 -sU -P0, it means UDP is open right? Then why doesn't it show in the command to to show listening ports?

  • 1
    Possible helpful topics on AU: askubuntu.com/questions/49401/… Also: NTP uses UDP. Can you check that your firewall allows outbound UDP packets on port 123? – Rinzwind Aug 27 '12 at 6:39
  • 2
    Can you add both to your question and remove the comments? :) netstat -anltp | grep "LISTEN" should show which ports are open. – Rinzwind Aug 27 '12 at 7:57
  • 1
    I gave command "sudo ufw allow 123/udp" to allow the udp access to port 123 ,but it still didnt work .. – Anups Aug 27 '12 at 8:42
  • 1
    Have you looked at: askubuntu.com/questions/148187/… – david6 Aug 27 '12 at 9:22
  • 1
    Post output from 'ntpq -c rl'. – david6 Aug 27 '12 at 10:10

The problem was coming from network default restrictions given in /etc/ntp.conf. You may have to uncomment the following lines in ntp server configuration file:

# Clients from this (example!) subnet have unlimited access, but only if
# cryptographically authenticated.
#restrict mask notrust


# Clients from this (example!) subnet have unlimited access, but only if
# cryptographically authenticated.
restrict mask
| improve this answer | |

You may be being blocked from reaching ubuntu.pool.ntp.org

Try a different NTP server pool.

Ask your ISP (or Network Administrator) for a local NTP server (or cluster).

| improve this answer | |

If you want to sync with external time ref you don't have to "listen".

Check if you can reach 0.ubuntu.pool.ntp.org (ping and nmap -p 123 -sU 0.ubuntu.pool.ntp.org)

| improve this answer | |

This error appears when the ntp server tries to syncronize the local time using remote servers.

Check if your machine has Internet access and the port 123/UDP is not blocked:

If you want a ntp server without internet access you must not define servers at your ntp.conf file, you can comment it adding a # at the start of the line:

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

You can get more info at: http://support.ntp.org/bin/view/Support/WebHome

| improve this answer | |

I have give a detailed answer from top to bottom. You might want to skip to middle of my answer or just refer the screenshots below for understanding it in a glance.

You need to configure ntp with servers as follows:

You should at least set following parameter in /etc/ntp.conf config file: server

For example, open /etc/ntp.conf file using nano text editor:

  sudo nano /etc/ntp.conf

Locate server parameter and if it is empty set it as follows:

  server pool.ntp.org

But usually In ubuntu already some servers are prewritten which might be

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

enter image description here

Save the file and restart the ntpd service:

   /etc/init.d/ntpd start

You can synchronize the system clock to an NTP server immediately with following command:

   sudo ntpdate pool.ntp.org

or just run already servers are defined

sudo ntpdate 0.ubuntu.pool.ntp.org

or other servers that are defined using server


sudo ntpdate <one of the servername in /etc/ntp.conf>

BUT after that there is a chance you get the Error NTP socket in use as shown below:

enter image description here

In that case just run

ntpdate -u pool.ntp.org 

to update when ntp deamon is running

OR just stop the deamon,update and start it again as follows:

$ sudo ntpdate pool.ntp.org
$ sudo service ntp stop
$ sudo ntpdate pool.ntp.org
$ sudo service ntp start

and you will get

enter image description here

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.