虚拟化容器,大数据,DBA,中间件,监控。

启动httpd 时报错Cannot assign requested address

31 10月
作者:admin|分类:应用管理
启动httpd 时报错Cannot assign requested address: make_sock: could not bind to address

[root@96-46-2-162 ~]# service httpd start
(99)Cannot assign requested address: make_sock: could not bind to address 192.168.1.10:80
no listening sockets available, shutting down
Unable to open logs

查看httpd.conf 发现监听80端口的IP:
#:cat /etc/httpd/conf/httpd.conf

Listen 192.168.1.20:80
Listen 192.168.1.10:80
Listen 192.168.1.95:80

再检查网卡IP配置如下:
#: ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:32:9A:75
inet addr:Listen 192.168.1.20 Bcast:61.136.153.255 Mask:255.255.255.128
inet6 addr: fe80::20c:29ff:fe32:9a75/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4504229 errors:181 dropped:268 overruns:0 frame:0
TX packets:3017996 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:319977813 (305.1 MiB) TX bytes:235434801 (224.5 MiB)
Interrupt:18 Base address:0x2000

eth0:0 Link encap:Ethernet HWaddr 00:0C:29:32:9A:75
inet addr:192.168.1.95 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:18 Base address:0x2000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1380516 errors:0 dropped:0 overruns:0 frame:0
TX packets:1380516 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:83438634 (79.5 MiB) TX bytes:83438634 (79.5 MiB)

发现,原来的192.168.10的IP被攻击,后来更换成192.168.1.20
但是httpd配置没有取消对应的IP监听。
删除Listen 192.168.1.10:80 这行,
保存配置,重启httpd服务,恢复正常。

浏览2881 评论0
返回
目录
返回
首页
CentOS下使用shell脚本监控网站是否正常 修改linux系统内核参数