ntpdate -q -4 localhost
NTP 伺服器中的命令正在發出兩個查詢127.0.0.1
,其中一個失敗:
這是因為失敗嗎/etc/主機文件?
ntpdate -q -4 localhost
server 127.0.0.1, stratum 2, offset 0.000006, delay 0.02565
server 127.0.0.1, stratum 0, offset 0.000000, delay 0.00000
/etc/主機文件內容:
::1 1a.ncomputers.org 1a localhost
127.0.0.1 1a.ncomputers.org 1a localhost
2a02:c207:2010:6775::1 1b.ncomputers.org 1b
2a02:c205:2009:8290::1 1c.ncomputers.org 1c
5.189.146.13 1b.ncomputers.org 1b
80.241.208.120 1c.ncomputers.org 1c
/etc/ntpd.conf文件內容:
driftfile /var/lib/ntp/ntp.drift
restrict default kod nomodify nopeer noquery notrap
restrict localhost
server 2001:4ca0:0:103::81bb:fe20
server 2001:638:a000:1123:123::1
server 2001:62a:4:311::123
日期版本:4.2.8p10
答案1
您可能需要將其新增至 ntp.conf 檔案以允許本機 IPV4 和 IPV6 查詢:
restrict 127.0.0.1
restrict ::1