• Inviting everyone who uses WordPress management tools in Plesk
    The Plesk team is conducting a 60-minute research session that includes an interview and a moderated usability test.
    To participate, please use this link .
    Your experience will help shape product decisions and ensure the tools better support real-world use cases.

Resolved System time not synchronizing

MMagnani

New Pleskian
Hello,

I set Plesk to synchronize system time and then the ntpdate command was scheduled.
/usr/sbin/ntpdate -b -s some.ntp.server

As the system time is not being updated, if I run the cron task from Plesk panel, the task returns an error and syslog shows:
Mar 15 22:05:15 server crontab[30665]: (root) LIST (root)
Mar 15 22:05:15 server ntpdate[30669]: the NTP socket is in use, exiting

If I stop ntp service, the same task runs successfully and syslog shows:
Mar 15 22:06:21 server crontab[31024]: (root) LIST (root)
Mar 15 22:06:28 server systemd[1]: Time has been changed
Mar 15 22:06:28 server ntpdate[31028]: step time server xxx.xxx.xxx.xxx offset 0.000354 sec
Mar 15 22:06:28 server systemd[13977]: Time has been changed

This way, should ntp service be kept always stopped?
If so, what is the proper way to do that?

Thank you!
 
Hi MMagnani,

If your OS with systemd, then you can use `systemctl disable ntpd.service`

BUT! I can't understand why you want to disable ntpd and start to use ntpdate via crontab. Can you clarify your decision?
 
If you want to execute ntpdate with the ntpd daemon already up and running, use the following command syntax:

# /usr/sbin/ntpdate -u some.ntp.server
 
Back
Top