Support Questions
Find answers, ask questions, and share your expertise

How do I resolve clock offset issue?

Explorer

I get following health issue.

 

The host's NTP service did not respond to a request for the clock offset.

 

How do I resolve it?

 

Thanks,

Kewal

1 ACCEPTED SOLUTION

Explorer

Yes, the problem was at the Firewall , one of the rules was changes ;

after the problem was fix the NTP was updated.

 

Thanks so much for your help

View solution in original post

19 REPLIES 19

I just saw this after an office move. The servers were offline for a while.

 

This is what I did for our CentOS Linux servers (similar, but not the same, steps would work for Ubuntu/Debian):

 

* verified/updated the /etc/ntp.conf file to be the same across the cluster

* stopped the ntp daemon: /etc/init.d/ntpd stop

* connected to the ntp server named in the ntp.conf file: ntpupdate <ntp_server>

* started the ntp daemon: /etc/init.d/ntpd start

* added ntpd to the startup manager: chkconfig add ntpd

* set ntpd to start in default reunlevels: chkconfig ntpd on

 

This cleared the offset issue. If this doesn't do it for you, you might also have to look into drift, or dig deeper into the time synchronization.

 

 

Explorer

Thanks a lot for you detailed answer. 

 

I deleted the cluster and rebuilt it from scratch. Now, it is working fine.(Fingers crossed)

 

But, It seems, your procedure would definitely solve the problem.

New Contributor

Thanks for your detailed answer. it helped me! 

 

I had to repeat the step 4 and 5 twice; but it fixed my issue. I'm keeping the fingers crossed now! 🙂 

New Contributor

Many thanks. I followed these  steps and it fixed my clock offset issue.

 

* verified/updated the /etc/ntp.conf file to be the same across the cluster

* stopped the ntp daemon: /etc/init.d/ntpd stop

* connected to the ntp server named in the ntp.conf file: ntpupdate <ntp_server>

* started the ntp daemon: /etc/init.d/ntpd start

* added ntpd to the startup manager: chkconfig add ntpd

* set ntpd to start in default reunlevels: chkconfig ntpd on

Explorer

i got the next:

 

$sudo service ntp stop
* Stopping NTP server ntpd [ OK ]
root@cluster-01:~# sudo ntpdate ntp.ubuntu.com
11 Jun 06:47:14 ntpdate[29757]: no server suitable for synchronization found

 

i try to do it with the with NTP .. instead NTPD

 

....

Expert Contributor

Hi anton_85

 

Try this article, it explains time zones and settings which is very well explained.

 

http://www.linuxsecrets.com/easyblog/2015/01/30/1374-fixing-date-and-setting-time-and-zone-on-rhel-6...

 

 

Explorer

Hi nauseous, 

apprently, the problem is at my firewall, where I can't ping my gateway neither other sites out of my network.

so that's way i can't see it.

Rising Star

Hi,

 

If firewall is the problem you can ask network admin to open add chains to that specific URL . or the other way you can set up your own NTP server within that network itself.

 

Thanks,

Sathish

Thanks,
Sathish (Satz)

Super Collaborator
Check with your network administrators, they have NTP services you can
point to most likely within the firewall.

Explorer

Yes, the problem was at the Firewall , one of the rules was changes ;

after the problem was fix the NTP was updated.

 

Thanks so much for your help

New Contributor

Thanks for the help 

 

just 2 steps my issue is resolved might usefull to other 

i tried

/etc/init.d/ntpd start

/etc/init.d/ntpd stop

 

it works for me

Explorer
Thanks, it works for me too

Explorer

I have installed ntpd on all 8 nodes, checked the ntp.conf file across the nodes, its same..

So i stopped the ntpd and tried running the ntpupdate command and its saying command not found.. So could you please  explain this step?

-> connected to the ntp server named in the ntp.conf file: ntpupdate <ntp_server>

Expert Contributor
There is no ntpupdate command.

You can update ntp by typing

# ntpdate -u {Main node sync'ed to NTP server IP address or Domain name
here}

Example

# ntpdate -u domains.ntp.com

OR

# ntpdate -u 192.168.0.2

You should only have 1 node announcing NTP and other nodes getting time
from main node.

Explorer
Thanks a lot.. 🙂

Expert Contributor

New Contributor

I had to restart Cloudera SCM Agent to fix this alert after NTP reconfiguration:

service cloudera-scm-agent restart

 

Expert Contributor
I use puppet and foreman to configure each system the same for all ntp
clients to a central ntp server.

Great information here
http://www.linuxsecrets.com/blog/4tutorial-and-install-howto/2014/06/26/906-how-to-install-and-confi...

New Contributor

If you are facing issue Clock offset issue then there will be problem with your ntp is not in sync.

 

To resolve follow some commands

 

Check in which host it is giving problem go under that host through CLI and

 

1. systemctl status ntpd.service (For checking the status, if its not working the it showing Inactive message)

 

2. route -n copy the ntp server ip address (You will find under Destination column) 

 

3. ntpdate <ntp server ip address>

 

4. systemctl start ntpd.service (for starting & syncing your host, after firing wait for sometime)

 

5. ntpstat (for checking whether it is synchronized or not it should be in synchronized)

 

after performing above steps your Clock offset issue will get resolved.

 

Regard,

 

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.