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

相关文章

来自专栏linux驱动个人学习

SMBus与I2C的差别

812
来自专栏张善友的专栏

SignalR 项目介绍

SignalR 是 ASP.NET 团队正在开发的一个 Microsoft .NET Framework 库和 jQuery 插件,可能包括在以后版本的 ASP...

17810
来自专栏杨建荣的学习笔记

生产环境sqlldr加载性能问题及分析之一 (r2第17天)

在测试环境中进行了多轮测试,使用sqlldr批量加载数据,csv文件大概有120G左右,在一致的数据量的情况下,测试环境都在一个小时左右,但是在生产环境中竟然跑...

3266
来自专栏杨建荣的学习笔记

关于验证表中有无数据的方法比较(r2笔记54天)

在平时的工作中,有时候需要准备一些脚本,比如能够简单验证一下表是否可访问,或者验证表中有无数据等。 今天在测试环境进行了简单的模拟,发现还是有很大的差别。 简单...

3267
来自专栏蓝天

HBase thrift2 TIOError

如果HBase thrift2报:“TIOError exception: Default TException”, 这个可能是因为操作的表不存在,不一定是...

792
来自专栏me的随笔

.NET常用第三方库(包)总结

以上二位都是从JAVA阵营移植过来的,对于分布式系统使用文本日志追踪问题也是比较恶心的一件事儿

502
来自专栏高性能服务器开发

关于windows完成端口(IOCP)的一些理解(五)

系列目录 关于windows完成端口(IOCP)的一些理解(一) 关于windows完成端口(IOCP)的一些理解(二) 关于windows完成端口(IOCP)...

29411
来自专栏码匠的流水账

redis的sentinel模式故障演练

redis的sentinel模式相对cluster来说比较简单,缺点是需要浪费一些资源来做sentinel节点,对于中小数据量的业务来说,相对比较划算。

411
来自专栏一“技”之长

iOS第三方文件压缩框架——Godzippa 原

    Godzippa是iOS开发中常用的一个第三方数据压缩框架,其采用类别的方式,为NSData类与NSFileManager类提供了压缩和解压缩数据的方法...

381
来自专栏杨建荣的学习笔记

sql monitor的使用(一) (r2第30天)

在sql调优中,对于sql语句的实时监控显得尤为重要,如果某条sql语句的性能比较差。可能从前端的直观感觉就是执行时间比较长。 对于dba来说,可能关注的相关因...

2695

扫码关注云+社区