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.

I'm not able to start the fresh apache2 installation on my development machine running Ubuntu 12.10.

michal@ubuntudesktop:~$ sudo service apache2 start
 * Starting web server apache2
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
                                        [fail]

Netstat:

michal@ubuntudesktop:~$ sudo netstat -lnp | grep '80'
unix  2      [ ACC ]     SEQPACKET  LISTENING     6801     359/udevd           /run/udev/control
unix  2      [ ACC ]     STREAM     LISTENING     14537    2180/dbus-daemon    @/tmp/dbus-9uSpG5NRQ5

lsof:

michal@ubuntudesktop:~$ sudo lsof -i :80
COMMAND    PID   USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
ubuntu-ge 2425 michal   11u  IPv4  17679      0t0  TCP ubuntudesktop.local:42280->mistletoe.canonical.com:http (CLOSE_WAIT)
opera     3278 michal   19u  IPv4 156420      0t0  TCP ubuntudesktop.local:56934->s3-1-w.amazonaws.com:http (ESTABLISHED)
opera     3278 michal   78u  IPv4 126955      0t0  TCP ubuntudesktop.local:53709->69.59.197.29:http (ESTABLISHED)
opera     3278 michal   82u  IPv4 128928      0t0  TCP ubuntudesktop.local:53725->69.59.197.29:http (ESTABLISHED)
opera     3278 michal   83u  IPv4 128632      0t0  TCP ubuntudesktop.local:53718->69.59.197.29:http (ESTABLISHED)
chrome    3708 michal   69u  IPv4 149458      0t0  TCP ubuntudesktop.local:53771->69.59.197.29:http (ESTABLISHED)
chrome    3708 michal  119u  IPv4 146963      0t0  TCP ubuntudesktop.local:46290->we-in-f139.1e100.net:http (ESTABLISHED)
chrome    3708 michal  120u  IPv4 146964      0t0  TCP ubuntudesktop.local:46291->we-in-f139.1e100.net:http (ESTABLISHED)
chrome    3708 michal  146u  IPv4 147990      0t0  TCP ubuntudesktop.local:36624->muc03s01-in-f31.1e100.net:http (ESTABLISHED)

ports.conf from Apache:

NameVirtualHost *:80
Listen 80

<IfModule mod_ssl.c>
    Listen 443
</IfModule>

<IfModule mod_gnutls.c>
    Listen 443
</IfModule>

Any help will be much appreciated.

Update: This is the contents of the error log from /var/log/apache2/error.log:

[Mon Nov 05 06:13:28 2012] [notice] Apache/2.2.22 (Ubuntu) configured -- resuming normal operations
[Mon Nov 05 06:13:44 2012] [notice] caught SIGTERM, shutting down

Update #2: The only Listen directives are the ones listed in ports.conf, see above.

Update #3: strace output: sudo strace -f /etc/init.d/apache2 start http://paste.ubuntu.com/1346460/

share|improve this question

2 Answers 2

You might want to look into your Apache configuration, maybe there is a duplicate Listen directive.

Also it would be helpful if you provided the output of your Apache's Errorlog.

share|improve this answer
1  
Welcome to the site and pardon my correction. Over here, we use "Comment" for requests, advice, or suspicions. Use the "Answer" only when you think you know the precise answer to the problem. –  kubanczyk Nov 9 '12 at 16:11

Try this command to see what ports apache is trying to use:

strace -f /etc/init.d/apache2 start 2>&1 | grep bind
share|improve this answer
    
Typically you need to stop the apache server before running this command (/etc/init.d/apache2 stop) –  FINESEC Nov 9 '12 at 14:06
    
Tried to run the command, but it didn't produce any output. –  michalstanko Nov 9 '12 at 14:53
    
Make sure that strace is installed: apt-get install strace –  FINESEC Nov 9 '12 at 15:36
    
It was. Thanks for suggestions. –  michalstanko Nov 9 '12 at 16:56
    
weird, paste output of this command: strace -f /etc/init.d/apache2 start –  FINESEC Nov 9 '12 at 17:21

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.