zoukankan      html  css  js  c++  java
  • ntp开机无法自启

    1.1 查询ntp状态

    [root@host-172-18-0-37 ~]# service ntpd status
    Redirecting to /bin/systemctl status  ntpd.service
    ● ntpd.service - Network Time Service
       Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled; vendor preset: disabled)
       Active: inactive (dead)
    

    1.2 查询ntp是否设置开机自启

    [root@host-172-18-0-37 ~]# systemctl is-enabled ntpd
    enabled
    

    说明ntp已经设置开机自启,但是开机启动并未成功。一般引起这个问题的最为常见的原因是系统上安装了一个与NTP相冲突的工具:chrony。

    1.3 查询chrony是否被设置为enabled

    [root@host-172-18-0-37 ~]# systemctl is-enabled chronyd
    enabled
    

    2 解决办法

    systemctl disable chronyd
    

    重启机器,查看ntp的状态:

    [root@host-172-18-0-37 ~]# service ntpd status
    Redirecting to /bin/systemctl status  ntpd.service
    ● ntpd.service - Network Time Service
       Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled; vendor preset: disabled)
       Active: active (running) since Fri 2018-04-27 14:11:59 CST; 4min 12s ago
      Process: 632 ExecStart=/usr/sbin/ntpd -u ntp:ntp $OPTIONS (code=exited, status=0/SUCCESS)
     Main PID: 643 (ntpd)
       CGroup: /system.slice/ntpd.service
               └─643 /usr/sbin/ntpd -u ntp:ntp -g
    
    Apr 27 14:11:59 localhost.localdomain ntpd[643]: Listening on routing socket on fd #20 for interface updates
    Apr 27 14:11:59 localhost.localdomain ntpd[643]: 0.0.0.0 c016 06 restart
    Apr 27 14:11:59 localhost.localdomain ntpd[643]: 0.0.0.0 c012 02 freq_set kernel 24.633 PPM
    Apr 27 14:11:59 localhost.localdomain systemd[1]: Started Network Time Service.
    Apr 27 14:12:03 host-172-18-0-37 ntpd[643]: Listen normally on 4 eth0 172.18.0.37 UDP 123
    Apr 27 14:12:03 host-172-18-0-37 ntpd[643]: Listen normally on 5 eth0 fe80::f816:3eff:fefa:262c UDP 123
    Apr 27 14:12:03 host-172-18-0-37 ntpd[643]: new interface(s) found: waking up resolver
    Apr 27 14:12:10 host-172-18-0-37 ntpd[643]: 0.0.0.0 c61c 0c clock_step -225.297501 s
    Apr 27 14:08:25 host-172-18-0-37 ntpd[643]: 0.0.0.0 c614 04 freq_mode
    Apr 27 14:08:26 host-172-18-0-37 ntpd[643]: 0.0.0.0 c618 08 no_sys_peer
  • 相关阅读:
    function to_timestamp(timestamp without time zone, unknown) does not exist
    Xshell连接不上Ubuntu解决方式
    怎样使用MobaXterm上传文件到远程Linux系统 MobaXterm怎么使用连接远程服务器?
    notepad++怎样删除空行
    思维脑图在线制作工具网址
    @ApiImplicitParams
    .bat批出处理文件
    主题模型及其在文本情感分析中的应用
    表达式求职JAVA(转)
    2013华为校园招聘java实现(大家水个回复啊)
  • 原文地址:https://www.cnblogs.com/zhangmingcheng/p/9963217.html
Copyright © 2011-2022 走看看