centos - ntp 运行时 Ceph 状态不响应

标签 centos centos7 ntp ceph

如果我们将任何服务器放在/etc/ntp.conf 中,命令 ceph status 不会响应
我在centos 7上有3个ceph节点和这个/etc/ntp.conf:

driftfile /vat/lib/ntp/drift

restrict 0.0.0.0 mask 0.0.0.0

server 0.ua.pool.ntp.org iburst
server 1.ua.pool.ntp.org iburst
server 2.ua.pool.ntp.org iburst
server 3.ua.pool.ntp.org iburst

includefile /etc/ntp/crypto/pw
keys /etc/ntp/keys
disable monitor

和这个/etc/rc.local:
touch /var/lock/subsys/local
/sbin/iptables-restore < /etc/sysconfig/iptables
/sbin/ntpd -gq
/sbin/hwclock --systohc
systemctl enable ntpd.service
systemctl start ntpd.service

如果我在/etc/ntp.conf 中评论服务器:
#server 0.ua.pool.ntp.org iburst
#server 1.ua.pool.ntp.org iburst
#server 2.ua.pool.ntp.org iburst
#server 3.ua.pool.ntp.org iburst

然后 ceph 成为响应。但是有了这个答案:
health HEALTH_WARN
 clock skew detected on mon.node2, mon.node3
 Monitor clock skew detected
...

systemctl status ntpd.service 显示服务处于事件状态并正在运行。
如果我们将服务器放在 ntp.conf 中,我真的无法理解为什么 ceph 会变得不负责任。
请帮我。

最佳答案

我不知道为什么,但是由于 ntpd -gq 中的命令而发生了这种情况.此命令从您在 ntp.conf 中编写的服务器更新您的数据时间,然后停止。
我无法弄清楚为什么 ceph 在执行此命令后会失败,但是当我将其更改为:

 ntpdate 0.ua.pool.ntp.org

Ceph 变成了工作。

关于centos - ntp 运行时 Ceph 状态不响应,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35177485/

相关文章:

linux - ntsysv : error reading info for service °8B@h@@

docker - docker-compose.yml不会读取主机名的环境变量

ubuntu - 在 Docker 容器内运行的 Debian 上自动启动 ntp 服务

centos - 为什么 awx 看不到 pip 模块?

linux - 构建带有卷的 docker 镜像 (centos) 以及用于测试的数据 (postgresql)

linux - CentOS 6.5 R 安装依赖项

mysql - 如何在 CentOS 7 上清理错误的 mysql 和 mariadb 安装并安装新的 mariadb?

python - 在 centos 7 上使用 SDL2 运行 kivy 1.9.1

java - 连接到 NTP 服务器始终失败 (Java)

linux - 如何让ntpd在重启后立即同步?