安装配置openstack时,到keystone部分时,运行openstack service create --name keystone --description "OpenStack Identity" identity提示如下错误:
ERROR:openstack Internal ServerError(HTTP 500)
该如何处理呢?
查看 /var/log/keystone/keystone.conf,里边没有内容,查看/var/log/httpd/keystone-error.log有如下内容:
2017-10-10 14:23:41.864160 mod_wsgi (pid=9440): Attach interpreter ''.
2017-10-10 14:23:41.864965 mod_wsgi (pid=9445): Attach interpreter ''.
2017-10-10 14:23:41.865659 mod_wsgi (pid=9456): Attach interpreter ''.
2017-10-10 14:23:41.867024 mod_wsgi (pid=9446): Attach interpreter ''.
2017-10-10 14:23:41.871047 mod_wsgi (pid=9462): Attach interpreter ''.
2017-10-10 14:26:07.015011 mod_wsgi (pid=9331, process='keystone-admin', application=''): Loading WSGI script '/var/www/cgi-bin/keystone/admin'.
2017-10-10 14:26:07.721787 mod_wsgi (pid=9331): Target WSGI script '/var/www/cgi-bin/keystone/admin' cannot be loaded as Python module.
2017-10-10 14:26:07.721820 mod_wsgi (pid=9331): Exception occurred processing WSGI script '/var/www/cgi-bin/keystone/admin'.
2017-10-10 14:26:07.721842 Traceback (most recent call last):
2017-10-10 14:26:07.721861 File "/var/www/cgi-bin/keystone/admin", line 4, in <module>
2017-10-10 14:26:07.721898 application = wsgi_server.initialize_application(name)
2017-10-10 14:26:07.721906 File "/usr/lib/python2.7/site-packages/keystone/server/wsgi.py", line 36, in initialize_application
2017-10-10 14:26:07.721946 common.configure()
2017-10-10 14:26:07.721953 File "/usr/lib/python2.7/site-packages/keystone/server/common.py", line 36, in configure
2017-10-10 14:26:07.721978 config.setup_logging()
2017-10-10 14:26:07.721986 File "/usr/lib/python2.7/site-packages/keystone/config.py", line 56, in setup_logging
2017-10-10 14:26:07.722020 log.setup(CONF, 'keystone')
2017-10-10 14:26:07.722026 File "/usr/lib/python2.7/site-packages/oslo_log/log.py", line 211, in setup
2017-10-10 14:26:07.722105 _setup_logging_from_conf(conf, product_name, version)
2017-10-10 14:23:41.864160 mod_wsgi (pid=9440): Attach interpreter ''.
2017-10-10 14:23:41.864965 mod_wsgi (pid=9445): Attach interpreter ''.
2017-10-10 14:23:41.865659 mod_wsgi (pid=9456): Attach interpreter ''.
2017-10-10 14:23:41.867024 mod_wsgi (pid=9446): Attach interpreter ''.
2017-10-10 14:23:41.871047 mod_wsgi (pid=9462): Attach interpreter ''.
2017-10-10 14:26:07.015011 mod_wsgi (pid=9331, process='keystone-admin', application=''): Loading WSGI script '/var/www/cgi-bin/keystone/admin'.
2017-10-10 14:26:07.721787 mod_wsgi (pid=9331): Target WSGI script '/var/www/cgi-bin/keystone/admin' cannot be loaded as Python module.
2017-10-10 14:26:07.721820 mod_wsgi (pid=9331): Exception occurred processing WSGI script '/var/www/cgi-bin/keystone/admin'.
2017-10-10 14:26:07.721842 Traceback (most recent call last):
2017-10-10 14:26:07.721861 File "/var/www/cgi-bin/keystone/admin", line 4, in <module>
2017-10-10 14:26:07.721898 application = wsgi_server.initialize_application(name)
2017-10-10 14:26:07.721906 File "/usr/lib/python2.7/site-packages/keystone/server/wsgi.py", line 36, in initialize_application
2017-10-10 14:26:07.721946 common.configure()
2017-10-10 14:26:07.721953 File "/usr/lib/python2.7/site-packages/keystone/server/common.py", line 36, in configure
2017-10-10 14:26:07.721978 config.setup_logging()
2017-10-10 14:26:07.721986 File "/usr/lib/python2.7/site-packages/keystone/config.py", line 56, in setup_logging
2017-10-10 14:26:07.722020 log.setup(CONF, 'keystone')
2017-10-10 14:26:07.722026 File "/usr/lib/python2.7/site-packages/oslo_log/log.py", line 211, in setup
2017-10-10 14:26:07.722105 _setup_logging_from_conf(conf, product_name, version)
2017-10-10 14:26:07.722112 File "/usr/lib/python2.7/site-packages/oslo_log/log.py", line 263, in _setup_logging_from_conf
2017-10-10 14:26:07.722122 filelog = logging.handlers.WatchedFileHandler(logpath)
2017-10-10 14:26:07.722128 File "/usr/lib64/python2.7/logging/handlers.py", line 392, in __init__
2017-10-10 14:26:07.722343 logging.FileHandler.__init__(self, filename, mode, encoding, delay)
2017-10-10 14:26:07.722353 File "/usr/lib64/python2.7/logging/__init__.py", line 902, in __init__
2017-10-10 14:26:07.722637 StreamHandler.__init__(self, self._open())
2017-10-10 14:26:07.722646 File "/usr/lib64/python2.7/logging/__init__.py", line 925, in _open
2017-10-10 14:26:07.722656 stream = open(self.baseFilename, self.mode)
2017-10-10 14:26:07.722669 IOError: [Errno 13] Permission denied: '/var/log/keystone/keystone.log'
这个如何解决呢?
已经解决,chown -R keystone:keystone /var/log/keystone即可
请问你的问题解决了吗