Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
启动httpd 时报错Cannot assign requested address: make_sock
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index 中文 (Chinese)
View previous topic :: View next topic  
Author Message
yupan
n00b
n00b


Joined: 22 Sep 2011
Posts: 2
Location: 92cto.com

PostPosted: Thu Sep 22, 2011 6:41 am    Post subject: 启动httpd 时报错Cannot assign requested address: make_sock Reply with quote

启动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
View user's profile Send private message
tomk
Administrator
Administrator


Joined: 23 Sep 2003
Posts: 7219
Location: Sat in front of my computer

PostPosted: Thu Sep 22, 2011 5:29 pm    Post subject: Reply with quote

Moved from Networking & Security to 中文 (Chinese).
_________________
Search | Read | Answer | Report | Strip
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index 中文 (Chinese) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum