Ask Your Question
0

Installed keystone from ppa:keystone-core-trunk on natty and no /etc/keystone/keystone.conf file was created

asked 2011-10-10 19:27:30 -0500

p-spencer-davis gravatar image

I used $> sudo apt-add-repository ppa:keystone-core/trunk

to install keystone on a natty server to evaluate nova dashboard, but no configuration files for keystone where created. Starting keystone as a service returns the following in the logs:

/var/log/syslog:Oct 10 15:08:25 csvirt-1 init: keystone main process (2364) terminated with status 1 /var/log/syslog:Oct 10 15:08:25 csvirt-1 init: keystone main process ended, respawning

and attempting to run keystone as root returns:

ERROR: Error loading config /etc/init/keystone.conf: File contains no section headers. file: /etc/init/keystone.conf, line: 1 'description "Keystone API server"\n'

I noticed that /etc/keystone was missing, so I created the directory and touched /etc/keystone/keystone.conf, on the off chance that an empty file was better than no file and got the following error:

ERROR: Error loading config /etc/keystone/keystone.conf: No section 'keystone-legacy-auth' (prefixed by 'app' or 'application' or 'composite' or 'composit' or 'pipeline' or 'filter-app') found in config /etc/keystone/keystone.conf

Where can I find an example keystone.conf for nova integration?

edit retag flag offensive close merge delete

20 answers

Sort by ยป oldest newest most voted
0

answered 2011-11-08 06:23:44 -0500

Sorry Davis for the late update i was out due to personal emergencies

the keystone.conf file configuration has backend configured as sqlalchemy but still i am getting the same error

below is the error for your reference

ERROR: Class keystone.backends.sqlalchemy #For LDAP support cannot be found ('module' object has no attribute 'sqlalchemy #For LDAP support') root : ERROR Class keystone.backends.sqlalchemy #For LDAP support cannot be found ('module' object has no attribute 'sqlalchemy #For LDAP support') Traceback (most recent call last): File "/usr/bin/keystone-manage", line 16, in <module> keystone.manage.main() File "/usr/lib/python2.7/dist-packages/keystone/manage/__init__.py", line 249, in main raise exc ImportError: Class keystone.backends.sqlalchemy #For LDAP support cannot be found ('module' object has no attribute 'sqlalchemy #For LDAP support')

edit flag offensive delete link more
0

answered 2011-10-27 18:27:40 -0500

p-spencer-davis gravatar image

Make sure that the stanza in /etc/passwd for the keystone user looks something like this:

keystone:x:111:65534::/var/lib/keystone:/bin/bash

and that user has write privileges in /var/lib/keystone

Here is my /etc/init/keystone.conf file:

description "Keystone API server" author "Soren Hansen soren@linux2go.dk"

start on (local-filesystems and net-device-up IFACE!=lo) stop on runlevel [016]

respawn

exec su -c "keystone --log-dir=/var/log/keystone --log-file=api.log" keystone

Here is the /etc/keystone/keystone.conf file:

[DEFAULT]

Show more verbose log output (sets INFO log level output)

verbose = False

Show debugging output in logs (sets DEBUG log level output)

debug = False

Which backend store should Keystone use by default.

Default: 'sqlite'

Available choices are 'sqlite' [future will include LDAP, PAM, etc]

default_store = sqlite

Log to this file. Make sure you do not set the same log

file for both the API and registry servers!

log_file = keystone.log

List of backends to be configured

backends = keystone.backends.sqlalchemy #For LDAP support, add: ,keystone.backends.ldap

Dictionary Maps every service to a header.Missing services would get header

X_(SERVICE_NAME) Key => Service Name, Value => Header Name

service-header-mappings = { 'nova' : 'X-Server-Management-Url', 'swift' : 'X-Storage-Url', 'cdn' : 'X-CDN-Management-Url'}

Address to bind the API server

TODO Properties defined within app not available via pipeline.

service_host = 0.0.0.0

Port the bind the API server to

service_port = 5000

Address to bind the Admin API server

admin_host = 0.0.0.0

Port the bind the Admin API server to

admin_port = 5001

#Role that allows to perform admin operations. keystone-admin-role = Admin

#Role that allows to perform service admin operations. keystone-service-admin-role = KeystoneServiceAdmin

[keystone.backends.sqlalchemy]

SQLAlchemy connection string for the reference implementation registry

server. Any valid SQLAlchemy connection string is fine.

See: http://bit.ly/ideIpI

sql_connection = sqlite:///var/lib/keystone/keystone.db backend_entities = ['UserRoleAssociation', 'Endpoints', 'Role', 'Tenant', 'User', 'Credentials', 'EndpointTemplates', 'Token', 'Service']

Period in seconds after which SQLAlchemy should reestablish its connection

to the database.

sql_idle_timeout = 30

[pipeline:admin] pipeline = urlrewritefilter admin_api

[pipeline:keystone-legacy-auth] pipeline = urlrewritefilter legacy_auth RAX-KEY-extension service_api

[app:service_api] paste.app_factory = keystone.server:service_app_factory

[app:admin_api] paste.app_factory = keystone.server:admin_app_factory

[filter:urlrewritefilter] paste.filter_factory = keystone.middleware.url:filter_factory

[filter:legacy_auth] paste.filter_factory = keystone.frontends.legacy_token_auth:filter_factory

[filter:RAX-KEY-extension] paste.filter_factory = keystone.contrib.extensions.service.raxkey.frontend:filter_factory

edit flag offensive delete link more
0

answered 2011-10-27 00:12:38 -0500

I'm really confused with the solution that has been provided above, to begin with after following the steps before the comments the error I get afterwards is. To clarify I'm running on Ubuntu 11.04.

ERROR: Error loading config /etc/keystone/keystone.conf: File contains no section headers. file: /etc/keystone/keystone.conf, line: 1 'how more verbose log output (sets INFO log level output)\n'

As for the following comment guide, it is mentioned that /etc/init/keystone.conf is appended to or overwritten by that given in the github. I have tried both and still receive the above error. Upon deleting /etc/keystone/keystone.conf I get the following error. (the text is different depending on the append or overwrite, but I don't think that matters)

ERROR: Error loading config /etc/init/keystone.conf: File contains no section headers. file: /etc/init/keystone.conf, line: 1 'how more verbose log output (sets INFO log level output)\n'

Can someone clarify or give me some insight on something I'm missing? Thanks

edit flag offensive delete link more
0

answered 2011-10-20 16:12:20 -0500

p-spencer-davis gravatar image

Sorry it's taken a bit for me to get back to you, you want to edit the following lines in /etc/keystone/keystone.conf

from:

List of backends to be configured

backends = keystone.backends.sqlalchemy,keystone.backends.ldap #For LDAP support, add: ,keystone.backends.ldap

to

List of backends to be configured

backends = keystone.backends.sqlalchemy #For LDAP support, add: ,keystone.backends.ldap

edit flag offensive delete link more
0

answered 2011-10-15 22:18:27 -0500

p-spencer-davis gravatar image

You need to have a keystone.conf file in /etc/init/ and a seperate, different one in /etc/keystone/ . Is the keystone executable in the system path? On Oct 15, 2011 2:36 PM, "apurva" question173861@answers.launchpad.net wrote:

Your question #173861 on Keystone changed: https://answers.launchpad.net/keystone/+question/173861 (https://answers.launchpad.net/keyston...)

apurva posted a new comment: After moving keystone.conf file from /etc/init to /etc and removing the line prasing errors i am getting the below error while trying to generate the token also still while trying to start keystone service i am getting unknown job messege.

root@cc:~# keystone-manage token add 999888777666 admin admin 2015-02-05T00:00 ERROR: Class keystone.backends.sqlalchemy #For LDAP support cannot be found ('module' object has no attribute 'sqlalchemy #For LDAP support') root : ERROR Class keystone.backends.sqlalchemy #For LDAP support cannot be found ('module' object has no attribute 'sqlalchemy #For LDAP support') Traceback (most recent call last): File "/usr/bin/keystone-manage", line 16, in <module> keystone.manage.main() File "/usr/lib/python2.7/dist-packages/keystone/manage/__init__.py", line 249, in main raise exc ImportError: Class keystone.backends.sqlalchemy #For LDAP support cannot be found ('module' object has no attribute 'sqlalchemy #For LDAP support') root@cc:~# vi /etc/keystone.conf root@cc:~# service keystone start


You received this question notification because you asked the question.

edit flag offensive delete link more
0

answered 2011-10-15 18:34:21 -0500

After moving keystone.conf file from /etc/init to /etc and removing the line prasing errors i am getting the below error while trying to generate the token also still while trying to start keystone service i am getting unknown job messege.

root@cc:~# keystone-manage token add 999888777666 admin admin 2015-02-05T00:00 ERROR: Class keystone.backends.sqlalchemy #For LDAP support cannot be found ('module' object has no attribute 'sqlalchemy #For LDAP support') root : ERROR Class keystone.backends.sqlalchemy #For LDAP support cannot be found ('module' object has no attribute 'sqlalchemy #For LDAP support') Traceback (most recent call last): File "/usr/bin/keystone-manage", line 16, in <module> keystone.manage.main() File "/usr/lib/python2.7/dist-packages/keystone/manage/__init__.py", line 249, in main raise exc ImportError: Class keystone.backends.sqlalchemy #For LDAP support cannot be found ('module' object has no attribute 'sqlalchemy #For LDAP support') root@cc:~# vi /etc/keystone.conf root@cc:~# service keystone start

edit flag offensive delete link more
0

answered 2011-10-15 17:42:23 -0500

yes

edit flag offensive delete link more
0

answered 2011-10-15 15:31:47 -0500

p-spencer-davis gravatar image

Is there a keystone file in /etc/init ? On Oct 15, 2011 5:01 AM, "apurva" question173861@answers.launchpad.net wrote:

Your question #173861 on Keystone changed: https://answers.launchpad.net/keystone/+question/173861 (https://answers.launchpad.net/keyston...)

apurva posted a new comment: sorry for the previos post that is other error which i am getting for euca2ools by mistake i posted that alos ... for Keystone i am getting the below error when i an trying to start the service

root@cc:/etc/init# service keystone restart restart: Unknown job: keystone


You received this question notification because you asked the question.

edit flag offensive delete link more
0

answered 2011-10-15 08:59:28 -0500

sorry for the previos post that is other error which i am getting for euca2ools by mistake i posted that alos ... for Keystone i am getting the below error when i an trying to start the service

root@cc:/etc/init# service keystone restart restart: Unknown job: keystone

edit flag offensive delete link more
0

answered 2011-10-15 05:59:40 -0500

I am now getting the below error

root@cc:/etc/init# service keystone restart restart: Unknown job: keystone root@cc-ax:/etc/init# euca-authorize -P icmp -t -1:-1 default Traceback (most recent call last): File "/usr/bin/euca-authorize", line 198, in <module> main() File "/usr/bin/euca-authorize", line 141, in main euca_conn = euca.make_connection() File "/usr/lib/python2.7/dist-packages/euca2ools/__init__.py", line 637, in make_connection self.port = int(l[1]) ValueError: invalid literal for int() with base 10: '' root@cc:/etc/init#

edit flag offensive delete link more

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: 2011-10-10 19:27:30 -0500

Seen: 332 times

Last updated: Nov 08 '11