• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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