我有个问题。
服务器上的时间不同步。
这个问题似乎是在我为iptable设定规则之后出现的,我描述了这里可能是我错了,这两个事件是没有关系的。
CentOS 7.1
ntpd 4.2.6p5
/var/log/消息
May 25 16:48:49 CentOS-70-64-minimal ntpd[26771]: ntpd 4.2.6p5@1.2349-o Sat Dec 20 02:38:09 UTC 2014 (1)
May 25 16:48:49 CentOS-70-64-minimal ntpd[26771]: proto: precision = 0.046 usec
May 25 16:48:49 CentOS-70-64-minimal ntpd[26771]: 0.0.0.0 c01d 0d kern kernel time sync enabled
May 25 16:48:49 CentOS-70-64-minimal ntpd[26771]: unable to bind to wildcard address 0.0.0.0 - another process may be running - EXITINGntp.conf
driftfile /var/lib/ntp/drift
restrict default nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict ::1
includefile /etc/ntp/crypto/pw
keys /etc/ntp/keys
disable monitor
server ntp1.hetzner.de iburst
server ntp2.hetzner.com iburst
server ntp3.hetzner.net iburst编辑
netstat -lanp \ grep ':123‘
udp 0 0 5.9.152.9:123 0.0.0.0:* 24483/ntpd
udp 0 0 127.0.0.1:123 0.0.0.0:* 24483/ntpd
udp 0 0 0.0.0.0:123 0.0.0.0:* 24483/ntpd
udp6 0 0 2a01:4f8:190:4008:::123 :::* 24483/ntpd
udp6 0 0 fe80::3285:a9ff:fee:123 :::* 24483/ntpd
udp6 0 0 ::1:123 :::* 24483/ntpd
udp6 0 0 :::123 :::* 24483/ntpd这个问题给我带来了更多的阴影..。
服务ntpd状态
Redirecting to /bin/systemctl status ntpd.service
ntpd.service - Network Time Service
Loaded: loaded (/usr/lib/systemd/system/ntpd.service; disabled)
Active: inactive (dead)systemctl列表-单元-文件\ grep 'ntp‘
ntpd.service disabled
ntpdate.service disablednetstat -nlap \ grep 'ntpd‘
udp 0 0 5.9.152.9:123 0.0.0.0:* 3588/ntpd
udp 0 0 127.0.0.1:123 0.0.0.0:* 3588/ntpd
udp 0 0 0.0.0.0:123 0.0.0.0:* 3588/ntpd
udp6 0 0 2a01:4f8:190:4008:::123 :::* 3588/ntpd
udp6 0 0 fe80::3285:a9ff:fee:123 :::* 3588/ntpd
udp6 0 0 ::1:123 :::* 3588/ntpd
udp6 0 0 :::123 :::* 3588/ntpd
unix 2 [ ] DGRAM 34224 3588/ntpd 如果ntpd禁用了它如何监听端口..。
发布于 2015-05-26 15:15:48
根据您提供的信息(特别是第一次编辑的输出:"netstat -lanp _ grep ':123'“和第二次编辑:"netstat -nlap grep 'ntpd'"),很明显:
在正常情况下(如我确信您正在经历的情况),这意味着您已经在运行" ntpd“进程,并且由于一个ntpd已经在运行,因此您不能启动一个新的ntpd进程(更好的是,如果您启动一个新的ntpd实例,它将拒绝简单地启动,因为它将无法控制所需的资源(UDP端口123))。
因此,通常情况下,在启动新的"ntpd“之前,请确保没有其他实例正在运行(...by执行建议的ss/netstat命令和检查结果)。
至于您最后的评论--“如果ntpd禁用,它如何侦听端口”--请注意,运行/不运行和启用/禁用是两个非常不同的概念,并且:
所以,回到你(不太明确)的问题上:
https://serverfault.com/questions/694279
复制相似问题