[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)
[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.
[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]#