标签:str 情况 服务 www not server int 最新 combine
先简单介绍一下chrony
chrony是linux7开始使用的时间同步服务,系统内置。比ntp更加快捷,简单
含有服务端和客户端:服务名为 chronyd,客户端工具chronyc
配置文件 /etc/chron.conf
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
server 192.168.102.131 iburst
此项为时间源地址
修改后需要重启服务,然后用chronyc sources -v 查看同步情况
[root@student ~]# chronyc sources -v
210 Number of sources = 1
.-- Source mode ‘^‘ = server, ‘=‘ = peer, ‘#‘ = local clock.
/ .- Source state ‘*‘ = current synced, ‘+‘ = combined , ‘-‘ = not combined,
| / ‘?‘ = unreachable, ‘x‘ = time may be in error, ‘~‘ = time too variable.
|| .- xxxx [ yyyy ] +/- zzzz
|| Reachability register (octal) -. | xxxx = adjusted offset,
|| Log2(Polling interval) --. | | yyyy = measured offset,
|| \ | | zzzz = estimated error.
|| | | \
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^? 192.168.102.131 0 8 0 - +0ns[ +0ns] +/- 0ns
这是服务器不可达,时间未同步的反馈
[root@student ~]# chronyc sources -v
210 Number of sources = 1
.-- Source mode ‘^‘ = server, ‘=‘ = peer, ‘#‘ = local clock.
/ .- Source state ‘*‘ = current synced, ‘+‘ = combined , ‘-‘ = not combined,
| / ‘?‘ = unreachable, ‘x‘ = time may be in error, ‘~‘ = time too variable.
|| .- xxxx [ yyyy ] +/- zzzz
|| Reachability register (octal) -. | xxxx = adjusted offset,
|| Log2(Polling interval) --. | | yyyy = measured offset,
|| \ | | zzzz = estimated error.
|| | | \
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^* 192.168.102.131 3 6 17 13 +5813ns[ +120us] +/- 41ms
这是正常同步的信息反馈
理论上,只要服务安装了,配置文件没错,重启过服务,关闭了selinux和firewalld,网络通,就会很对进行同步,此次却无法进行同步。
结果发现是客户端的chrony版本比服务端的chrony版本高导致,全部更新到最新版本后马上就同步了
标签:str 情况 服务 www not server int 最新 combine
原文地址:https://www.cnblogs.com/mathprice/p/11641918.html