Apache/WSGI configuration requires editing keystone-paste.ini

Bug #1499462 reported by Matt Kassawara on 2015-09-24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)

Bug Description

Changes to the Apache/WSGI implementation for Liberty (wsgi-keystone.conf) requires editing the keystone-paste.ini file and modifying the [composite:main] and [composite:admin] directives to [composite:keystone-wsgi-public] and [composite:keystone-wsgi-admin], respectively, otherwise the following error appears and the API returns a 500 code to the client:

mod_wsgi (pid=874): Target WSGI script '/usr/local/bin/keystone-wsgi-admin' cannot be loaded as Python module.
mod_wsgi (pid=874): Exception occurred processing WSGI script '/usr/local/bin/keystone-wsgi-admin'.
 Traceback (most recent call last):
 File "/usr/local/bin/keystone-wsgi-admin", line 25, in <module>
     application = wsgi_server.initialize_application(name)
   File "/usr/lib/python2.7/dist-packages/keystone/server/wsgi.py", line 51, in initialize_application
   File "/usr/lib/python2.7/dist-packages/keystone/server/common.py", line 43, in setup_backends
     res = startup_application_fn()
   File "/usr/lib/python2.7/dist-packages/keystone/server/wsgi.py", line 48, in loadapp
     'config:%s' % config.find_paste_config(), name)
   File "/usr/lib/python2.7/dist-packages/keystone/service.py", line 46, in loadapp
     controllers.latest_app = deploy.loadapp(conf, name=name)
   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
    return loadobj(APP, uri, name=name, **kw)
   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 271, in loadobj
   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 296, in loadcontext
   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 320, in _loadconfig
     return loader.get_context(object_type, name, global_conf)
   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 408, in get_context
     object_type, name=name)
   File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 587, in find_config_section
 LookupError: No section 'keystone-wsgi-admin' (prefixed by 'app' or 'application' or 'composite' or 'composit' or 'pipeline' or 'filter-app') found in config /etc/keystone/keystone-paste.ini

David Stanek (dstanek) wrote :

I think this is because you don't have the correct scripts for keystone-wsgi-{admin,main}. My guess is that you used the keystone.py and linked it like we used to have to do. The new way is that these scripts are generated by Keystone.

Are you using the latest config with an older version of Keystone?

Matt Kassawara (ionosphere80) wrote :

Upon further investigation, the Ubuntu packages for Liberty include the wsgi-keystone-public and wsgi-keystone-admin files and put them in the /usr/bin directory. Prior versions did not include any files for Apache/WSGI, so the installation guide pulled them (particularly keystone.py) from the git repository. I'm closing this issue and updating the installation guide to use the files in the /usr/bin directory, at least on Ubuntu. Not sure about other distributions yet.

Changed in keystone:
status: New → Invalid
no longer affects: monasca
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers