
- 已確認配置了正確的伺服器
/etc/ntp.conf
- 它可以 ping 該伺服器。
肯定有ntp包
/home/admin# dpkg -s ntp Package: ntp Status: install ok installed
但守護程式沒有運行
/home/admin# ps wax | grep ntp 21959 pts/0 S+ 0:00 grep ntp
狀態檢查
/home/admin# ntpstat Unable to talk to NTP daemon. Is it running?
當我嘗試重新啟動它時,我得到了這個
/home/admin# systemctl start ntpd Failed to start ntpd.service: Unit ntpd.service failed to load: No such file or directory.
接下來該嘗試什麼?
答案1
要檢查您的狀態ntp
應該使用:
systemctl status ntp
透過修改,/etc/ntp.conf
您應該透過以下方式重新啟動服務:
systemctl restart ntp
報告ntpstat
中Unable to talk to NTP daemon. Is it running?
,您可以簡單地ntp
透過以下方式啟動服務:
systemctl start ntp
若要在引導時啟動該服務:
systemctl enable ntp
答案2
在我的 opensuse tumbleweed 系統上,我得到
systemctl start ntp
Unit ntp.service could not be found.
我用 ntpd 替換了 ntp,一切正常。
systemctl start ntpd
systemctl enabled ntpd