What's the requirements to get keystone-all to work?

Asked by Anne Gentle

I installed keystone today on Ubuntu 12.04 using the daily build of ubuntu server (64). I modified my keystone.conf so that a mysql database serves as backend, and restarted with sudo service keystone restart. However I realized that your docs say use "keystone-all" but when I do it, here's what I get:

nova@ubuntu:~$ keystone-all
Traceback (most recent call last):
  File "/usr/bin/keystone-all", line 63, in <module>
    options = deploy.appconfig('config:%s' % CONF.config_file[0])
IndexError: list index out of range

Any other config steps I'm missing to get it to work correctly? Here's my keystone.conf file:

[DEFAULT]
bind_host = 0.0.0.0
public_port = 5000
admin_port = 35357
admin_token = 012345SECRET99TOKEN012345
compute_port = 8774
verbose = True
debug = True
log_config = /etc/keystone/logging.conf

# ================= Syslog Options ============================
# Send logs to syslog (/dev/log) instead of to file specified
# by `log-file`
use_syslog = False

# Facility to use. If unset defaults to LOG_USER.
# syslog_log_facility = LOG_LOCAL0

[sql]
connection = mysql://keystone:yourpassword@192.168.127.143/keystone
idle_timeout = 200
min_pool_size = 5
max_pool_size = 10
pool_timeout = 200

[ldap]
#url = ldap://localhost
#tree_dn = dc=example,dc=com
#user_tree_dn = ou=Users,dc=example,dc=com
#role_tree_dn = ou=Roles,dc=example,dc=com
#tenant_tree_dn = ou=Groups,dc=example,dc=com
#user = dc=Manager,dc=example,dc=com
#password = freeipa4all
#suffix = cn=example,cn=com

[identity]
driver = keystone.identity.backends.sql.Identity

[catalog]
driver = keystone.catalog.backends.sql.Catalog

[token]
driver = keystone.token.backends.sql.Token

# Amount of time a token should remain valid (in seconds)
expiration = 86400

[policy]
driver = keystone.policy.backends.rules.Policy

[ec2]
driver = keystone.contrib.ec2.backends.sql.Ec2

[filter:debug]
paste.filter_factory = keystone.common.wsgi:Debug.factory

[filter:token_auth]
paste.filter_factory = keystone.middleware:TokenAuthMiddleware.factory

[filter:admin_token_auth]
paste.filter_factory = keystone.middleware:AdminTokenAuthMiddleware.factory

[filter:xml_body]
paste.filter_factory = keystone.middleware:XmlBodyMiddleware.factory

[filter:json_body]
paste.filter_factory = keystone.middleware:JsonBodyMiddleware.factory

[filter:crud_extension]
paste.filter_factory = keystone.contrib.admin_crud:CrudExtension.factory

[filter:ec2_extension]
paste.filter_factory = keystone.contrib.ec2:Ec2Extension.factory

[app:public_service]
paste.app_factory = keystone.service:public_app_factory

[app:admin_service]
paste.app_factory = keystone.service:admin_app_factory

[pipeline:public_api]
pipeline = token_auth admin_token_auth xml_body json_body debug ec2_extension public_service

[pipeline:admin_api]
pipeline = token_auth admin_token_auth xml_body json_body debug ec2_extension crud_extension admin_service

[app:public_version_service]
paste.app_factory = keystone.service:public_version_app_factory

[app:admin_version_service]
paste.app_factory = keystone.service:admin_version_app_factory

[pipeline:public_version_api]
pipeline = xml_body public_version_service

[pipeline:admin_version_api]
pipeline = xml_body admin_version_service

[composite:main]
use = egg:Paste#urlmap
/v2.0 = public_api
/ = public_version_api

[composite:admin]
use = egg:Paste#urlmap
/v2.0 = admin_api
/ = admin_version_api

Question information

Language:
English Edit question
Status:
Answered
For:
OpenStack Identity (keystone) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Anne Gentle (annegentle) said :
#1

More info, when I run "sudo keystone-all" I get this instead:

Traceback (most recent call last):
  File "/usr/bin/keystone-all", line 74, in <module>
    serve(*servers)
  File "/usr/bin/keystone-all", line 38, in serve
    server.start()
  File "/usr/lib/python2.7/dist-packages/keystone/common/wsgi.py", line 68, in start
    socket = eventlet.listen((self.host, self.port), backlog=backlog)
  File "/usr/lib/python2.7/dist-packages/eventlet/convenience.py", line 38, in listen
    sock.bind(addr)
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 98] Address already in use

Revision history for this message
Yaguang Tang (heut2008) said :
#2

try to add --config-file /your/path/to/keystone.conf with keystone-all

Revision history for this message
smallma (s-rain) said :
#3

Do you install keystone by source code? It seems that it does not automatically copy all of the confs to /etc/keystone/. you could copy conf to /etc/keystone/, and set keystone up again.

Rain.

Revision history for this message
Anne Gentle (annegentle) said :
#4

Hm, I did this:
sudo keystone-all --config-file /etc/keystone/keystone.conf

And now I get this:

Traceback (most recent call last):
  File "/usr/bin/keystone-all", line 74, in <module>
    serve(*servers)
  File "/usr/bin/keystone-all", line 38, in serve
    server.start()
  File "/usr/lib/python2.7/dist-packages/keystone/common/wsgi.py", line 68, in start
    socket = eventlet.listen((self.host, self.port), backlog=backlog)
  File "/usr/lib/python2.7/dist-packages/eventlet/convenience.py", line 38, in listen
    sock.bind(addr)
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 98] Address already in use

this is a VM running on my Mac OS. here's what netstat says:

nova@ubuntu:~$ netstat -ntpl
(No info could be read for "-p": geteuid()=1000 but you should be root.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:35357 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:5000 0.0.0.0:* LISTEN -
tcp6 0 0 :::22 :::* LISTEN -

Revision history for this message
smallma (s-rain) said :
#5

you should kill keystone first. please check if keystone is working or not by using "ps -ef | grep keystone". It seems port has been used.

Revision history for this message
Joseph Heck (heckj) said :
#6

Anne - it looks like you've already got a process running on the port it's trying to use (either 5000 or 35357). Did you by chance have a copy of keystone already enabled via package or such? If so, it will have automatically started up - hence the error - it's already running.

Also, the default location on disk (based on the packaging and code) for the configuration file is /etc/keystone/keystone.conf

-joe

Revision history for this message
Seonghoon Moon (moonsh1028) said :
#7

Hi anne. How did you solve 'socket.error: [Errno 98] Address already in use' problem..?

Revision history for this message
Sherif Mballo (cherif-mballo-4) said :
#8

Hi anne! please how do you fix your issue? because i have the same problem. Me too, I use a VM running on my win7 OS.

Thanks!

Sherif

Can you help with this problem?

Provide an answer of your own, or ask Anne Gentle for more information if necessary.

To post a message you must log in.