RHEL6:httpd无法绑定到端口

我们有RHEL 6.5服务器,作为本地YUM服务器,并使用httpd。 它运行在6809港口。直到昨天,它运行良好。 我的同事之一是在不同的服务器上进行一些额外的部署应该使用YUM服务器,但百胜无法连接。 他承认,他也在YUM服务器上做了一些工作,但他并不知道正在做一些与httpdconfiguration有关的事情。

所以我们意识到YUM服务器上的httpd没有运行,拒绝启动:

# service httpd start Starting httpd: (98)Address already in use: make_sock: could not bind to address 172.29.84.41:6809 no listening sockets available, shutting down Unable to open logs [FAILED] 

我们已经检查过端口6809没有被lsof和netstat占用:

 lsof -iTCP -sTCP:LISTEN -P -n 

 netstat -tupan | grep -Ei LISTEN 

全部清楚,没有其他的过程。

我们还在/ etc / httpd目录中search了Listen,并且只有6809端口的单个指令:

 httpd# grep -Ri listen * conf/httpd.conf:# Listen: Allows you to bind Apache to specific IP addresses and/or conf/httpd.conf:# Change this to Listen on specific IP addresses as shown below to conf/httpd.conf:#Listen 12.34.56.78:80 conf/httpd.conf:#Listen 80 conf.d/ssl.conf:# When we also provide SSL we have to listen to the conf.d/ssl.conf:#Listen 443 conf.d/yum.conf:Listen yum-server:6809 logs/test.log:read(4, "Listen yum-server:6809\nServe"..., 4096) = 496 logs/test.log:listen(3, 511) = 0 logs/test.log:write(2, "no listening sockets available, "..., 46no listening sockets available, shutting down Binary file modules/mod_info.so matches Binary file modules/mod_wsgi.so matches Binary file modules/mod_proxy_ftp.so matches Binary file modules/mod_cgid.so matches 

所以它不是重复的。

IP是服务器本地的。

没有httpd进程正在运行。

我们也重新安装了httpd RPM。

SELinux未运行:

 # sestatus SELinux status: disabled 

请问还有什么可能是错的?

非常感谢您的build议。

加2:

To @AndréFernandes:

 # lsof -n -P -i :6809 # find /etc/httpd -type f | xargs grep Listen /etc/httpd/conf.d/ssl.conf:#Listen 443 /etc/httpd/conf.d/yum.conf:Listen yum-server:6809 /etc/httpd/conf/httpd.conf:# Listen: Allows you to bind Apache to specific IP addresses and/or /etc/httpd/conf/httpd.conf:# Change this to Listen on specific IP addresses as shown below to /etc/httpd/conf/httpd.conf:#Listen 12.34.56.78:80 /etc/httpd/conf/httpd.conf:#Listen 80 

到@MadHatter我缩短了输出,并删除了真实姓名。 但别名yum_server在那里:

 # cat /etc/hosts # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.somewhe.re localhost trap-host 172.29.84.41 <FQDN and name> yum-server <other aliases> ... 

添加3:

IP地址显示输出:

 # ip addr show 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo 2: eth0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP qlen 1000 link/ether 3c:4a:92:ed:c0:28 brd ff:ff:ff:ff:ff:ff 3: eth1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP qlen 1000 link/ether 3c:4a:92:ed:c0:28 brd ff:ff:ff:ff:ff:ff 4: eth2: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond1 state UP qlen 1000 link/ether 68:b5:99:c6:42:4c brd ff:ff:ff:ff:ff:ff 5: eth3: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond1 state UP qlen 1000 link/ether 68:b5:99:c6:42:4c brd ff:ff:ff:ff:ff:ff 6: eth4: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond2 state UP qlen 1000 link/ether 68:b5:99:c6:42:4e brd ff:ff:ff:ff:ff:ff 7: eth5: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond2 state UP qlen 1000 link/ether 68:b5:99:c6:42:4e brd ff:ff:ff:ff:ff:ff 8: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP link/ether 3c:4a:92:ed:c0:28 brd ff:ff:ff:ff:ff:ff inet 172.29.84.41/26 brd 172.29.84.63 scope global bond0 9: bond1: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP link/ether 68:b5:99:c6:42:4c brd ff:ff:ff:ff:ff:ff inet 192.168.1.1/24 brd 192.168.1.255 scope global bond1 10: bond2: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP link/ether 68:b5:99:c6:42:4e brd ff:ff:ff:ff:ff:ff inet 10.1.212.71/24 brd 10.1.212.255 scope global bond2 

我们find了原因。 它隐藏在/ etc / hosts中。 IP和所有的行内容在那里列出两次。 在我们的产品要求的其他条目中,再次添加了条目。 当我们注释掉第二个条目时,httpd开始按预期行事,并停止双重绑定尝试。