启用 NTP 后系统时间错误?

启用 NTP 后系统时间错误?

我在笔记本电脑上运行 Ubuntu 20.04。自安装以来,我从未遇到过日期/时间不同步的问题。

但是今天当我启动笔记本电脑时,系统时间完全错误。我可以禁用 NTP 并手动设置正确的时间,但当我重新启用 NTP 时,时间又回到错误状态:

david@david-XPS-15-9570  ~  timedatectl 
               Local time: Mo 2021-10-04 08:20:36 CEST
           Universal time: Mo 2021-10-04 06:20:36 UTC 
                 RTC time: Mo 2021-10-04 06:20:37     
                Time zone: Europe/Vienna (CEST, +0200)
System clock synchronized: no                         
              NTP service: inactive                   
          RTC in local TZ: no                         
 david@david-XPS-15-9570  ~  sudo timedatectl set-ntp on
 david@david-XPS-15-9570  ~  timedatectl                
               Local time: Mo 2038-10-04 07:52:04 CEST
           Universal time: Mo 2038-10-04 05:52:04 UTC 
                 RTC time: Mo 2021-10-04 06:21:14     
                Time zone: Europe/Vienna (CEST, +0200)
System clock synchronized: no                         
              NTP service: active                     
          RTC in local TZ: no                         
  • 我已经重启了笔记本电脑多次,只是为了确保
  • 我检查了 BIOS 中的日期和时间 - 它们是正确的

知道这里发生什么事了吗?

附加信息:

AFAICT,NTP 应该正在查询ntp.ubuntu.com

david@david-XPS-15-9570  ~  cat /etc/systemd/timesyncd.conf 
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See timesyncd.conf(5) for details.

[Time]
#NTP=
#FallbackNTP=ntp.ubuntu.com
#RootDistanceMaxSec=5
#PollIntervalMinSec=32
#PollIntervalMaxSec=2048

...根据https://servertest.online/ntp应该没事...

更多附加信息:

david@david-XPS-15-9570  ~  service chronyd status              
Unit chronyd.service could not be found.
david@david-XPS-15-9570  ~  service systemd-timedated status
● systemd-timedated.service - Time & Date Service
     Loaded: loaded (/lib/systemd/system/systemd-timedated.service; static; vendor preset: enabled)
     Active: active (running) since Mon 2021-10-04 14:47:02 CEST; 14s ago
       Docs: man:systemd-timedated.service(8)
             man:localtime(5)
             https://www.freedesktop.org/wiki/Software/systemd/timedated
   Main PID: 9393 (systemd-timedat)
      Tasks: 1 (limit: 38042)
     Memory: 1.3M
     CGroup: /system.slice/systemd-timedated.service
             └─9393 /lib/systemd/systemd-timedated

Okt 04 14:47:02 david-XPS-15-9570 systemd[1]: Starting Time & Date Service...
Okt 04 14:47:02 david-XPS-15-9570 systemd[1]: Started Time & Date Service.
 david@david-XPS-15-9570  ~  sudo timedatectl set-ntp on         
 david@david-XPS-15-9570  ~  service systemd-timedated status
● systemd-timedated.service - Time & Date Service
     Loaded: loaded (/lib/systemd/system/systemd-timedated.service; static; vendor preset: enabled)
     Active: active (running) since Mon 2021-10-04 14:47:02 CEST; 16 years 11 months ago
       Docs: man:systemd-timedated.service(8)
             man:localtime(5)
             https://www.freedesktop.org/wiki/Software/systemd/timedated
   Main PID: 9393 (systemd-timedat)
      Tasks: 1 (limit: 38042)
     Memory: 1.4M
     CGroup: /system.slice/systemd-timedated.service
             └─9393 /lib/systemd/systemd-timedated

Okt 04 14:47:02 david-XPS-15-9570 systemd[1]: Starting Time & Date Service...
Okt 04 14:47:02 david-XPS-15-9570 systemd[1]: Started Time & Date Service.
Okt 04 14:47:25 david-XPS-15-9570 systemd-timedated[9393]: systemd-timesyncd.service: Enabling unit.
Okt 04 14:47:25 david-XPS-15-9570 systemd-timedated[9393]: Set NTP to enabled (systemd-timesyncd.service).
Okt 04 07:52:02 david-XPS-15-9570 systemd-timedated[9393]: Set NTP to enabled (systemd-timesyncd.service).
 david@david-XPS-15-9570  ~  timedatectl                         
               Local time: Mo 2038-10-04 07:52:18 CEST
           Universal time: Mo 2038-10-04 05:52:18 UTC 
                 RTC time: Mo 2021-10-04 12:47:42     
                Time zone: Europe/Vienna (CEST, +0200)
System clock synchronized: no                         
              NTP service: active                     
          RTC in local TZ: no  

我将配置文件中的行更改为这些值

NTP=pool.ntp.org
NTP=pool.ntp.org
NTP=ntp.ubuntu.com

但没有什么区别……

相关内容