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 条评论
登录 后参与评论

相关文章

来自专栏乐沙弥的世界

SQL基础-->过滤和排序

--=======================================

12120
来自专栏PPV课数据科学社区

【学习】七天搞定SAS(三):基本模块调用

搞定基本的函数之后,开始鼓捣SAS里面的模型。也就是说,要开始写PROC了。说实话,越学SAS,越觉得SAS像Stata...无论是从输出的样式,还是语法。好不...

35250
来自专栏码匠的流水账

聊聊rocketmq的RequestTask

org/apache/rocketmq/remoting/netty/RequestTask.java

24020
来自专栏运维前线

Docker 学习资源整理

Awesome Docker A curated list of Docker resources and projects Inspired by...

61450
来自专栏码匠的流水账

聊聊EurekaHealthCheckHandler

eureka-client-1.8.8-sources.jar!/com/netflix/appinfo/HealthCheckHandler.java

29220
来自专栏linux驱动个人学习

高通msm8909耳机调试

1、DTS相应修改: DTS相关代码:kernel/arch/arm/boot/dts/qcom/msm8909-qrd-skuc.dtsi: 1 s...

1.2K50
来自专栏xingoo, 一个梦想做发明家的程序员

Spark踩坑——java.lang.AbstractMethodError

百度了一下说是版本不一致导致的。于是重新检查各个jar包,发现spark-sql-kafka的版本是2.2,而spark的版本是2.3,修改spark-sql-...

24800
来自专栏智能计算时代

Best Bluemix Content

image.png Watson Services for Bluemix Sample Apps: Watson Films App (Video) Wats...

29040
来自专栏叁金大数据

EmguCV学习——视频与图片互转

其实视频转图片在上篇文章中已经有些眉目了,其实就是按帧读取视频,然后把帧保存就ok。然后自己再加个进度条美化一下。。。这代码简单易懂,还是直接上代码吧。

28810
来自专栏一个会写诗的程序员的博客

ClassMetadataReadingVisitor has interface org.springframework.asm.ClassVisitor as super class

ClassMetadataReadingVisitor has interface org.springframework.asm.ClassVisitor a...

12950

扫码关注云+社区

领取腾讯云代金券