systemd-timedated.service:无法确定 NTP 是否已启用:链接已断开

systemd-timedated.service:无法确定 NTP 是否已启用:链接已断开

使用 RHEL 7.9(Maipo)时遇到此问题。

特别是有一台服务器存在timedatectlsystemd-timedated.service和的问题chrony

如果我们运行timedatectl

$ timedatectl 
Failed to query server: Connection timed out

此外,如果我们尝试开始systemd-timedated.service

$ sudo systemctl status systemd-timedated.service
● systemd-timedated.service - Time & Date Service
   Loaded: loaded (/usr/lib/systemd/system/systemd-timedated.service; static; vendor preset: disabled)
   Active: failed (Result: exit-code) since Fri 2022-09-30 20:43:40 CEST; 1min 33s ago
     Docs: man:systemd-timedated.service(8)
           man:localtime(5)
           http://www.freedesktop.org/wiki/Software/systemd/timedated
  Process: 59236 ExecStart=/usr/lib/systemd/systemd-timedated (code=exited, status=1/FAILURE)
 Main PID: 59236 (code=exited, status=1/FAILURE)

Sep 30 20:43:40 HOSTNAME systemd[1]: Starting Time & Date Service...
Sep 30 20:43:40 HOSTNAME systemd[1]: Started Time & Date Service.
Sep 30 20:43:40 HOSTNAME systemd-timedated[59236]: Failed to determine whether NTP is enabled: Link has been severed
Sep 30 20:43:40 HOSTNAME systemd[1]: systemd-timedated.service: main process exited, code=exited, status=1/FAILURE
Sep 30 20:43:40 HOSTNAME systemd[1]: Unit systemd-timedated.service entered failed state.
Sep 30 20:43:40 HOSTNAME systemd[1]: systemd-timedated.service failed.

有人知道这个Link has been severed错误信息的根本原因以及可能的解决方案吗?

Failed to determine whether NTP is enabled: Link has been severed

答案1

公司 IT 部门将该问题转发给 Red Hat,随后发现系统上有一个错误文件。

sudo mv /etc/systemd/system/chronyd.{service,wrong}

解决了问题。

相关内容