首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >时间源具有未知地址。

时间源具有未知地址。
EN

Unix & Linux用户
提问于 2019-11-05 07:16:11
回答 1查看 1.8K关注 0票数 2

我在试着设定时间,但这不起作用。我使用以下命令之一启动服务:

代码语言:javascript
复制
 sudo systemctl stop chronyd; sudo systemctl start chronyd
 sudo systemctl restart chronyd

timedatectl说我没有同步

代码语言:javascript
复制
 timedatectl
 Local time: Tue 2019-11-05 08:04:47 CET
 Universal time: Tue 2019-11-05 07:04:47 UTC
 RTC time: Tue 2019-11-05 07:04:47
 Time zone: Europe/Zurich (CET, +0100)
 System clock synchronized: no
 NTP service: active
 RTC in local TZ: no

chrony似乎无法解析我的源(我使用的是Fedora上提供的默认源)

代码语言:javascript
复制
chronyc activity             
200 OK
0 sources online
0 sources offline
0 sources doing burst (return to online)
0 sources doing burst (return to offline)
1 sources with unknown address

chronyc sources
210 Number of sources = 0

我的配置文件(/etc/chrony.conf)

代码语言:javascript
复制
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
pool 2.fedora.pool.ntp.org iburst

# Record the rate at which the system clock gains/losses time.
driftfile /var/lib/chrony/drift

# Allow the system clock to be stepped in the first three updates
# if its offset is larger than 1 second.
makestep 1.0 3

# Enable kernel synchronization of the real-time clock (RTC).
rtcsync

# Enable hardware timestamping on all interfaces that support it.
#hwtimestamp *

# Increase the minimum number of selectable sources required to adjust
# the system clock.
#minsources 2

# Allow NTP client access from local network.
#allow 192.168.0.0/16

# Serve time even if not synchronized to a time source.
#local stratum 10

# Specify file containing keys for NTP authentication.
keyfile /etc/chrony.keys

# Get TAI-UTC offset and leap seconds from the system tz database.
leapsectz right/UTC

# Specify directory for log files.
logdir /var/log/chrony

# Select which information is logged.
#log measurements statistics tracking

最奇怪的是,如果我停止守护进程并手动运行then,那么它就能工作。

代码语言:javascript
复制
sudo /usr/sbin/chronyd -d -d > chronyd.out

chronyc activity
200 OK
4 sources online
0 sources offline
0 sources doing burst (return to online)
0 sources doing burst (return to offline)
0 sources with unknown address

chronyc sources
210 Number of sources = 4
MS Name/IP address         Stratum Poll Reach LastRx Last sample               
===============================================================================
^+ ns1.nexellent.net             2   6    77    37  +2998us[+2998us] +/-   13ms
^* 162.159.200.1                 3   6    77    38  +1348us[+2529us] +/-   16ms
^- mirror.tillo.ch               2   6    72   177  -1754us[ +375us] +/-   24ms
^- ntp0.as34288.net              2   6    75    50   +729us[ +729us] +/-   11ms

为解决这一问题而提供的任何帮助都将受到欢迎。

EN

回答 1

Unix & Linux用户

发布于 2020-08-31 15:39:38

我怀疑你已经解决了这个问题--但如果其他人也有同样的问题:

SELinux阻止来自时间序列的解析器访问,只需禁用它,就可以测试这是否是原因或添加异常。

票数 2
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/550423

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档