Ask Your Question
0

Exception occurred processing WSGI script

asked 2016-07-25 09:28:23 -0500

Michel gravatar image

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 (http://git.openstack.org/cgit/opensta...) | 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 (http://git.openstack.org/cgit/opensta...)

<!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 (http://git.openstack.org/cgit/opensta...) :

# 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 ...
(more)
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-07-25 10:38:00 -0500

Michel gravatar image

Using

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

seems to solve the issue.

But I have still an issue when launching the demo instance :

[root@controller nova]# neutron net-list
7d43ee10-baa1-4463-aaf0-f8f3b890a01a | ext-net  | 1744efc4-a135-4a4f-ac81-0dcbfef0657a XXXXXX 
dba911ce-0bed-4d6d-945e-a19789f36197 | demo-net | b8ed02e6-9cc4-4d82-9f81-2fc5191cdf73 192.168.1.0/24 

nova boot --flavor m1.tiny --image cirros-0.3.4-x86_64 --nic net-id=dba911ce-0bed-4d6d-945e-a19789f36197 --security-group default --key-name demo-key demo-instance1

nova-api.log :

: 22486 time: 0.9127622
2016-07-25 17:06:06.464 21586 INFO nova.osapi_compute.wsgi.server [req-0418e4c6-b143-4bf6-bb5a-1c593c7324e5 97582299ac9e42aeb4377ff9224dc2d9 a7107abaece04e43adc2cd299d87e2b1 - - -] 10.0.0.25 "
len: 214 time: 0.0154979
2016-07-25 17:06:06.513 21586 INFO nova.osapi_compute.wsgi.server [req-03e6ab23-3faf-411b-baea-a4722dea203a 97582299ac9e42aeb4377ff9224dc2d9 a7107abaece04e43adc2cd299d87e2b1 - - -] 10.0.0.25 "
" status: 200 len: 1294 time: 0.0452380
2016-07-25 17:06:10.393 21585 INFO nova.osapi_compute.wsgi.server [req-59ebaf54-4a0d-478f-a7a1-7e5f131f1ff1 97582299ac9e42aeb4377ff9224dc2d9 a7107abaece04e43adc2cd299d87e2b1 - - -] 10.0.0.25 "
t=21 HTTP/1.1" status: 200 len: 211 time: 0.2834220
2016-07-25 17:10:21.823 21588 INFO nova.osapi_compute.wsgi.server [req-58e64ecd-4f9e-434c-85af-cfac303aa148 97582299ac9e42aeb4377ff9224dc2d9 a7107abaece04e43adc2cd299d87e2b1 - - -] 10.0.0.25 "
len: 889 time: 0.3874590
2016-07-25 17:11:07.121 21588 INFO nova.osapi_compute.wsgi.server [req-c348b49c-c80e-4eed-aabc-4979d4d02262 97582299ac9e42aeb4377ff9224dc2d9 a7107abaece04e43adc2cd299d87e2b1 - - -] 10.0.0.25 "
5 time: 0.3618941
2016-07-25 17:11:07.169 21588 ERROR nova.api.openstack [req-52bcf50c-b9a8-4b2d-a9fa-63e213fd2a83 97582299ac9e42aeb4377ff9224dc2d9 a7107abaece04e43adc2cd299d87e2b1 - - -] Caught error: id
2016-07-25 17:11:07.169 21588 TRACE nova.api.openstack Traceback (most recent call last):
2016-07-25 17:11:07.169 21588 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/nova/api/openstack/__init__.py", line 125, in __call__
2016-07-25 17:11:07.169 21588 TRACE nova.api.openstack     return req.get_response(self.application)
File Edit Options Buffers Tools Help                                                                                                                                                           
2016-07-25 17:11:07.169 21588 TRACE nova.api.openstack     response = self.app(environ, start_response)
2016-07-25 17:11:07.169 21588 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/webob/dec.py", line 144, in __call__
2016-07-25 17:11:07.169 21588 TRACE nova.api.openstack     return resp(environ, start_response)
2016-07-25 17:11:07.169 21588 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/webob/dec.py", line 130, in __call__
2016-07-25 17:11:07.169 21588 TRACE nova.api.openstack     resp = self.call_func(req, *args, **self.kwargs)
2016-07-25 17:11:07.169 21588 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/webob/dec.py", line 195, in call_func
2016-07-25 17:11:07.169 21588 TRACE nova.api.openstack     return self.func(req, *args, **kwargs)
2016-07-25 17:11:07.169 21588 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/nova/api/openstack/wsgi.py", line 756, in __call__
2016-07-25 17:11:07.169 21588 TRACE nova.api.openstack     content_type, body, accept)
2016-07-25 17:11:07.169 21588 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/nova/api/openstack/wsgi.py", line 821, in _process_stack
2016-07-25 17:11:07.169 21588 TRACE nova.api.openstack     action_result = self.dispatch(meth, request, action_args)
2016-07-25 17:11:07.169 21588 TRACE nova ...
(more)
edit flag offensive delete link more

Comments

modify /usr/lib/python2.7/site-packages/nova/image/api.py line 92 to "include_locations=True",creating instance can pass.

wangtiechao1@gmail.com gravatar imagewangtiechao1@gmail.com ( 2016-11-29 01:56:54 -0500 )edit

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

1 follower

Stats

Asked: 2016-07-25 09:28:23 -0500

Seen: 1,940 times

Last updated: Jul 25 '16