Ask Your Question
0

Running keystone in httpd

asked 2015-02-25 08:26:30 -0500

Meghna gravatar image

updated 2015-02-25 09:41:26 -0500

I'm trying to run keystone in httpd. I have done the setup on centos 7, Junos. I made changes as mentioned in http://docs.openstack.org/developer/k... . but when I try to test it.( https://server.com/keystone/admin ) it fails and prompts an error in the httpd error logs.

[Wed Feb 25 19:37:04.312040 2015] [:error] [pid 17770] No handlers could be found for logger "keystone.openstack.common.versionutils"
[Wed Feb 25 19:37:04.322164 2015] [:error] [pid 17770] [remote 192.168.10.1:51971] mod_wsgi (pid=17770): Target WSGI script '/var/www/cgi-bin/keystone/admin' cannot be loaded as Python module.
[Wed Feb 25 19:37:04.322193 2015] [:error] [pid 17770] [remote 192.168.10.1:51971] mod_wsgi (pid=17770): SystemExit exception raised by WSGI script '/var/www/cgi-bin/keystone/admin' ignored.
[Wed Feb 25 19:37:04.322218 2015] [:error] [pid 17770] [remote 192.168.10.1:51971] Traceback (most recent call last):
[Wed Feb 25 19:37:04.322236 2015] [:error] [pid 17770] [remote 192.168.10.1:51971]   File "/var/www/cgi-bin/keystone/admin", line 25, in <module>
[Wed Feb 25 19:37:04.322299 2015] [:error] [pid 17770] [remote 192.168.10.1:51971]     application = deploy.loadapp('config:%s' % conf, name=name)
[Wed Feb 25 19:37:04.322310 2015] [:error] [pid 17770] [remote 192.168.10.1:51971]   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
[Wed Feb 25 19:37:04.322346 2015] [:error] [pid 17770] [remote 192.168.10.1:51971]     return loadobj(APP, uri, name=name, **kw)
[Wed Feb 25 19:37:04.322346 2015] [:error] [pid 17770] [remote 192.168.10.1:51971]   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
[Wed Feb 25 19:37:04.322346 2015] [:error] [pid 17770] [remote 192.168.10.1:51971]     return context.create()
[Wed Feb 25 19:37:04.322346 2015] [:error] [pid 17770] [remote 192.168.10.1:51971]   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 710, in create
[Wed Feb 25 19:37:04.322346 2015] [:error] [pid 17770] [remote 192.168.10.1:51971]     return self.object_type.invoke(self)
[Wed Feb 25 19:37:04.322346 2015] [:error] [pid 17770] [remote 192.168.10.1:51971]   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 144, in invoke
[Wed Feb 25 19:37:04.322346 2015] [:error] [pid 17770] [remote 192.168.10.1:51971]     **context.local_conf)
[Wed Feb 25 19:37:04.322346 2015] [:error] [pid 17770] [remote 192.168.10.1:51971]   File "/usr/lib/python2.7/site-packages/paste/deploy/util.py", line 56, in fix_call
[Wed Feb 25 19:37:04.322383 2015] [:error] [pid 17770] [remote 192.168.10.1:51971]     val = callable(*args, **kw)
[Wed Feb 25 19:37:04.322912 2015] [:error] [pid 17770] [remote 192.168.10.1:51971]   File "/usr/lib/python2.7/site-packages/paste/urlmap ...
(more)
edit retag flag offensive close merge delete

Comments

Can you paste the output of the following?

1) ls -al /va/www/cgi-bin/keystone

2) ls -al /etc/keystone

3) Contents of of you keystone mod wsgi conf file . As per the document you used, it is /etc/httpd/conf.d/wsgi-keystone.conf

Haneef Ali gravatar imageHaneef Ali ( 2015-02-25 09:46:35 -0500 )edit

1) ls -al /va/www/cgi-bin/keystone drwxr-xr-x. 2 root root 4096 Feb 26 14:26 . drwxr-xr-x. 3 root root 21 Jan 12 18:53 .. -rw-r--r--. 3 root root 505 Feb 26 14:23 admin -rw-r--r--. 3 root root 505 Feb 26 14:23 keystone.py -rw-r--r--. 3 root root 505 Feb 2

Meghna gravatar imageMeghna ( 2015-02-26 02:58:45 -0500 )edit

2) ls -al /etc/keystone -rw-r-----. 1 keystone keystone 1504 Dec 5 10:33 default_catalog.templates -rwxrwxrwx+ 1 keystone keystone 52500 Feb 25 19:12 keystone.conf -rw-r-----. 1 keystone keystone 1046 Dec 5 10:33 logging.conf -rw-r-----. 1 keystone keystone 8051 Dec 5 10:33 policy.json

Meghna gravatar imageMeghna ( 2015-02-26 03:01:41 -0500 )edit
3)  cat /etc/httpd/conf.d/wsgi-keystone.conf
WSGIScriptAlias /keystone/main  /var/www/cgi-bin/keystone/main
WSGIScriptAlias /keystone/admin  /var/www/cgi-bin/keystone/admin
<location "="" keystone"="">
 NSSRequireSSL
 Authtype none
</location>
Meghna gravatar imageMeghna ( 2015-02-26 03:03:41 -0500 )edit

2 answers

Sort by » oldest newest most voted
0

answered 2015-02-27 03:41:08 -0500

Meghna gravatar image

Thanks for the reply. I verified I already have the keystone-paste.ini at the /etc/keystone, but it still fails. I saw that the config_file parameter in the keystone.conf refers to the keystone-paste.ini file. Can you please verify if the content of the keystone.py/admin/main files I'm using is correct. cat /var/www/cgi-bin/keystone/keystone.py

import os from keystone import config from paste import deploy import logging from keystone.common import utils from keystone.common import wsgi

CONF = config.CONF config_files = ['/etc/keystone/keystone.conf'] CONF(project='keystone', default_config_files=config_files)

conf = CONF.config_file[0] name = os.path.basename(__file__)

options = deploy.appconfig('config:%s' % CONF.config_file[0]) application = deploy.loadapp('config:%s' % conf, name=name)

edit flag offensive delete link more
0

answered 2015-02-26 10:47:48 -0500

There should keystone-paste.ini in /etc/keystone directory and it is missing. Can you add that and try once again

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

2 followers

Stats

Asked: 2015-02-25 08:26:30 -0500

Seen: 4,012 times

Last updated: Feb 27 '15