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