Ask Your Question
0 error on centos 6.3 running Keystone 2014.1.1

asked 2014-08-01 04:27:24 -0500

Leigh507 gravatar image

updated 2014-08-04 03:29:03 -0500

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

Now when trying to access the main (hard linked to through a browser I get the following error:

[error] [client] (8)Exec format error: exec of '/var/www/cgi-bin/main' failed

So this led me run the keystone file on it's own:


Which throws the following error:

Traceback (most recent call last):
  File "", line 31, in <module>
    from keystone.common import dependency
  File "/usr/share/keystone/", line 31, in <module>
   from keystone.common import dependency
ImportError: No module named common

Here is the 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
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT

    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.

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



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
application = deploy.loadapp('config:%s' % config.find_paste_config(),


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
 -rw-r--r--.  2 root root  3015 Jun  6 23:24 clean.pyc
-rw-r--r--.  2 root root  3015 Jun  6 23 ...
edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted

answered 2014-08-01 10:39:35 -0500

You can't run as a standalone program. Can you copy paste your keystone mod wsgi file from sites-enabled directory in apache.

Also let us know the exact url ( full path) you are using to access keystone

edit flag offensive delete link more


Sorry keystone wsgi conf is different file, which will have virtual host settings for apache. Can you paste first few lines -- especially WSScriptAlias line

Haneef Ali gravatar imageHaneef Ali ( 2014-08-01 16:59:55 -0500 )edit

Edit your question to make it more clear, adding details as you go. Don't use comments to paste large text, they make things harder to read.

smaffulli gravatar imagesmaffulli ( 2014-08-01 17:55:16 -0500 )edit

@haneef: Correct WSGI file added at the end of the post @smaffulli: Apologies I will add to the end of the post in future.

Leigh507 gravatar imageLeigh507 ( 2014-08-04 03:30:19 -0500 )edit

Try accesing it as SERVER IP/keystone/main

Haneef Ali gravatar imageHaneef Ali ( 2014-08-04 10:42:30 -0500 )edit

Hi Haneef,

I tired this and it gave me some SSL errors. After fixing these I am back to the original problem of not being able to load dependency.

Leigh507 gravatar imageLeigh507 ( 2014-08-05 07:05:14 -0500 )edit

answered 2014-08-14 03:46:25 -0500

Leigh507 gravatar image

Hi all,

I have finally managed to resolve the issue!

The error shown above was a bit of a red herring. It turns out the SQLAlchemy was having issues importing exceptions. In version 0.8 you cannot import exceptions it has to be exc.

I made this change in /usr/lib/python2.6/site-packages/migrate/versioning/ and all seems to be working fine now!

Thank you for all the help.


edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools


Asked: 2014-08-01 04:27:24 -0500

Seen: 337 times

Last updated: Aug 14 '14