NTPD time is not synchronised after it is changed

I installed ntpd service on a server running CentOS. I set the different servers from which the daemon is polling every 65seconds. When I restart the service, the clock is automatically synchronized with NTP. However, if I use the linux command

date +%T -s "10:00:00"

for example, the clock is adjusted to this time, and even though the ntpd service is still running, this time does not synchronise back to the NTP time.

Can anyone help me please? I cannot find the reason why this update is not occurring

Thanks
drinu78Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Michael WorshamStaff Infrastructure ArchitectCommented:
Most likely the drift time is too high, thus why ntpd isn't resyncing. The ntp daemon won't adjust the local time if the offset is too great.  That's why a lot of ntpd startup scripts use ntpdate to sync the clock before startings ntpd.

Please paste the output of 'ntpq -p' here for further review.


0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
nociSoftware EngineerCommented:
IF the time is too far out of sync NTP will not sync it anymore.
This is no bug, it is by design, if you have a good time provisioning then your clock might drift a little but not minutes away from the correct time.
So if a difference to TOO big you need (as a sysadmin ) to confirm the jerk to the right time (including all stuff that could happen to processes that might break under a timeshift to the future or back ward).

You can use ntpdate (ntpdate ntp-server ). to get that straight, you need to do:
  service  ntpd stop ; ntpdate .... ; service ntpd start

on the ... fill in the timeserver of choice (f.e. the one you have in your ntpd.conf
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Distributions

From novice to tech pro — start learning today.