Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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

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:24 clean.pyo
-rw-r--r--.  1 root root  5709 Jun  6 23:24 cli.py
-rw-r--r--.  2 root root  7039 Jun  6 23:24 cli.pyc
-rw-r--r--.  2 root root  7039 Jun  6 23:24 cli.pyo
drwxr-xr-x.  7 root root  4096 Jul 31 15:26 common
-rw-r--r--.  1 root root  2937 Jun  6 23:24 config.py
-rw-r--r--.  2 root root  2562 Jun  6 23:24 config.pyc
-rw-r--r--.  2 root root  2562 Jun  6 23:24 config.pyo
-drwxr-xr-x. 14 root root  4096 Jul 30 14:47 contrib
-rw-r--r--.  1 root root  5246 Jun  6 23:24 controllers.py
-rw-r--r--.  2 root root  5433 Jun  6 23:24 controllers.pyc
-rw-r--r--.  2 root root  5433 Jun  6 23:24 controllers.pyo
drwxr-xr-x.  3 root root  4096 Jul 30 14:47 credential
-rw-r--r--.  1 root root 11220 Jun  6 23:24 exception.py
-rw-r--r--.  2 root root 16711 Jun  6 23:24 exception.pyc
-rw-r--r--.  2 root root 16711 Jun  6 23:24 exception.pyo
-drwxr-xr-x.  3 root root  4096 Jul 30 14:47 identity
-rw-r--r--.  1 root root     0 Jun  6 23:24 __init__.py
-rw-r---r--.  2 root root   140 Jun  6 23:24 __init__.pyc
-rw-r--r--.  2 root root   140 Jun  6 23:24 __init__.pyo
drwxr-xr-x. 68 root root  4096 Jul 30 14:47 locale
drwxr-xr-x.  2 root root  4096 Jul 30 14:47 middleware
-rw-r--r--.  1 root root 11122 Jun  6 23:24 notifications.py
-rw-r--r--.  2 root root 11002 Jun  6 23:24 notifications.pyc
-rw-r--r--.  2 root root 11002 Jun  6 23:24 notifications.pyo
drwxr-xr-x.  3 root root  4096 Jul 30 14:47 openstack
drwxr-xr-x.  3 root root  4096 Jul 30 14:47 policy
-rw-r--r--.  1 root root  2704 Jun  6 23:24 routers.py
-rw-r--r--.  2 root root  3372 Jun  6 23:24 routers.pyc
-rw-r--r--.  2 root root  3372 Jun  6 23:24 routers.pyo
 -rw-r--r--.  1 root root  4447 Jun  6 23:24 service.py
-rw-r--r--.  2 root root  4314 Jun  6 23:24 service.pyc
-rw-r--r--.  2 root root  4314 Jun  6 23:24 service.pyo
drwxr-xr-x.  5 root root 12288 Jul 30 14:47 tests
drwxr-xr-x.  4 root root  4096 Jul 30 14:47 token
drwxr-xr-x.  3 root root  4096 Jul 30 14:47 trust
This is the Common Direcrtory:
-rw-r--r--. 1 root root  3947 Jun  6 23:24 authorization.py
-rw-r--r--. 2 root root  3130 Jun  6 23:24 authorization.pyc
-rw-r--r--. 2 root root  3130 Jun  6 23:24 authorization.pyo
-rw-r--r--. 1 root root 13127 Jun  6 23:24 base64utils.py
-rw-r--r--. 2 root root 13943 Jun  6 23:24 base64utils.pyc
-rw-r--r--. 2 root root 13943 Jun  6 23:24 base64utils.pyo
drwxr-xr-x. 3 root root  4096 Jul 30 14:47 cache
-rw-r--r--. 1 root root 40275 Jun  6 23:24 config.py
-rw-r--r--. 2 root root 27711 Jun  6 23:24 config.pyc
-rw-r--r--. 2 root root 27711 Jun  6 23:24 config.pyo
-rw-r--r--. 1 root root 26944 Jun  6 23:24 controller.py
-rw-r--r--. 2 root root 22362 Jun  6 23:24 controller.pyc
-rw-r--r--. 2 root root 22362 Jun  6 23:24 controller.pyo
-rw-rw-r--. 1 root root 10620 Jun  5 21:33 dependency.py
-rw-r--r--. 1 root root  9281 Jul 31 15:26 dependency.pyc
-rw-r--r--. 1 root root  9281 Jun  6 23:24 dependency.pyo
-rw-r--r--. 1 root root  3222 Jun  6 23:24 driver_hints.py
-rw-r--r--. 2 root root  3256 Jun  6 23:24 driver_hints.pyc
-rw-r--r--. 2 root root  3256 Jun  6 23:24 driver_hints.pyo
drwxr-xr-x. 2 root root  4096 Jul 30 14:47 environment
-rw-r--r--. 1 root root  1652 Jun  6 23:24 extension.py
-rw-r--r--. 2 root root  1413 Jun  6 23:24 extension.pyc
-rw-r--r--. 2 root root  1413 Jun  6 23:24 extension.pyo
-rw-r--r--. 1 root root     0 Jun  6 23:24 __init__.py
-rw-r--r--. 2 root root   147 Jun  6 23:24 __init__.pyc

-rw-r--r--. 2 root root   147 Jun  6 23:24 __init__.pyo
drwxr-xr-x. 3 root root  4096 Jul 30 14:47 kvs
drwxr-xr-x. 2 root root  4096 Jul 30 14:47 ldap
-rw-r--r--. 1 root root  3009 Jun  6 23:24 manager.py
-rw-r--r--. 2 root root  3371 Jun  6 23:24 manager.pyc
-rw-r--r--. 2 root root  3371 Jun  6 23:24 manager.pyo
-rw-r--r--. 1 root root  3286 Jun  6 23:24 models.py
-rw-r--r--. 2 root root  4968 Jun  6 23:24 models.pyc
-rw-r--r--. 2 root root  4968 Jun  6 23:24 models.pyo
-rw-r--r--. 1 root root 11216 Jun  6 23:24 openssl.py
-rw-r--r--. 2 root root  9443 Jun  6 23:24 openssl.pyc
-rw-r--r--. 2 root root  9443 Jun  6 23:24 openssl.pyo
-rw-r--r--. 1 root root 17875 Jun  6 23:24 pemutils.py
-rw-r--r--. 2 root root 16634 Jun  6 23:24 pemutils.pyc
-rw-r--r--. 2 root root 16634 Jun  6 23:24 pemutils.pyo
-rw-r--r--. 1 root root  2004 Jun  6 23:24 router.py
-rw-r--r--. 2 root root  1515 Jun  6 23:24 router.pyc
-rw-r--r--. 2 root root  1515 Jun  6 23:24 router.pyo
-rw-r--r--. 1 root root 13064 Jun  6 23:24 serializer.py
-rw-r--r--. 1 root root 10878 Jun  6 23:24 serializer.pyc
-rw-r--r--. 1 root root 10753 Jun  6 23:25 serializer.pyo
drwxr-xr-x. 3 root root  4096 Jul 30 14:47 sql
-rw-r--r--. 1 root root 17437 Jun  6 23:24 utils.py
-rw-r--r--. 2 root root 18451 Jun  6 23:24 utils.pyc
-rw-r--r--. 2 root root 18451 Jun  6 23:24 utils.pyo
-rw-r--r--. 1 root root 22692 Jun  6 23:24 wsgi.py
-rw-r--r--. 2 root root 23135 Jun  6 23:24 wsgi.pyc
-rw-r--r--. 2 root root 23135 Jun  6 23:24 wsgi.pyo

Any help at all here would be amazing! I am at a complete loss! Cheers, Leigh

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

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:24 clean.pyo
-rw-r--r--.  1 root root  5709 Jun  6 23:24 cli.py
-rw-r--r--.  2 root root  7039 Jun  6 23:24 cli.pyc
-rw-r--r--.  2 root root  7039 Jun  6 23:24 cli.pyo
drwxr-xr-x.  7 root root  4096 Jul 31 15:26 common
-rw-r--r--.  1 root root  2937 Jun  6 23:24 config.py
-rw-r--r--.  2 root root  2562 Jun  6 23:24 config.pyc
-rw-r--r--.  2 root root  2562 Jun  6 23:24 config.pyo
-drwxr-xr-x. 14 root root  4096 Jul 30 14:47 contrib
-rw-r--r--.  1 root root  5246 Jun  6 23:24 controllers.py
-rw-r--r--.  2 root root  5433 Jun  6 23:24 controllers.pyc
-rw-r--r--.  2 root root  5433 Jun  6 23:24 controllers.pyo
drwxr-xr-x.  3 root root  4096 Jul 30 14:47 credential
-rw-r--r--.  1 root root 11220 Jun  6 23:24 exception.py
-rw-r--r--.  2 root root 16711 Jun  6 23:24 exception.pyc
-rw-r--r--.  2 root root 16711 Jun  6 23:24 exception.pyo
-drwxr-xr-x.  3 root root  4096 Jul 30 14:47 identity
-rw-r--r--.  1 root root     0 Jun  6 23:24 __init__.py
-rw-r---r--.  2 root root   140 Jun  6 23:24 __init__.pyc
-rw-r--r--.  2 root root   140 Jun  6 23:24 __init__.pyo
drwxr-xr-x. 68 root root  4096 Jul 30 14:47 locale
drwxr-xr-x.  2 root root  4096 Jul 30 14:47 middleware
-rw-r--r--.  1 root root 11122 Jun  6 23:24 notifications.py
-rw-r--r--.  2 root root 11002 Jun  6 23:24 notifications.pyc
-rw-r--r--.  2 root root 11002 Jun  6 23:24 notifications.pyo
drwxr-xr-x.  3 root root  4096 Jul 30 14:47 openstack
drwxr-xr-x.  3 root root  4096 Jul 30 14:47 policy
-rw-r--r--.  1 root root  2704 Jun  6 23:24 routers.py
-rw-r--r--.  2 root root  3372 Jun  6 23:24 routers.pyc
-rw-r--r--.  2 root root  3372 Jun  6 23:24 routers.pyo
 -rw-r--r--.  1 root root  4447 Jun  6 23:24 service.py
-rw-r--r--.  2 root root  4314 Jun  6 23:24 service.pyc
-rw-r--r--.  2 root root  4314 Jun  6 23:24 service.pyo
drwxr-xr-x.  5 root root 12288 Jul 30 14:47 tests
drwxr-xr-x.  4 root root  4096 Jul 30 14:47 token
drwxr-xr-x.  3 root root  4096 Jul 30 14:47 trust
This is the Common Direcrtory:
-rw-r--r--. 1 root root  3947 Jun  6 23:24 authorization.py
-rw-r--r--. 2 root root  3130 Jun  6 23:24 authorization.pyc
-rw-r--r--. 2 root root  3130 Jun  6 23:24 authorization.pyo
-rw-r--r--. 1 root root 13127 Jun  6 23:24 base64utils.py
-rw-r--r--. 2 root root 13943 Jun  6 23:24 base64utils.pyc
-rw-r--r--. 2 root root 13943 Jun  6 23:24 base64utils.pyo
drwxr-xr-x. 3 root root  4096 Jul 30 14:47 cache
-rw-r--r--. 1 root root 40275 Jun  6 23:24 config.py
-rw-r--r--. 2 root root 27711 Jun  6 23:24 config.pyc
-rw-r--r--. 2 root root 27711 Jun  6 23:24 config.pyo
-rw-r--r--. 1 root root 26944 Jun  6 23:24 controller.py
-rw-r--r--. 2 root root 22362 Jun  6 23:24 controller.pyc
-rw-r--r--. 2 root root 22362 Jun  6 23:24 controller.pyo
-rw-rw-r--. 1 root root 10620 Jun  5 21:33 dependency.py
-rw-r--r--. 1 root root  9281 Jul 31 15:26 dependency.pyc
-rw-r--r--. 1 root root  9281 Jun  6 23:24 dependency.pyo
-rw-r--r--. 1 root root  3222 Jun  6 23:24 driver_hints.py
-rw-r--r--. 2 root root  3256 Jun  6 23:24 driver_hints.pyc
-rw-r--r--. 2 root root  3256 Jun  6 23:24 driver_hints.pyo
drwxr-xr-x. 2 root root  4096 Jul 30 14:47 environment
-rw-r--r--. 1 root root  1652 Jun  6 23:24 extension.py
-rw-r--r--. 2 root root  1413 Jun  6 23:24 extension.pyc
-rw-r--r--. 2 root root  1413 Jun  6 23:24 extension.pyo
-rw-r--r--. 1 root root     0 Jun  6 23:24 __init__.py
-rw-r--r--. 2 root root   147 Jun  6 23:24 __init__.pyc

-rw-r--r--. 2 root root   147 Jun  6 23:24 __init__.pyo
drwxr-xr-x. 3 root root  4096 Jul 30 14:47 kvs
drwxr-xr-x. 2 root root  4096 Jul 30 14:47 ldap
-rw-r--r--. 1 root root  3009 Jun  6 23:24 manager.py
-rw-r--r--. 2 root root  3371 Jun  6 23:24 manager.pyc
-rw-r--r--. 2 root root  3371 Jun  6 23:24 manager.pyo
-rw-r--r--. 1 root root  3286 Jun  6 23:24 models.py
-rw-r--r--. 2 root root  4968 Jun  6 23:24 models.pyc
-rw-r--r--. 2 root root  4968 Jun  6 23:24 models.pyo
-rw-r--r--. 1 root root 11216 Jun  6 23:24 openssl.py
-rw-r--r--. 2 root root  9443 Jun  6 23:24 openssl.pyc
-rw-r--r--. 2 root root  9443 Jun  6 23:24 openssl.pyo
-rw-r--r--. 1 root root 17875 Jun  6 23:24 pemutils.py
-rw-r--r--. 2 root root 16634 Jun  6 23:24 pemutils.pyc
-rw-r--r--. 2 root root 16634 Jun  6 23:24 pemutils.pyo
-rw-r--r--. 1 root root  2004 Jun  6 23:24 router.py
-rw-r--r--. 2 root root  1515 Jun  6 23:24 router.pyc
-rw-r--r--. 2 root root  1515 Jun  6 23:24 router.pyo
-rw-r--r--. 1 root root 13064 Jun  6 23:24 serializer.py
-rw-r--r--. 1 root root 10878 Jun  6 23:24 serializer.pyc
-rw-r--r--. 1 root root 10753 Jun  6 23:25 serializer.pyo
drwxr-xr-x. 3 root root  4096 Jul 30 14:47 sql
-rw-r--r--. 1 root root 17437 Jun  6 23:24 utils.py
-rw-r--r--. 2 root root 18451 Jun  6 23:24 utils.pyc
-rw-r--r--. 2 root root 18451 Jun  6 23:24 utils.pyo
-rw-r--r--. 1 root root 22692 Jun  6 23:24 wsgi.py
-rw-r--r--. 2 root root 23135 Jun  6 23:24 wsgi.pyc
-rw-r--r--. 2 root root 23135 Jun  6 23:24 wsgi.pyo

Full path is: SERVER IP/cgi-bin/keystone/main

keystone.wsgi in the cgi-bin/keystone folder

   import logging
import os

from paste import deploy

from keystone.openstack.common import gettextutils
# 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()

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()

This is my first time playing with keystone and i may be doing it completely wrong.

Any help at all here would be amazing! I am at a complete loss! Cheers, Leigh

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

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:24 clean.pyo
-rw-r--r--.  1 root root  5709 Jun  6 23:24 cli.py
-rw-r--r--.  2 root root  7039 Jun  6 23:24 cli.pyc
-rw-r--r--.  2 root root  7039 Jun  6 23:24 cli.pyo
drwxr-xr-x.  7 root root  4096 Jul 31 15:26 common
-rw-r--r--.  1 root root  2937 Jun  6 23:24 config.py
-rw-r--r--.  2 root root  2562 Jun  6 23:24 config.pyc
-rw-r--r--.  2 root root  2562 Jun  6 23:24 config.pyo
-drwxr-xr-x. 14 root root  4096 Jul 30 14:47 contrib
-rw-r--r--.  1 root root  5246 Jun  6 23:24 controllers.py
-rw-r--r--.  2 root root  5433 Jun  6 23:24 controllers.pyc
-rw-r--r--.  2 root root  5433 Jun  6 23:24 controllers.pyo
drwxr-xr-x.  3 root root  4096 Jul 30 14:47 credential
-rw-r--r--.  1 root root 11220 Jun  6 23:24 exception.py
-rw-r--r--.  2 root root 16711 Jun  6 23:24 exception.pyc
-rw-r--r--.  2 root root 16711 Jun  6 23:24 exception.pyo
-drwxr-xr-x.  3 root root  4096 Jul 30 14:47 identity
-rw-r--r--.  1 root root     0 Jun  6 23:24 __init__.py
-rw-r---r--.  2 root root   140 Jun  6 23:24 __init__.pyc
-rw-r--r--.  2 root root   140 Jun  6 23:24 __init__.pyo
drwxr-xr-x. 68 root root  4096 Jul 30 14:47 locale
drwxr-xr-x.  2 root root  4096 Jul 30 14:47 middleware
-rw-r--r--.  1 root root 11122 Jun  6 23:24 notifications.py
-rw-r--r--.  2 root root 11002 Jun  6 23:24 notifications.pyc
-rw-r--r--.  2 root root 11002 Jun  6 23:24 notifications.pyo
drwxr-xr-x.  3 root root  4096 Jul 30 14:47 openstack
drwxr-xr-x.  3 root root  4096 Jul 30 14:47 policy
-rw-r--r--.  1 root root  2704 Jun  6 23:24 routers.py
-rw-r--r--.  2 root root  3372 Jun  6 23:24 routers.pyc
-rw-r--r--.  2 root root  3372 Jun  6 23:24 routers.pyo
 -rw-r--r--.  1 root root  4447 Jun  6 23:24 service.py
-rw-r--r--.  2 root root  4314 Jun  6 23:24 service.pyc
-rw-r--r--.  2 root root  4314 Jun  6 23:24 service.pyo
drwxr-xr-x.  5 root root 12288 Jul 30 14:47 tests
drwxr-xr-x.  4 root root  4096 Jul 30 14:47 token
drwxr-xr-x.  3 root root  4096 Jul 30 14:47 trust
This is the Common Direcrtory:
-rw-r--r--. 1 root root  3947 Jun  6 23:24 authorization.py
-rw-r--r--. 2 root root  3130 Jun  6 23:24 authorization.pyc
-rw-r--r--. 2 root root  3130 Jun  6 23:24 authorization.pyo
-rw-r--r--. 1 root root 13127 Jun  6 23:24 base64utils.py
-rw-r--r--. 2 root root 13943 Jun  6 23:24 base64utils.pyc
-rw-r--r--. 2 root root 13943 Jun  6 23:24 base64utils.pyo
drwxr-xr-x. 3 root root  4096 Jul 30 14:47 cache
-rw-r--r--. 1 root root 40275 Jun  6 23:24 config.py
-rw-r--r--. 2 root root 27711 Jun  6 23:24 config.pyc
-rw-r--r--. 2 root root 27711 Jun  6 23:24 config.pyo
-rw-r--r--. 1 root root 26944 Jun  6 23:24 controller.py
-rw-r--r--. 2 root root 22362 Jun  6 23:24 controller.pyc
-rw-r--r--. 2 root root 22362 Jun  6 23:24 controller.pyo
-rw-rw-r--. 1 root root 10620 Jun  5 21:33 dependency.py
-rw-r--r--. 1 root root  9281 Jul 31 15:26 dependency.pyc
-rw-r--r--. 1 root root  9281 Jun  6 23:24 dependency.pyo
-rw-r--r--. 1 root root  3222 Jun  6 23:24 driver_hints.py
-rw-r--r--. 2 root root  3256 Jun  6 23:24 driver_hints.pyc
-rw-r--r--. 2 root root  3256 Jun  6 23:24 driver_hints.pyo
drwxr-xr-x. 2 root root  4096 Jul 30 14:47 environment
-rw-r--r--. 1 root root  1652 Jun  6 23:24 extension.py
-rw-r--r--. 2 root root  1413 Jun  6 23:24 extension.pyc
-rw-r--r--. 2 root root  1413 Jun  6 23:24 extension.pyo
-rw-r--r--. 1 root root     0 Jun  6 23:24 __init__.py
-rw-r--r--. 2 root root   147 Jun  6 23:24 __init__.pyc

-rw-r--r--. 2 root root   147 Jun  6 23:24 __init__.pyo
drwxr-xr-x. 3 root root  4096 Jul 30 14:47 kvs
drwxr-xr-x. 2 root root  4096 Jul 30 14:47 ldap
-rw-r--r--. 1 root root  3009 Jun  6 23:24 manager.py
-rw-r--r--. 2 root root  3371 Jun  6 23:24 manager.pyc
-rw-r--r--. 2 root root  3371 Jun  6 23:24 manager.pyo
-rw-r--r--. 1 root root  3286 Jun  6 23:24 models.py
-rw-r--r--. 2 root root  4968 Jun  6 23:24 models.pyc
-rw-r--r--. 2 root root  4968 Jun  6 23:24 models.pyo
-rw-r--r--. 1 root root 11216 Jun  6 23:24 openssl.py
-rw-r--r--. 2 root root  9443 Jun  6 23:24 openssl.pyc
-rw-r--r--. 2 root root  9443 Jun  6 23:24 openssl.pyo
-rw-r--r--. 1 root root 17875 Jun  6 23:24 pemutils.py
-rw-r--r--. 2 root root 16634 Jun  6 23:24 pemutils.pyc
-rw-r--r--. 2 root root 16634 Jun  6 23:24 pemutils.pyo
-rw-r--r--. 1 root root  2004 Jun  6 23:24 router.py
-rw-r--r--. 2 root root  1515 Jun  6 23:24 router.pyc
-rw-r--r--. 2 root root  1515 Jun  6 23:24 router.pyo
-rw-r--r--. 1 root root 13064 Jun  6 23:24 serializer.py
-rw-r--r--. 1 root root 10878 Jun  6 23:24 serializer.pyc
-rw-r--r--. 1 root root 10753 Jun  6 23:25 serializer.pyo
drwxr-xr-x. 3 root root  4096 Jul 30 14:47 sql
-rw-r--r--. 1 root root 17437 Jun  6 23:24 utils.py
-rw-r--r--. 2 root root 18451 Jun  6 23:24 utils.pyc
-rw-r--r--. 2 root root 18451 Jun  6 23:24 utils.pyo
-rw-r--r--. 1 root root 22692 Jun  6 23:24 wsgi.py
-rw-r--r--. 2 root root 23135 Jun  6 23:24 wsgi.pyc
-rw-r--r--. 2 root root 23135 Jun  6 23:24 wsgi.pyo

Full path is: SERVER IP/cgi-bin/keystone/main

keystone.wsgi in the cgi-bin/keystone folder

   import logging
import os

from paste import deploy

from keystone.openstack.common import gettextutils
# 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()

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()

Contents of /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>

This is my first time playing with keystone and i may be doing it completely wrong.

Any help at all here would be amazing! I am at a complete loss! Cheers, Leigh