Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Exception occurred processing WSGI script

Hi,

I am not able to use httpd service due to the following error :

2016-07-25 15:35:27.538611 mod_wsgi (pid=23013): Exception occurred processing WSGI script '/var/www/cgi-bin/keystone/admin'.
2016-07-25 15:35:27.538690   File "/var/www/cgi-bin/keystone/admin", line 1
2016-07-25 15:35:27.538701     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

This is due to the fact that the kilo user guide ask us to do the following command :

curl http://git.openstack.org/cgit/openstack/keystone/plain/httpd/keystone.py?h=stable/kilo | tee /var/www/cgi-bin/keystone/main /var/www/cgi-bin/keystone/admin

[root@controller conf.d]# curl http://git.openstack.org/cgit/openstack/keystone/plain/httpd/keystone.py?h=stable/kilo

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
<head>
<title>openstack/keystone - OpenStack Identity (Keystone)</title>
<meta name='generator' content='cgit v0.12'/>
<meta name='robots' content='index, nofollow'/>
<link rel='stylesheet' type='text/css' href='/static/openstack.css'/>
<link rel='shortcut icon' href='/static/favicon.ico'/>

but then a HTML file is copied in /var/www/cgi-bin/keystone/main (admin) instead of a python script.

I have tried with curl http://git.openstack.org/cgit/openstack/keystone/plain/httpd/keystone.py :

# Copyright 2013 OpenStack Foundation
#
#    Licensed under the Apache License, Version 2.0 (the "License"); you may
#    not use this file except in compliance with the License. You may obtain
#    a copy of the License at
#
#         http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#    License for the specific language governing permissions and limitations
#    under the License.

import os

from oslo_log import log
from oslo_log import versionutils

from keystone.i18n import _LW
from keystone.server import wsgi as wsgi_server


name = os.path.basename(__file__)
LOG = log.getLogger(__name__)


def deprecation_warning():
    versionutils.report_deprecated_feature(
        LOG,
        _LW('httpd/keystone.py is deprecated as of Mitaka'
            ' in favor of keystone-wsgi-admin and keystone-wsgi-public'
            ' and may be removed in O.')
    )

# NOTE(ldbragst): 'application' is required in this context by WSGI spec.
# The following is a reference to Python Paste Deploy documentation
# http://pythonpaste.org/deploy/
application = wsgi_server.initialize_application(
    name,
    post_log_configured_function=deprecation_warning)

but then I face another issue :

16-07-25 16:13:50.609105 mod_wsgi (pid=23641): Target WSGI script '/var/www/cgi-bin/keystone/admin' cannot be loaded as Python module.
2016-07-25 16:13:50.609139 mod_wsgi (pid=23641): Exception occurred processing WSGI script '/var/www/cgi-bin/keystone/admin'.
2016-07-25 16:13:50.609168 Traceback (most recent call last):
2016-07-25 16:13:50.609188   File "/var/www/cgi-bin/keystone/admin", line 18, in <module>
2016-07-25 16:13:50.609275     from oslo_log import versionutils
2016-07-25 16:13:50.609296 ImportError: cannot import name versionutils
2016-07-25 16:13:50.614236 mod_wsgi (pid=23644, process='keystone-admin', application=''): Loading WSGI script '/var/www/cgi-bin/keystone/admin'.
2016-07-25 16:13:50.759834 mod_wsgi (pid=23644): Target WSGI script '/var/www/cgi-bin/keystone/admin' cannot be loaded as Python module.
2016-07-25 16:13:50.759876 mod_wsgi (pid=23644): Exception occurred processing WSGI script '/var/www/cgi-bin/keystone/admin'.

Could you please tell me where I can find a suitable file for Kilo ?

Thanks & Regards,

Michel