宝塔用户_aldetf 发表于 2024-8-15 23:20:01

【待反馈】严重!!!同步时间错误!!!会导致服务器时

为了能快速了解并处理您的问题,请提供以下基础信息:
面板、插件版本:9.1

系统版本:Anolis7

问题描述:同步时间时若遇到dns错误,则会使用 00:00:00 覆盖当前时间!!!

相关截图(日志、错误):时间同步是从01:30开始
|-正在尝试从0.pool.bt.cn同步时间..
Error resolving 0.pool.bt.cn: Name or service not known (-2)
15 Aug 01:30:02 ntpdate: Can't find host 0.pool.bt.cn: Name or service not known (-2)
15 Aug 01:30:02 ntpdate: no servers can be used, exiting
|-正在尝试从1.pool.bt.cn同步时间..
Error resolving 1.pool.bt.cn: Name or service not known (-2)
15 Aug 01:30:02 ntpdate: Can't find host 1.pool.bt.cn: Name or service not known (-2)
15 Aug 01:30:02 ntpdate: no servers can be used, exiting
|-正在尝试从0.asia.pool.ntp.org同步时间..
Exiting, name server cannot be used: Temporary failure in name resolution (-3)15 Aug 01:30:12 ntpdate: name server cannot be used: Temporary failure in name resolution (-3)
|-正在尝试从www.bt.cn同步时间..
date: extra operand ‘<html>’
Try 'date --help' for more information.
Thu Aug 15 00:00:00 CST 2024
|-正在尝试将当前系统时间写入硬件..
Thu Aug 15 00:00:01 CST 2024
|-时间同步完成!
----------------------------------------------------------------------------
★ Successful
----------------------------------------------------------------------------

这个问题应该在8.x版本就有,之前我同事提醒过我服务器时间不对,差一个多小时,我没有在意,今天才看到是同步时间错误导致!

宝塔用户_aldetf 发表于 2024-8-15 23:30:22

刚看了下,8月9号开始出现这个问题的,日志显示8月9号我没有登陆过宝塔

----------------------------------------------------------------------------
★ Successful
----------------------------------------------------------------------------
|-正在尝试从0.pool.bt.cn同步时间..
Error resolving 0.pool.bt.cn: Name or service not known (-2)
9 Aug 01:30:01 ntpdate: Can't find host 0.pool.bt.cn: Name or service not known (-2)
9 Aug 01:30:01 ntpdate: no servers can be used, exiting
|-正在尝试从1.pool.bt.cn同步时间..
Error resolving 1.pool.bt.cn: Name or service not known (-2)
9 Aug 01:30:01 ntpdate: Can't find host 1.pool.bt.cn: Name or service not known (-2)
9 Aug 01:30:01 ntpdate: no servers can be used, exiting
|-正在尝试从0.asia.pool.ntp.org同步时间..
Exiting, name server cannot be used: Temporary failure in name resolution (-3) 9 Aug 01:30:11 ntpdate: name server cannot be used: Temporary failure in name resolution (-3)
|-正在尝试从www.bt.cn同步时间..
Fri Aug9 01:30:12 CST 2024
|-正在尝试将当前系统时间写入硬件..
Fri Aug9 01:30:13 CST 2024
|-时间同步完成!
----------------------------------------------------------------------------
★ Successful
----------------------------------------------------------------------------
|-正在尝试从0.pool.bt.cn同步时间..
Error resolving 0.pool.bt.cn: Name or service not known (-2)
10 Aug 01:30:01 ntpdate: Can't find host 0.pool.bt.cn: Name or service not known (-2)
10 Aug 01:30:01 ntpdate: no servers can be used, exiting
|-正在尝试从1.pool.bt.cn同步时间..
Error resolving 1.pool.bt.cn: Name or service not known (-2)
10 Aug 01:30:01 ntpdate: Can't find host 1.pool.bt.cn: Name or service not known (-2)
10 Aug 01:30:01 ntpdate: no servers can be used, exiting
|-正在尝试从0.asia.pool.ntp.org同步时间..
Exiting, name server cannot be used: Temporary failure in name resolution (-3)10 Aug 01:30:11 ntpdate: name server cannot be used: Temporary failure in name resolution (-3)
|-正在尝试从www.bt.cn同步时间..
date: unrecognized option '-->'
Try 'date --help' for more information.
Sat Aug 10 00:00:00 CST 2024
|-正在尝试将当前系统时间写入硬件..
Sat Aug 10 00:00:01 CST 2024
|-时间同步完成!

是山河呀 发表于 2024-8-16 09:10:37

你可以使用那个计划任务做服务器时间同步,这个和宝塔面板的时间没有关系,只能是服务器的时间发生了问题
如果还是不行,联系我我帮你看看https://home.shanriver.top/lianxi/

运维技术阿闯 发表于 2024-8-16 11:28:16

您好,先取消自动同步时间,然后手动同步一下,您可以安装一下linux工具箱,您前边的应该是解析不到地址,后边的是同步成功了
您这边看一下是否做了hosts解析了。可以删除当前的计划任务,在重新创建一下

宝塔用户_aldetf 发表于 2024-9-11 01:37:10

运维技术阿闯 发表于 2024-8-16 11:28
您好,先取消自动同步时间,然后手动同步一下,您可以安装一下linux工具箱,您前边的应该是解析不到地址, ...

肯定是解析出错了,但是不管怎样,失败了就不能用00:00:00来替换当前时间啊

运维技术阿闯 发表于 2024-9-20 14:28:19

宝塔用户_aldetf 发表于 2024-9-11 01:37
肯定是解析出错了,但是不管怎样,失败了就不能用00:00:00来替换当前时间啊 ...

您这个是出错了,但是又没有其他地点来设置时间了
页: [1]
查看完整版本: 【待反馈】严重!!!同步时间错误!!!会导致服务器时