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 have upgraded from lenny to wheezy and now apache fails to start:

# /etc/init.d/apache2 start                                                                                                                                                             
Starting web server: apache2[Wed May 08 19:01:08 2013] [crit] (22)Invalid argument: alloc_listener: failed to get a socket for (null)
Syntax error on line 17 of /etc/apache2/ports.conf:
Listen setup failed
Action 'start' failed.
The Apache error log may have more information.
 failed!

Line 17 of ports.conf of course is correct:

# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default
# This is also true if you have upgraded from before 2.2.9-3 (i.e. from
# Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and
# README.Debian.gz

#NameVirtualHost *:80
#Listen 80

<IfModule mod_ssl.c>
    # If you add NameVirtualHost *:443 here, you will also have to change
    # the VirtualHost statement in /etc/apache2/sites-available/default-ssl
    # to <VirtualHost *:443>
    # Server Name Indication for SSL named virtual hosts is currently not
    # supported by MSIE on Windows XP.
    Listen 443
</IfModule>

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

It looks like it is related to some kernel calls not present in the kernel I am running: http://major.io/2009/08/14/fedora-11-httpd-alloc_listener-failed-to-get-a-socket-for-null/

This is a xen VPS and the kernel version is 2.6.26-amd64. I am as of now unable to update the kernel because the provider needs to do part of that. I already sent a request but I don't know how long they will take.

Is there a way to get this to work until I have a chance to get the kernel updated?

share|improve this question
1  
The kernel update is irrelavent. It would have been nice if you would have added line numbers or posted the entire file. The fragement you posted simply doesn't have 17 lines. Can you double check with netstat -ntlp and make sure that there is nothing already listening on port 443. Can you verify the old Apache process is actually dead? Can you post the last few lines from your error log after trying to start Apache? You need more information. –  Zoredache May 9 '13 at 9:26
    
Posted whole file, it's the default debian ports.conf with Listen 80 commented out by me. The kernel version is relevant because on a system with kernel 2.3.0-amd64 and a similar apache setup it's working fine. In addition another VPS shows the same issue, with the same kernel version (2.2.26). –  aseq May 9 '13 at 9:36

2 Answers 2

up vote 3 down vote accepted

Did you tried this solution, found on ServerFault :

It's about to reinstall libapr1 on your system.

Cheers,

K.

share|improve this answer
    
Yes that fixed it, thanks. –  aseq May 9 '13 at 19:30

Listen setup failed

Something else is already listening on port 443 (old version of apache perhaps?). Kill it and apache startup will work again.

share|improve this answer
    
Unfortunately that is not the case. –  aseq May 9 '13 at 19:03

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.