当前位置:论坛首页 > Linux面板 > 求助

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

发表在 Linux面板2024-8-15 23:20 [复制链接] 5 1196

为了能快速了解并处理您的问题,请提供以下基础信息:
面板、插件版本: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[782]: Can't find host 0.pool.bt.cn: Name or service not known (-2)
15 Aug 01:30:02 ntpdate[782]: 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[796]: Can't find host 1.pool.bt.cn: Name or service not known (-2)
15 Aug 01:30:02 ntpdate[796]: 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[825]: 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
|-时间同步完成!
----------------------------------------------------------------------------
★[2024-08-15 00:00:01] Successful
----------------------------------------------------------------------------

这个问题应该在8.x版本就有,之前我同事提醒过我服务器时间不对,差一个多小时,我没有在意,今天才看到是同步时间错误导致!
使用道具 举报 只看该作者 回复
发表于 2024-8-15 23:30:22 | 显示全部楼层
刚看了下,8月9号开始出现这个问题的,日志显示8月9号我没有登陆过宝塔

----------------------------------------------------------------------------
★[2024-08-08 01:30:13] Successful
----------------------------------------------------------------------------
|-正在尝试从0.pool.bt.cn同步时间..
Error resolving 0.pool.bt.cn: Name or service not known (-2)
9 Aug 01:30:01 ntpdate[9947]: Can't find host 0.pool.bt.cn: Name or service not known (-2)
9 Aug 01:30:01 ntpdate[9947]: 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[9959]: Can't find host 1.pool.bt.cn: Name or service not known (-2)
9 Aug 01:30:01 ntpdate[9959]: 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[9986]: name server cannot be used: Temporary failure in name resolution (-3)
|-正在尝试从www.bt.cn同步时间..
Fri Aug  9 01:30:12 CST 2024
|-正在尝试将当前系统时间写入硬件..
Fri Aug  9 01:30:13 CST 2024
|-时间同步完成!
----------------------------------------------------------------------------
★[2024-08-09 01:30:13] Successful
----------------------------------------------------------------------------
|-正在尝试从0.pool.bt.cn同步时间..
Error resolving 0.pool.bt.cn: Name or service not known (-2)
10 Aug 01:30:01 ntpdate[3273]: Can't find host 0.pool.bt.cn: Name or service not known (-2)
10 Aug 01:30:01 ntpdate[3273]: 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[3285]: Can't find host 1.pool.bt.cn: Name or service not known (-2)
10 Aug 01:30:01 ntpdate[3285]: 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[3343]: 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解析了。可以删除当前的计划任务,在重新创建一下
使用道具 举报 回复 支持 反对
发表于 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来替换当前时间啊 ...

您这个是出错了,但是又没有其他地点来设置时间了
使用道具 举报 回复 支持 反对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

普通问题处理

论坛响应时间:72小时

问题处理方式:排队(仅解答)

工作时间:白班:9:00 - 18:00

紧急运维服务

响应时间:3分钟

问题处理方式:宝塔专家1对1服务

工作时间:工作日:9:00 - 18:30

宝塔专业团队为您解决服务器疑难问题

点击联系技术免费分析

工作时间:09:00至18:30

快速回复 返回顶部 返回列表