Unable to obtain admin token: Unable to communicate with keystone

Asked by Yury on 2012-11-24

1) I'm trying to learn openstack installation step by step, using the 2012.2 releases.
Right now I'm trying to set up the imaging component (glance).
I believe I have the keystone component installed correctly and I have filled the keystone database with the minimal set of records as proposed "in docs, faqs and scripts".

2) In glance, I've modified the *paste.ini files with the pipelines:

pipeline = versionnegotiation authtoken context apiv1app

and with the admin_* lines, like this (identical in both *paste.ini files):

admin_user = glance
admin_tenant_name = service
admin_password = adminpass
admin_token = ADMIN

3) Now, the 'glance --version' works ("2012.2-dev"). So I'm moving to the 'glance index'.
I have obtained the fresh auth token for the 'glance' user. And now, I'm trying this script:

#! /bin/sh
export SERVICE_TOKEN=ADMIN
export SERVICE_ENDPOINT=http://localhost:35357/v2.0
glance \
  --os_username=glance \
  --os_password=adminpass \
  -A 60ada3b599a44545a1f242158df806c8 \
  index

But I'm getting:

Failed to show index. Got error:
The request returned 503 Service Unavilable. This generally occurs on service overload or other transient outage.

And in glance-api debug, I'm getting:

2012-11-24 10:57:33 17143 DEBUG glance.api.middleware.version_negotiation [-] Determining version of request: GET /v1/images Accept: process_request /p/os/image/glance/api/middleware/version_negotiation.py:45
2012-11-24 10:57:33 17143 DEBUG glance.api.middleware.version_negotiation [-] Using url versioning process_request /p/os/image/glance/api/middleware/version_negotiation.py:58
2012-11-24 10:57:33 17143 DEBUG glance.api.middleware.version_negotiation [-] Matched version: v1 process_request /p/os/image/glance/api/middleware/version_negotiation.py:70
2012-11-24 10:57:33 17143 DEBUG glance.api.middleware.version_negotiation [-] new uri /v1/images process_request /p/os/image/glance/api/middleware/version_negotiation.py:71
2012-11-24 10:57:33 17143 ERROR keystone.middleware.auth_token [-] HTTP connection exception: 'NoneType' object has no attribute 'encode'
2012-11-24 10:57:33 17143 CRITICAL keystone.middleware.auth_token [-] Unable to obtain admin token: Unable to communicate with keystone

What am I doing wrong?

Question information

Language:
English Edit question
Status:
Solved
For:
Glance Edit question
Assignee:
No assignee Edit question
Solved by:
Yury
Solved:
2012-11-24
Last query:
2012-11-24
Last reply:
Yury (yury+t) said : #3

The key to solution was to run glance-manage db_sync beforehand.
"Install and Deploy manual" doesn't stress this well enough.