ntp server 安装

安装

sudo apt-get install ntp 

启动服务

sudo systemctl start ntp.service

查看服务状态

sudo systemctl status ntp.service

停止服务

sudo systemctl stop ntp.service

时间同步命令

sudo ntpdate ip_addr

the NTP socket is in use, exiting

需要停止ntp.service

sudo systemctl stop ntp.service

no server suitable for synchrnization found

  • 在NTP Server重新启动NTP服务后,NTP Server自身或与其他NTPServer的同步大概需要5分钟左右,因此NTP客户端在这个时间段运行ntpdate命令时会产生no server suitable for synchronization found错误
  • 查看ntp server运行状态
  • 检查ntp client 和 ntp server是否连通
  • ntp 客户端执行ntpdate -d ntp-server-ip
  • 检查ntp版本,大于4.2,检测配置文件是否在restrict的定义中使用了notrust。如果有则删除notrust,再进行NTP时间同步。
    #ntpq -c version
    
  • 关闭防火墙
    #systemctl stop firewalld
    
  • 检查restrict参数写的IP对不
Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐