当前位置:网站首页 > R语言数据分析 > 正文

chrony 手动同步(chrony不同步)



先简单介绍一下chrony

chrony是linux7开始使用的时间同步服务,系统内置。比ntp更加快捷,简单

实际配置中总是出现各种问题,排除时,首先关闭selinux,关闭防火墙。

尝试过多次,最近一次成功的案例是,服务端的配置文件修改了三项

自己是自己的服务器

开启同步许可
# Allow NTP client access from local network.
allow 192.168.102.0/24

开启同步层

保存后,本地重启chronyd服务,客户端也重启chronyd服务。可以自动同步

含有服务端和客户端:服务名为 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版本高导致,全部更新到最新版本后马上就同步了

到此这篇chrony 手动同步(chrony不同步)的文章就介绍到这了,更多相关内容请继续浏览下面的相关推荐文章,希望大家都能在编程的领域有一番成就!

版权声明


相关文章:

  • yarn队列配置(yarn配置多队列)2024-12-11 17:36:09
  • 富文本编辑器上传word文档(富文本编辑器 word)2024-12-11 17:36:09
  • uchar是什么意思(uchar j什么意思)2024-12-11 17:36:09
  • Oracle查看锁表记录(oracle如何看锁表)2024-12-11 17:36:09
  • redhat操作系统(redhat操作系统安装步骤)2024-12-11 17:36:09
  • jrafyh是什么意思(jreg什么意思)2024-12-11 17:36:09
  • grid布局阮一峰(gridbagconstraints布局)2024-12-11 17:36:09
  • spark面试题及答案100道(spark面试题shuffle)2024-12-11 17:36:09
  • redhat认证多少钱(redhat报名)2024-12-11 17:36:09
  • xavier是什么牌子鞋子(xvwiv是什么鞋子)2024-12-11 17:36:09
  • 全屏图片