Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

(none):~# /etc/init.d/apache2 restart Restarting web server: apache2 reboot ... waiting (98)Address already in use: make_sock: could not bind to address [::]:80 (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down Unable to open logs failed! (none):~#

On debian, anyone have any idea what that means?

EDIT:

lsof -i

COMMAND     PID     USER   FD   TYPE  DEVICE SIZE NODE NAME
portmap    1926   daemon    4u  IPv4    4615       UDP *:sunrpc
portmap    1926   daemon    5u  IPv4    4621       TCP *:sunrpc (LISTEN)
rpc.statd  1937    statd    5u  IPv4    4647       UDP *:841
rpc.statd  1937    statd    7u  IPv4    4658       UDP *:36239
rpc.statd  1937    statd    8u  IPv4    4661       TCP *:41621 (LISTEN)
named      2174     bind   20u  IPv6    5186       TCP *:domain (LISTEN)
named      2174     bind   21u  IPv4    5189       TCP localhost:domain (LISTEN)
named      2174     bind   22u  IPv4    5191       TCP ns1.**********.com:domain (LI            STEN)
named      2174     bind   23u  IPv4    5193       TCP ns2.**********.com:domain (LI            STEN)
named      2174     bind   24u  IPv4    5195       TCP customer.worldstream.nl:d            omain (LISTEN)
named      2174     bind   25u  IPv4    5196       TCP localhost:953 (LISTEN)
named      2174     bind   26u  IPv6    5197       TCP localhost:953 (LISTEN)
named      2174     bind  512u  IPv6    5185       UDP *:domain
named      2174     bind  513u  IPv4    5188       UDP localhost:domain
named      2174     bind  514u  IPv4    5190       UDP ns1.**********.com:domain
named      2174     bind  515u  IPv4    5192       UDP ns2.**********.com:domain
named      2174     bind  516u  IPv4    5194       UDP customer.worldstream.nl:d            omain
lwresd     2192     root  512u  IPv4    5233       UDP localhost:921
sshd       2209     root    3u  IPv6    5260       TCP *:ssh (LISTEN)
sshd       2209     root    4u  IPv4    5262       TCP *:ssh (LISTEN)
mysqld     2286    mysql   10u  IPv4    5358       TCP localhost:mysql (LISTEN)
master     2429     root   12u  IPv4    5661       TCP *:smtp (LISTEN)
dovecot    2456     root    5u  IPv4    5813       TCP *:imap2 (LISTEN)
dovecot    2456     root    6u  IPv4    5814       TCP *:imaps (LISTEN)
dovecot    2456     root    7u  IPv4    5815       TCP *:pop3 (LISTEN)
dovecot    2456     root    8u  IPv4    5816       TCP *:pop3s (LISTEN)
imap-logi  2497  dovecot    0u  IPv4    5813       TCP *:imap2 (LISTEN)
imap-logi  2497  dovecot    1u  IPv4    5814       TCP *:imaps (LISTEN)
imap-logi  2498  dovecot    0u  IPv4    5813       TCP *:imap2 (LISTEN)
imap-logi  2498  dovecot    1u  IPv4    5814       TCP *:imaps (LISTEN)
imap-logi  2499  dovecot    0u  IPv4    5813       TCP *:imap2 (LISTEN)
imap-logi  2499  dovecot    1u  IPv4    5814       TCP *:imaps (LISTEN)
apache2    2500     root    3u  IPv6    5933       TCP *:www (LISTEN)
pop3-logi 10494  dovecot    0u  IPv4    5815       TCP *:pop3 (LISTEN)
pop3-logi 10494  dovecot    1u  IPv4    5816       TCP *:pop3s (LISTEN)
pop3-logi 10495  dovecot    0u  IPv4    5815       TCP *:pop3 (LISTEN)
pop3-logi 10495  dovecot    1u  IPv4    5816       TCP *:pop3s (LISTEN)
pop3-logi 10496  dovecot    0u  IPv4    5815       TCP *:pop3 (LISTEN)
pop3-logi 10496  dovecot    1u  IPv4    5816       TCP *:pop3s (LISTEN)
apache2   12270 www-data    3u  IPv6    5933       TCP *:www (LISTEN)
apache2   12362 www-data    3u  IPv6    5933       TCP *:www (LISTEN)
apache2   12362 www-data   18u  IPv6 1819101       TCP ns1.**********.com:www->77.28            .128.86:1619 (CLOSE_WAIT)
apache2   12426 www-data    3u  IPv6    5933       TCP *:www (LISTEN)
apache2   12461 www-data    3u  IPv6    5933       TCP *:www (LISTEN)
apache2   12461 www-data   18u  IPv6 1818917       TCP ns1.**********.com:www->201-9            5-197-250.dsl.telesp.net.br:4479 (CLOSE_WAIT)
apache2   12482 www-data    3u  IPv6    5933       TCP *:www (LISTEN)
apache2   12484 www-data    3u  IPv6    5933       TCP *:www (LISTEN)
apache2   12484 www-data   18u  IPv6 1818866       TCP ns1.**********.com:www->crawl            -66-249-66-82.googlebot.com:52039 (CLOSE_WAIT)
apache2   12488 www-data    3u  IPv6    5933       TCP *:www (LISTEN)
apache2   12488 www-data   18u  IPv6 1819029       TCP ns1.**********.com:www->112.2            01.101.139.pldt.net:63010 (CLOSE_WAIT)
apache2   12497 www-data    3u  IPv6    5933       TCP *:www (LISTEN)
apache2   12497 www-data   18u  IPv6 1819271       TCP ns1.**********.com:www->218.1            86.8.12.cache.maxonline.com.sg:46939 (CLOSE_WAIT)
apache2   12498 www-data    3u  IPv6    5933       TCP *:www (LISTEN)
apache2   12508 www-data    3u  IPv6    5933       TCP *:www (LISTEN)
apache2   12508 www-data   18u  IPv6 1817510       TCP ns1.**********.com:www->27.11            4.163.5:39928 (CLOSE_WAIT)
apache2   12522 www-data    3u  IPv6    5933       TCP *:www (LISTEN)
apache2   12522 www-data   18u  IPv6 1818318       TCP ns1.**********.com:www->host-            78-149-249-247.as13285.net:10024 (CLOSE_WAIT)
apache2   12523 www-data    3u  IPv6    5933       TCP *:www (LISTEN)
apache2   12523 www-data   18u  IPv6 1818932       TCP ns1.**********.com:www->182.1            83.191.113:50494 (CLOSE_WAIT)
apache2   12975 www-data    3u  IPv6    5933       TCP *:www (LISTEN)
apache2   12975 www-data   18u  IPv6 1818501       TCP ns1.**********.com:www->120.1            8.250.170:52049 (CLOSE_WAIT)
apache2   12982 www-data    3u  IPv6    5933       TCP *:www (LISTEN)
apache2   12982 www-data   18u  IPv6 1818734       TCP ns1.**********.com:www->112.2            10.191.112.pldt.net:55611 (CLOSE_WAIT)
apache2   12987 www-data    3u  IPv6    5933       TCP *:www (LISTEN)
apache2   12987 www-data   18u  IPv6 1818472       TCP ns1.**********.com:www->122.5            4.221.45.pldt.net:61861 (CLOSE_WAIT)
apache2   12989 www-data    3u  IPv6    5933       TCP *:www (LISTEN)
apache2   12991 www-data    3u  IPv6    5933       TCP *:www (LISTEN)
apache2   12991 www-data   18u  IPv6 1819004       TCP ns1.**********.com:www->112.2            03.98.49.pldt.net:57522 (CLOSE_WAIT)
apache2   12997 www-data    3u  IPv6    5933       TCP *:www (LISTEN)
apache2   12997 www-data   18u  IPv6 1817901       TCP ns1.**********.com:www->113.2            2.112.193:3295 (CLOSE_WAIT)
apache2   12999 www-data    3u  IPv6    5933       TCP *:www (LISTEN)
apache2   12999 www-data   18u  IPv6 1818255       TCP ns1.**********.com:www->local            host:3314 (CLOSE_WAIT)
apache2   13001 www-data    3u  IPv6    5933       TCP *:www (LISTEN)

netstat -tulpn| grep :80

(none):~# netstat -tulpn| grep :80 tcp6 0 0 :::80 :::* LISTEN 2500/apache2

killall -9 apache

apache: no process killed
share|improve this question
1  
lsof -i - what's got port 80? –  Shane Madden Oct 23 '11 at 3:50
    
@Shane Madden Added to first post, thanks. –  Alice Oct 25 '11 at 12:24
add comment

2 Answers 2

Check what process is listening on :80:

netstat -tulpn| grep :80

Also check what is the path for logs (maybe additional for vhost) - does it exist? does apache has permissions to access?

share|improve this answer
    
I will check it next time it happens. I did a reboot and it got fixed. It crashes like everyweekend twice or more.... And Yes, I do have more Virtual hosts. Do you want me to post the log here? –  Alice Oct 23 '11 at 21:19
    
You mentioned that it happens regularly... hm.. strange - especially if you can be sure that you are not issuing stop/start/restart etc. - but the restart can be caused by logrotate - it kills apache process (usually reloades - but look into init.d scruipt to see what indeed is reload), changes file and starts again - if there is strange process hunting for free 80 port - can have a chance then. But it will succeed always at the same hour - look into logrotate settings for apache. –  Arek B. Oct 24 '11 at 14:47
    
this is what I get (none):~# netstat -tulpn| grep :80 tcp6 0 0 :::80 :::* LISTEN 2500/apache2 –  Alice Oct 25 '11 at 12:15
add comment

Probably you have something already working on port 80. Try to find any other webserver working on port 80, or manually kill all remaining apache (httpd) processes

killall -9 apache

On some systems the apache process may be running as httpd

share|improve this answer
    
@Salvomir apache: no process killed –  Alice Oct 25 '11 at 12:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.