After configuring the NTP service on a Linux instance, you can restart ntpd to reset the synchronization interval. To manually set the ntpd synchronization interval, perform the following steps:
vi /etc/ntp.conf
#
) at the beginning of server time1.tencentyun.com iburst
, if any, to comment it out.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.ntpd -p
. The poll
value you will see is 16 (namely, 24), as shown in the following figure:NTP servers usually use the BeiDou satellite clock.
localhost.localdomain timeout
error?The error is as shown in the following figure.
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.
time1.tencentyun.com
time2.tencentyun.com
time3.tencentyun.com
time4.tencentyun.com
time5.tencentyun.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 document according to the operating system to set NTP. Then re-create the custom image.
No. As long as you can access your NTP, the synchronization works.
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 as shown in the following figure.
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.
The no server suitable for synchronization found
error is as shown in the following figure.
It 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?