cPanel ntp server time wrong

If you find that your server time is still wrong after setting the TimeZone and syncing the time, you may have to set the time manually once. The reason for this is that NTPd has a sanity check which is normally 1000 seconds. If the server time is off by more than 1000 seconds, NTPd will assume there is a problem and will refuse to set the time.

This applies to most Linux servers using NTP to keep the server time in sync. It's a bit less obvious on cPanel as you are shielded from the logs by way of the cPanel control panel.

The following is an example log entry:

/var/log/messages:Aug  6 12:21:02 server ntpd[13955]: time correction of 14435 seconds exceeds sanity limit (1000); set clock manually to the correct UTC time.

To fix the issue, SSH into your server and execute the follow command:

sudo date -s 'HH:MM:SS'

Where HH:MM:SS is the current time, for example: 16:33:00.

Once you do this, you can then sync the time in the cPanel control panel.

This solution is assuming that you have not blocked your outbound (EGRES) UDP port 123 in your firewall, which blocks NTP from being able to communicate with time servers.

Have good time with it!

Read more…

Comments