Service Unavailable (HTTP 503)和Unable to connect to WSGI daemon process 'keystone-admin' on '/run/ht

1、遇到问题

[root@master ~]# openstack service create  --name keystone --description "OpenStack Identity" identity
Service Unavailable (HTTP 503)
[root@master ~]#
[root@master keystone]# openstack service list
Service Unavailable (HTTP 503)

2、查看日志

[root@master ~]# cd /var/log/httpd/
[root@master httpd]# ls
access_log           access_log-20170725  access_log-20170831  error_log-20170724  error_log-20170807  keystone-access.log
access_log-20170717  access_log-20170731  error_log            error_log-20170730  error_log-20170831  keystone-error.log
[root@master httpd]# vi keystone-error.log 

2017-11-01 14:10:03.594121 mod_wsgi (pid=19147): Unable to connect to WSGI daemon process 'keystone-admin' on '/run/httpd/wsgi.19098.0.2.sock' after multiple attempts.
2017-11-01 14:11:52.656216 mod_wsgi (pid=19145): Unable to connect to WSGI daemon process 'keystone-admin' on '/run/httpd/wsgi.19098.0.2.sock' after multiple attempts.
2017-11-01 14:13:18.034893 mod_wsgi (pid=19144): Unable to connect to WSGI daemon process 'keystone-admin' on '/run/httpd/wsgi.19098.0.2.sock' after multiple attempts.
2017-11-01 14:20:19.668066 mod_wsgi (pid=19883): Unable to connect to WSGI daemon process 'keystone-admin' on '/run/httpd/wsgi.19871.0.2.sock' after multiple attempts.
2017-11-01 14:27:43.132432 mod_wsgi (pid=19885): Unable to connect to WSGI daemon process 'keystone-admin' on '/run/httpd/wsgi.19871.0.2.sock' after multiple attempts.
2017-11-01 14:34:13.570757 mod_wsgi (pid=19886): Unable to connect to WSGI daemon process 'keystone-admin' on '/run/httpd/wsgi.19871.0.2.sock' after multiple attempts.
2017-11-01 14:38:07.266293 mod_wsgi (pid=19882): Unable to connect to WSGI daemon process 'keystone-admin' on '/run/httpd/wsgi.19871.0.2.sock' after multiple attempts.
2017-11-01 14:40:48.584888 mod_wsgi (pid=19884): Unable to connect to WSGI daemon process 'keystone-admin' on '/run/httpd/wsgi.19871.0.2.sock' after multiple attempts.
2017-11-01 14:41:39.235653 mod_wsgi (pid=19883): Unable to connect to WSGI daemon process 'keystone-admin' on '/run/httpd/wsgi.19871.0.2.sock' after multiple attempts.
2017-11-01 14:42:53.061807 mod_wsgi (pid=19885): Unable to connect to WSGI daemon process 'keystone-admin' on '/run/httpd/wsgi.19871.0.2.sock' after multiple attempts.
2017-11-01 14:44:31.602943 mod_wsgi (pid=19886): Unable to connect to WSGI daemon process 'keystone-admin' on '/run/httpd/wsgi.19871.0.2.sock' after multiple attempts.
2017-11-01 14:45:27.431142 mod_wsgi (pid=19882): Unable to connect to WSGI daemon process 'keystone-admin' on '/run/httpd/wsgi.19871.0.2.sock' after multiple attempts.
2017-11-01 14:45:27.631051 mod_wsgi (pid=19884): Unable to connect to WSGI daemon process 'keystone-admin' on '/run/httpd/wsgi.19871.0.2.sock' after multiple attempts.
2017-11-01 14:45:40.939553 mod_wsgi (pid=19883): Unable to connect to WSGI daemon process 'keystone-admin' on '/run/httpd/wsgi.19871.0.2.sock' after multiple attempts.
2017-11-01 14:45:40.978780 mod_wsgi (pid=19885): Unable to connect to WSGI daemon process 'keystone-admin' on '/run/httpd/wsgi.19871.0.2.sock' after multiple attempts.
2017-11-01 14:45:46.671664 mod_wsgi (pid=19884): Unable to connect to WSGI daemon process 'keystone-admin' on '/run/httpd/wsgi.19871.0.2.sock' after multiple attempts.
2017-11-01 14:45:46.711924 mod_wsgi (pid=19883): Unable to connect to WSGI daemon process 'keystone-admin' on '/run/httpd/wsgi.19871.0.2.sock' after multiple attempts.
2017-11-01 14:45:53.167477 mod_wsgi (pid=19886): Unable to connect to WSGI daemon process 'keystone-admin' on '/run/httpd/wsgi.19871.0.2.sock' after multiple attempts.
2017-11-01 14:45:53.857388 mod_wsgi (pid=19884): Unable to connect to WSGI daemon process 'keystone-admin' on '/run/httpd/wsgi.19871.0.2.sock' after multiple attempts.
2017-11-01 14:45:54.364553 mod_wsgi (pid=19883): Unable to connect to WSGI daemon process 'keystone-admin' on '/run/httpd/wsgi.19871.0.2.sock' after multiple attempts.

3、解决办法

[root@master conf.d]# pwd
/etc/httpd/conf.d
[root@master conf.d]# vim wsgi-keystone.conf

增加一行WSGISocketPrefix /var/run/wsgi,完整文件如下。

Listen 5000
Listen 35357

WSGISocketPrefix /var/run/wsgi

<VirtualHost *:5000>
    WSGIDaemonProcess keystone-public processes=5 threads=1 user=keystone group=keystone display-name=%{GROUP}
    WSGIProcessGroup keystone-public
    WSGIScriptAlias / /usr/bin/keystone-wsgi-public
    WSGIApplicationGroup %{GLOBAL}
    WSGIPassAuthorization On
    ErrorLogFormat "%{cu}t %M"
    ErrorLog /var/log/httpd/keystone-error.log
    CustomLog /var/log/httpd/keystone-access.log combined

    <Directory /usr/bin>
        Require all granted
    </Directory>
</VirtualHost>

<VirtualHost *:35357>
    WSGIDaemonProcess keystone-admin processes=5 threads=1 user=keystone group=keystone display-name=%{GROUP}
    WSGIProcessGroup keystone-admin
    WSGIScriptAlias / /usr/bin/keystone-wsgi-admin
    WSGIApplicationGroup %{GLOBAL}
    WSGIPassAuthorization On
    ErrorLogFormat "%{cu}t %M"
    ErrorLog /var/log/httpd/keystone-error.log
    CustomLog /var/log/httpd/keystone-access.log combined

    <Directory /usr/bin>
        Require all granted
    </Directory>
</VirtualHost>

重启

[root@master conf.d]# systemctl restart httpd.service
[root@master conf.d]# openstack service list

[root@master conf.d]# 
[root@master conf.d]#  openstack service create \
>   --name keystone --description "OpenStack Identity" identity
+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | OpenStack Identity               |
| enabled     | True                             |
| id          | 242a271521f845988d0bab4921545d07 |
| name        | keystone                         |
| type        | identity                         |
+-------------+----------------------------------+
[root@master conf.d]#

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

发表于

我来说两句

0 条评论
登录 后参与评论

相关文章

来自专栏IT & Cloud

通过Windows Server代理实现公网访问CDB for SQL Server

3.CDB for SQL Server和Windows Server在同一VPC下

23310
来自专栏数据库新发现

Oracle诊断案例-SGA与Swap之一

案例描述: 用户报告,服务器启动一段时间以后,无法建立数据库连接 重新启动几分钟以后,再次无法连接 系统无法正常使用.

932
来自专栏后端云

Openstack Pike本地yum源搭建

在部署Openstack的时候,可能环境受限,不能连接外网,这时候需要通过本地yum源完成安装。

1114
来自专栏增长技术

deploy to heroku

671
来自专栏乐沙弥的世界

Oracle cloud control 12c 如何修改sysman密码

    前阵子在虚拟机部署了Oracle Cloud Control 12c,事别几日,竟然忘记了登陆密码。主要是因为现在的Oracle有关的Software...

651
来自专栏猿天地

Spring Cloud Zuul过滤器获取请求参数问题?

在忙完了自己的事情后,我也简单的看了下,然后写了一个Filter来实现这位朋友说的功能,其实就是想记录请求的参数信息,下面我把涉及到的请求都打印了一遍,当然日志...

1103
来自专栏数据库新发现

Emulex LightPulse FC9002L光纤卡安装日志

# tar xvf solaris-6.01c-1a.tar x EmlxApps300a8-Solaris.tar, 6850560 bytes, 13380...

882
来自专栏程序猿

安全工具Aircrack-ng的使用

开启了尘封数月的Kali Linux。 其实安全也是数据库学习方向的一个分支哦~~ 官方网站:http://aircrack-ng.org root@kali:...

4269
来自专栏MoeLove

Docker 实战和基础架构

Maybe you will see a few extra lines if your Docker install is brand new.

836
来自专栏Java学习123

oracle默认初始化用户名密码和密码修改

2878

扫码关注云+社区