Keystone.py error on centos 6.3 running Keystone 2014.1.1
First time posting here so be nice :)
I have run into a problem when setting up Openstack-Keystone2014.1.1 (Icehouse) on Centos 6.3. Everything installed fine and the service starts ok.
Keystone is working and I can authenticate against it at this point.
The second part of the task was to place keystone behind a httpd service to allow multithreading as per this guide:
http://docs.openstack.org/developer/keystone/apache-httpd.html (http://docs.openstack.org/developer/k...)
Now when trying to access the main (hard linked to keystone.py) through a browser I get the following error:
[error] [client 172.28.147.0] (8)Exec format error: exec of '/var/www/cgi-bin/main' failed
So this led me run the keystone file on it's own:
python keystone.py
Which throws the following error:
Traceback (most recent call last):
File "keystone.py", line 31, in <module>
from keystone.common import dependency
File "/usr/share/keystone/keystone.py", line 31, in <module>
from keystone.common import dependency
ImportError: No module named common
Here is the keystone.py code
# 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 CON
DITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import sys
print (sys.version)
import logging
import os
from paste import deploy
from keystoneclient.openstack.common import gettextutils
print "text utils imported"
# NOTE(dstanek): gettextutils.enable_lazy() must be called before
# gettextutils._() is called to ensure it has the desired lazy lookup
# behavior. This includes cases, like keystone.exceptions, where
# gettextutils._() is called at import time.
gettextutils.enable_lazy()
print (os.getcwd())
from keystone.common import dependency
from keystone.common import environment
from keystone.common import sql
from keystone import config
from keystone.openstack.common import log
from keystone import service
CONF = config.CONF
config.configure()
sql.initialize()
config.set_default_for_default_log_levels()
CONF(project='keystone')
config.setup_logging()
environment.use_stdlib()
name = os.path.basename(__file__)
if CONF.debug:
CONF.log_opt_values(log.getLogger(CONF.prog), logging.DEBUG)
drivers = service.load_backends()
# 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 = deploy.loadapp('config:%s' % config.find_paste_config(),
name=name)
dependency.resolve_future_dependencies()
The directory exists and has a dependency file.
drwxr-xr-x. 3 root root 4096 Jul 30 14:47 assignment
drwxr-xr-x. 3 root root 4096 Jul 30 14:47 auth
drwxr-xr-x. 3 root root 4096 Jul 30 14:47 catalog
-rw-r--r--. 1 root root 2691 Jun 6 23:24 clean.py
-rw-r--r--. 2 root root 3015 Jun 6 23:24 clean.pyc
-rw-r--r--. 2 root root 3015 Jun 6 23 ...