安装 packstack 后,httpd 服务拒绝启动

安装 packstack 后,httpd 服务拒绝启动

Centos 7 Openstack 单机设置

安装 packstack 后,我重新启动了计算机,但开机后,httpd 服务无法启动

 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

那么 httpd/openstack 失败是因为 python 已经占用了套接字?

如何修复这个问题?

答案1

在端口 8777 上监听的 OpenStack 服务是用于云遥测的“Ceilomenter”-ceiliometer 可以作为 evenlet 运行,也可以作为 WSGI 在 Apache 后面运行-如果 Apache 没有启动,则假定它被配置为提供 ceilometer API-并且与 eventlet 进程冲突,在您的 Apache 站点中查找类似这样的内容:

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>

如果您看到类似这样的内容,请停止 ceilometer-api eventlet 进程的运行,并禁止其启动。

service ceilometer-api stop


chkconfig ceilometer-api off 

或者

systemctl disable ceilometer-api

对于 keystone 服务来说也是如此。

相关内容