View previous topic :: View next topic |
Author |
Message |
yupan n00b
Joined: 22 Sep 2011 Posts: 2 Location: 92cto.com
|
Posted: Thu Sep 22, 2011 6:41 am Post subject: 启动httpd 时报错Cannot assign requested address: make_sock |
|
|
启动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服务,恢复正常。 _________________ 92cto.com |
|
Back to top |
|
|
tomk Bodhisattva
Joined: 23 Sep 2003 Posts: 7221 Location: Sat in front of my computer
|
Posted: Thu Sep 22, 2011 5:29 pm Post subject: |
|
|
Moved from Networking & Security to 中文 (Chinese). _________________ Search | Read | Answer | Report | Strip |
|
Back to top |
|
|
|