您好,欢迎访问这里是深圳市硕远科技有限公司!
戴尔服务器价格_IBM联想配置_浪潮代理-深圳市硕远科技有限公司
联系我们
戴尔服务器价格_IBM联想配置_浪潮代理-深圳市硕远科技有限公司
邮箱:2324898850@qq.com
电话:400-080-6079
地址:深圳市龙华区河背工业区108创业园A301
当前位置:主页 > 新闻动态 > 企业新闻 >

企业新闻

ntpdate服务无法启动

发布时间:2022-09-08 06:03:09浏览次数:
改文章外站 但是我找不到那篇文章了

默认情况下如果ntp本地时间与上级ntp时间差超过1000s,那么ntp进程就会退出并在系统日志文件中记录。

所选组件的版本号(如果适用):

rhev-hypervisor7-7.1-20150813.0.iso

重现性如何:
100%

重现步骤:
1、安装
rhev-hypervisor7-7.1-20150813.0.iso,配置dhcp方式网络,重启系统。
2. 用“clock.redhat.com”配置NTP服务器,然后保存。
3. 进入shell,检查ntpdate.service 状态。

实际结果:
ntpdate 服务状态失败。

预期成绩:
ntpdate 服务状态应为正在运行。

附加信息:
步骤 3 后:
[root@localhost admin]# systemctl status ntpdate.service
ntpdate.service - 通过 NTP 设置时间
加载:加载(
/usr/lib/systemd/system/ntpdate.service;启用)
活动:自 UTC 2015-08-19 星期三 13:42:35 起失败(结果:退出代码);2 分钟 27 秒前
进程:16686 ExecStart=
/usr/libexec/ntpdate-wrapper(代码=退出,状态=1/FAILURE)
主PID:16686(代码=退出,状态=1/FAILURE)
C组:
/system.slice/ntpdate.service

8 月 19 日 13:41:50 localhost systemd[1]:通过 NTP 开始设置时间...
8 月 19 日 13:42:35 localhost systemd[1]: ntpdate.service: 主进程退出,代码=退出,状态=1/FAILURE
8 月 19 日 13:42:35 localhost systemd[1]:无法通过 NTP 启动设置时间。
8 月 19 日 13:42:35 localhost systemd[1]:单位 ntpdate.service 进入失败状态。

[root@dhcp-9-37 admin]# cat /etc/ntp.conf
漂移文件 /var/lib/ntp/drift
包含文件 /etc/ntp/crypto/pw
键 /etc/ntp/keys
服务器clock.redhat.com

[root@dhcp-9-37 admin]# cat /etc/ntp/step-tickers
# ntpdate服务使用的NTP服务器列表。

0.rhel.pool.ntp.org

[root@localhost admin]# mount | grep ntp
/var/lib/ntp 上没有类型 tmpfs(rw、relatime、seclabel)
/dev/mapper/HostVG-Config on /etc/ntp.conf type ext4 (rw,noatime,seclabel,data=ordered)
/dev/mapper/HostVG-Config on
/var/lib/stateless/writable/etc/ntp.conf type ext4 (rw,noatime,seclabel,data=ordered)

如果您像这样修改并保留 /etc/ntp/step-tickers:
[root@dhcp-9-37 admin]# cat /etc/ntp/step-tickers
# ntpdate服务使用的NTP服务器列表。

时钟.redhat.com

[root@localhost admin]# mount | grep ntp
/var/lib/ntp 上没有类型 tmpfs(rw、relatime、seclabel)
/dev/mapper/HostVG-Config on /etc/ntp.conf type ext4 (rw,noatime,seclabel,data=ordered)
/dev/mapper/HostVG-Config on
/var/lib/stateless/writable/etc/ntp.conf type ext4 (rw,noatime,seclabel,data=ordered)
/dev/mapper/HostVG-Config on /etc/ntp/step-tickers type ext4 (rw,noatime,seclabel,data=ordered)
/dev/mapper/HostVG-Config on
/var/lib/stateless/writable/etc/ntp/step-tickers type ext4 (rw,noatime,seclabel,data=ordered)

然后重启系统,可以发现ntpdate.service状态是running。

400-080-6079