我扫描了所有论坛和问题,但没有找到解决我问题的有效答案。网络时间同步服务不起作用。 timedatectl 服务似乎在没有它的情况下工作得很好,但它表明 systemd-timesyncd 未激活
torof@OMEN:~$ timedatectl status
Local time: Fri 2019-02-08 15:12:47 CET
Universal time: Fri 2019-02-08 14:12:47 UTC
RTC time: Fri 2019-02-08 14:12:47
Time zone: Europe/Paris (CET, +0100)
System clock synchronized: yes
systemd-timesyncd.service active: no
RTC in local TZ: no
已经libnss-systemd
安装好了。
我检查了系统日志,但无法找出问题所在,启用并重新启动服务也无济于事。
torof@OMEN:~$ systemctl status systemd-timesyncd
● systemd-timesyncd.service - Network Time Synchronization
Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2019-02-08 13:57:04 CET; 13min ago
Docs: man:systemd-timesyncd.service(8)
Process: 4383 ExecStart=/lib/systemd/systemd-timesyncd (code=exited, status=238/STATE_DIRECTORY)
Main PID: 4383 (code=exited, status=238/STATE_DIRECTORY)
Feb 08 13:57:04 OMEN systemd[1]: systemd-timesyncd.service: Main process exited, code=exited, status=238/STATE_DIRECTORY
Feb 08 13:57:04 OMEN systemd[1]: systemd-timesyncd.service: Failed with result 'exit-code'.
Feb 08 13:57:04 OMEN systemd[1]: Failed to start Network Time Synchronization.
Feb 08 13:57:04 OMEN systemd[1]: systemd-timesyncd.service: Service has no hold-off time, scheduling restart.
Feb 08 13:57:04 OMEN systemd[1]: systemd-timesyncd.service: Scheduled restart job, restart counter is at 5.
Feb 08 13:57:04 OMEN systemd[1]: Stopped Network Time Synchronization.
Feb 08 13:57:04 OMEN systemd[1]: systemd-timesyncd.service: Start request repeated too quickly.
Feb 08 13:57:04 OMEN systemd[1]: systemd-timesyncd.service: Failed with result 'exit-code'.
Feb 08 13:57:04 OMEN systemd[1]: Failed to start Network Time Synchronization.
出了什么问题,在哪里找到问题以及如何解决?
答案1
这systemd Github 问题列出一条带有解决方法:
chmod 0700 /var/lib/private