3

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/

michalstanko
  • 291
  • 1
  • 3
  • 7

2 Answers2

1

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

strace -f /etc/init.d/apache2 start 2>&1 | grep bind
FINESEC
  • 1,371
  • 7
  • 8
1

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.

Izzy
  • 795
  • 2
  • 8
  • 31
  • 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 09 '12 at 16:11