Centos – httpd service refuse to start after packstack installation

centoshttpdopenstackpython

Centos 7
Openstack single machine setup

After packstack installation I did reboot my computer and after it turned on, httpd service failed to start

 httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
  Drop-In: /usr/lib/systemd/system/httpd.service.d
           └─openstack-dashboard.conf
   Active: failed (Result: exit-code) since Thu 2016-05-26 17:59:07 EEST; 47s ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 4377 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
  Process: 4365 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
  Process: 3511 ExecStartPre=/usr/bin/python /usr/share/openstack-dashboard/manage.py compress --force (code=exited, status=0/SUCCESS)
  Process: 1175 ExecStartPre=/usr/bin/python /usr/share/openstack-dashboard/manage.py collectstatic --noinput --clear (code=exited, status=0/SUCCESS)
 Main PID: 4365 (code=exited, status=1/FAILURE)
May 26 17:59:07 devstack-02.home.XXXX.net httpd[4365]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:8777
May 26 17:59:07 devstack-02.home.XXXX.net httpd[4365]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:8777
May 26 17:59:07 devstack-02.home.XXXX.net httpd[4365]: no listening sockets available, shutting down
May 26 17:59:07 devstack-02.home.XXXX.net httpd[4365]: AH00015: Unable to open logs
May 26 17:59:07 devstack-02.home.XXXX.net systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
May 26 17:59:07 devstack-02.home.XXXX.net systemd[1]: httpd.service: control process exited, code=exited status=1
May 26 17:59:07 devstack-02.home.XXXX.net systemd[1]: Failed to start The Apache HTTP Server.
May 26 17:59:07 devstack-02.home.XXXX.net systemd[1]: Unit httpd.service entered failed state.
May 26 17:59:07 devstack-02.home.XXXX.net systemd[1]: httpd.service failed.
May 26 17:59:07 devstack-02.home.XXXX.net kill[4377]: kill: cannot find process ""

# netstat -tulpn | grep 8777
tcp        0      0 0.0.0.0:8777            0.0.0.0:*              LISTEN      1111/python2

So httpd/openstack failed because python already has taken socket ?

How to fix this ?

Best Answer

the OpenStack service listening on Port 8777 is 'Ceilomenter' for cloud telemetry - ceiliometer can run as evenlet or behind Apache as WSGI - if Apache is not starting it's presumed that it's configured to serve the ceilometer API - and conflicting with the eventlet process, look for something like this in your Apache sites:

Listen 8777

    <VirtualHost *:8777>
        WSGIDaemonProcess ceilometer-api processes=2 threads=10 user=SOMEUSER display-name=%{GROUP}
        WSGIProcessGroup ceilometer-api
        WSGIScriptAlias / /var/www/ceilometer/app
        WSGIApplicationGroup %{GLOBAL}
        <IfVersion >= 2.4>
            ErrorLogFormat "%{cu}t %M"
        </IfVersion>
        ErrorLog /var/log/httpd/ceilometer_error.log
        CustomLog /var/log/httpd/ceilometer_access.log combined
    </VirtualHost>

if you see something like this then stop the ceilometer-api eventlet process from running and disable it from starting.

service ceilometer-api stop


chkconfig ceilometer-api off 

or

systemctl disable ceilometer-api

this is true for the keystone service also.