After configuring the NTP service as instructed in Setting Up NTP Service (Linux), you can restart ntpd to reset the sync interval. To manually set the ntpd synch interval, perform the following steps:
Run the following command to modify the NTP configuration file.
vi /etc/ntp.conf
Press i to enter the edit mode and configure as follows:
i. Add the pound sign (#
) at the beginning of server time1.tencentyun.com iburst
, if any, to comment it out.
ii. Add the following configurations. minpoll 4
means the minimum interval is 24, and maxpoll 5
means the maximum interval is 25.
server time1.tencentyun.com minpoll 4 maxpoll 5
The result should be as follows. Enter :wq to save changes and close the file.
3. Restart ntpd and run ntpd -p
. The poll
value you will see is 16 (namely, 24).
NTP servers usually use the BeiDou satellite clock.
localhost.localdomain timeout
error?The error is shown below.
Check and confirm whether you ran POSTROUTING
. If yes, change the source IP in the ntp.conf
configuration file to eth0's IP address.
Tencent Cloud provides private NTP servers for Tencent Cloud resources. For other devices, you can use the public NTP servers provided by Tencent Cloud for synchronization.
Private NTP Server
time1.tencentyun.com
time2.tencentyun.com
time3.tencentyun.com
time4.tencentyun.com
time5.tencentyun.com
Public NTP Server
ntp.tencent.com
ntp1.tencent.com
ntp2.tencent.com
ntp3.tencent.com
ntp4.tencent.com
ntp5.tencent.com
The following are old public NTP server addresses. These old addresses can still be used, but you are advised to use the new ones.
time.cloud.tencent.com
time1.cloud.tencent.com
time2.cloud.tencent.com
time3.cloud.tencent.com
time4.cloud.tencent.com
time5.cloud.tencent.com
Please check whether the NTP service is enabled. To use the NTP synchronization feature later, see the following documents to set NTP. Then re-create the custom image.
It may be caused by the Cloud-Init initialization. Please delete the NTP-related configurations in /etc/cloud/cloud.cfg
before creating a custom image. For more information, see Cloud-Init & Cloudbase-Init.
All services involving Tencent Cloud private domain name resolution will be affected. For example,
Check that the windowstime service is enabled on the instance. You may need to manually enable it to auto sync the instance's system time. We recommend enabling the service autostart.
ntpq -np
command to view the synchronization time?The error is shown below.
Please check whether no IP or incorrect IP is configured for listen
in the /etc/ntp.conf
configuration file. Change to the primary private IP of the instance and restart ntpd.
When using the public NTP servers to sync time, the no server suitable for synchronization found
error occurs.
This may be caused by the NTP protection policy in response to the DDoS attacks to the public IP address of the instance. This policy blocks all public inbound traffic at the Tencent Cloud's source point 123 and causes synchronization exception. We recommend trying to use the private NTP servers to sync time.
Was this page helpful?