Showing posts with label NTP. Show all posts
Showing posts with label NTP. Show all posts

ntpdate no server suitable for synchronization found

I was configuring one of head node of our cluster server to synchronise from our time server in our organisation, and in turn the head node becomes a NTP Server for the compute nodes that on a private IP addresses. As I was configuring the compute nodes and encounter "ntpdate[4933]: no server suitable for synchronization found"

I configured the ntp servers and ntp clients according to Setting up NTP Server for Local Network. And yet the error remain unresolved. Finally, I came across a solution

  1. Open /etc/ntp/step-tickers and replace with the name of your local NTP Server
  2. Open /etc/ntp/ntpservers and replace with the name of your local NTP Server
  3. Restart your ntp services. You should eradicate the problem

Setting NTP Client on CentOS

To set your CentOS Server as a NTP Client, here how

# yum install ntp
# chkconfig --levels 235 ntpd on
# ntpdate 0.pool.ntp.org
# /etc/init.d/ntpd start

Setting hardware Clock to System Time

Have you encountered that after a reboot your hardware clock is not in sync with the system clock as the hardware clock keeps the time when power is turned off, you may want to sync the hardware clock to the system time once it is accurate. This is a followup of the Article "How to setup NTP Server for local network"

# hwclock --systohc

Setting up NTP Server for Local Network

First for definition. From Wikipedia

The Network Time Protocol (NTP) is a protocol for synchronizing the clocks of computer systems over packet-switched, variable-latency data networks. NTP uses UDP on port 123 as its transport layer.


Setting Up NTP Server

Step 1: Install NTP Server and Client
# yum install ntp


Step 2: Configuration at /etc/ntp.conf
(The Basic Configuration is sufficient. A few things to note)
# vim /etc/ntp.conf

(Inside the /etc/ntp.conf) This statement is to allow local network to access the Server...
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap

(Inside the /etc/ntp.conf) Ensure the localhost has full access without any restructing password
restrict 127.0.0.1


Step 3: Start the Services

# chkconfig --levels 235 ntpd on
# ntpdate 0.pool.ntp.org
# service ntpd start

Check whether it is working
# ntpq -p





Setting Up NTP Clients to sync with the local NTP Server and NTP Client


Step 1: Install the ntpd services
# yum install ntp


Step 2: Configure the /etc/ntp.conf
# vim /etc/ntp.conf

(Inside the /etc/ntp.conf) Point to the local NTP Server
server 192.168.1.1


Step 3: Start the Services
# chkconfig --levels 235 ntpd on
# ntpdate 192.168.1.1
# service ntpd start


Check whether it is working
# ntpq -p
For more readings:
  1. How to Setup a Time Server in Linux from TechGuruLive (Debian-Based Server)