Devstack fails to start apache2 - "Address already in use" : "could not bind to address"

asked 2014-09-09 18:26:53 -0600

patriotemeritus gravatar image

updated 2014-09-10 01:56:46 -0600

Tried to install devstack icehouse on Ubuntu 14.04 with the following "localrc" file:


# Logging

# Credentials

# Github's Branch

# Neutron - Networking Service

# Neutron - Load Balancing

# Heat - Orchestration Service

# Ceilometer - Metering Service (metering + alarming)

All seems to be going well until Horizon /Apache are being started up, then the following error appears: "(98)Address already in use: AH00072: make_sock: could not bind to address [::]:5000" and i can't seem to figure out what's causing it.

Any ideas on what could be causing this problem, or how to solve it? I've come across something related to this being a bug here ( ( ) but i'm not entirely sure it's the same thing and also I don't see a solution yet

NB: The process behind port 5000, in my case is python (...and i have no idea why). If i kill it and restart apache, i can get to the horizon log-in page, but i can't log in with the given credentials.

The installation log where the error appears is below. The apache2 error logs are actually empty.

2014-09-09 23:02:39.113 | + start_horizon
2014-09-09 23:02:39.113 | + restart_apache_server
2014-09-09 23:02:39.113 | + restart_service apache2
2014-09-09 23:02:39.113 | + is_ubuntu
2014-09-09 23:02:39.113 | + [[ -z deb ]]
2014-09-09 23:02:39.113 | + '[' deb = deb ']'
2014-09-09 23:02:39.114 | + sudo /usr/sbin/service apache2 restart
2014-09-09 23:02:39.124 |  * Restarting web server apache2
2014-09-09 23:02:39.231 | (98)Address already in use: AH00072: make_sock: could not bind to address [::]:5000
2014-09-09 23:02:39.231 | (98)Address already in use: AH00072: make_sock: could not bind to address
2014-09-09 23:02:39.232 | no listening sockets available, shutting down
2014-09-09 23:02:39.232 | AH00015: Unable to open logs
2014-09-09 23:02:39.245 | Action 'start' failed.
2014-09-09 23:02:39.245 | The Apache error log may have more information.
2014-09-09 23:02:59.335 |!
2014-09-09 23:02:59.336 |  * The apache2 instance did not start within 20 seconds. Please read the log files to discover problems
2014-09-09 23:02:59.336 | + exit_trap
2014-09-09 23:02:59.336 | + local r=1
2014-09-09 23:02:59.337 | ++ jobs -p
2014-09-09 23:02:39.113 | + '[' deb = deb ']'
2014-09-09 23:02:39.114 | + sudo /usr/sbin/service apache2 restart
2014-09-09 23:02:39.124 |  * Restarting web server apache2
2014-09-09 23:02:39.231 | (98)Address already in use: AH00072: make_sock: could not bind ...
edit retag flag offensive close merge delete


there must be another app using same port try to use different port.

SGPJ gravatar imageSGPJ ( 2014-09-09 18:56:54 -0600 )edit

Yes as I mentioned in the post, python is the process behind port 5000, but python ends up on that port on account of the devstack setup. I'm not entirely sure why Apache is trying to bind to port 5000, shouldn't it be binding to 80? (I'm sort of a noob to openstack so i may get things wrong)

patriotemeritus gravatar imagepatriotemeritus ( 2014-09-09 19:35:15 -0600 )edit

4 answers

Sort by ยป oldest newest most voted

answered 2014-09-10 02:41:18 -0600

SGPJ gravatar image

Refer to /opt/stack/horizon/doc/source/quickstart.rst and openstack_dashboard/local/ for port 80

Edit below horizon.conf file to port 80 and restart by:

 sudo service apache2 restart

File /etc/apache2/sites-available/horizon.conf

<VirtualHost *:80>
    WSGIScriptAlias / /opt/stack/horizon/openstack_dashboard/wsgi/django.wsgi
    WSGIDaemonProcess horizon user=os group=os processes=3 threads=10 home=/opt/stack/horizon
    WSGIApplicationGroup %{GLOBAL}

    WSGIProcessGroup horizon

    DocumentRoot /opt/stack/horizon/.blackhole/
    Alias /media /opt/stack/horizon/openstack_dashboard/static

    <Directory />
        Options FollowSymLinks
        AllowOverride None
        Require all granted

    <Directory /opt/stack/horizon/>
        Options Indexes FollowSymLinks MultiViews

        AllowOverride None
        Order allow,deny
        allow from all
        Require all granted

    ErrorLog /var/log/apache2/horizon_error.log
    LogLevel warn
    CustomLog /var/log/apache2/horizon_access.log combined

WSGISocketPrefix /var/run/apache2
edit flag offensive delete link more


Unfortunately in my horizon.conf file it already indicates port 80.

patriotemeritus gravatar imagepatriotemeritus ( 2014-09-16 06:39:45 -0600 )edit

answered 2016-06-23 14:22:02 -0600

hk gravatar image

In some case of openstack gives this error because port describe in file "/etc/httpd/conf.d/wsgi-keystone.conf" is same as keystone endpoint URL port. so it conflict and both keystone and httpd service not start simultaneously.

for its if you change port of keystone endpoint then you would require to change in lots of other openstack service config file

so change port 5000 to 5001 and 35357 to 35358 in file "/etc/httpd/conf.d/wsgi-keystone.conf".and reboot. then both service will work simultaneouly in above file if you set to port 80 then it will conflict with "/etc/httpd/conf/httpd.conf". so kindly change as above then it work work.

edit flag offensive delete link more

answered 2014-09-16 12:38:27 -0600

patriotemeritus gravatar image

The answer I eventually found that solved my problem:

  • Keystone is actually the rogue process that is sitting on port 5000.
  • The "" in the latest master in the stable/icehouse that i have, is not entirely undoing the stacking process of the previous icehouse that was in place. It does not clean everything off from the previous devstack (icehouse stable from 4 months ago) that was running on the system. Particularly, cleaning up the keystone process running at port 5000 was not being done by this "". (NB: No amount of unstacking with the newer devstack icehouse will remove all traces properly of an older devstack because the scripts seem to be different. Even using the "" didn't do the trick).
  • In the current version of icehouse, keystone is now being started up by apache, that's why apache is seen to be trying to bind to port 5000

The fix itself that worked for me was to remove the "keystone.conf" and recreate a blank one in it's place:

sudo rm /etc/apache2/sites-available/keystone.conf
sudo touch /etc/apache2/sites-available/keystone.conf

The ./, ./, remove all traces of mysql (as described here: ( ) ... and finally ./ again

The reason why i created an empty keystone.conf file was that when i removed it and "unstacked" and "stacked" again, for some reason a new "keystone.conf" file was not being created. The devstack installation script would just stop and throw some error about not being able to find the "keystone.conf" at the aforementioned location. Creating an empty one seems to have done the trick. I guess emptying the original keystone.conf might produce the same result as what i've done here.

You can read more about this problem and some parts of the solution here: (

edit flag offensive delete link more

answered 2016-08-07 04:55:14 -0600

Afaque gravatar image

updated 2016-08-07 04:56:55 -0600

In some cases this issue comes due to blocking by firewall or SElinux.

For SElinux check, it should be Permissive. $getenforce (output should be Permissive)

If it is not, make it Permissive $setenforce 0 (temporary allow )

And dissable iptables $service stop iptables

Then restart apache service $service apache2 restart

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-09-09 18:26:53 -0600

Seen: 6,869 times

Last updated: Aug 07 '16