I followed http://docs.openstack.org/essex/openstack-compute/install/yum/content/install-glance.html to get glance installed and configured ,but get erros as follow:
glance --os_username=adminUser --os_password=secretword --os_tenant=openstackDemo --os_auth_url=http://localhost:5000/v2.0 add name="tty-linux-kernel" disk_format=aki container_format=aki < ttylinux-uec-amd64-12.1_2.6.35-22_1-vmlinuz
Uploading image 'tty-linux-kernel'
Failed to add image. Got error:
The request returned 500 Internal Server Error
The response body:
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/eventlet/wsgi.py", line 336, in handle_one_response
result = self.application(self.environ, start_response)
File "/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/dec.py", line 147, in __call__
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/dec.py", line 208, in call_func
return self.func(req, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/glance/common/wsgi.py", line 279, in __call__
response = req.get_response(self.application)
File "/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/request.py", line 1053, in get_response
application, catch_exc_info=False)
File "/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/request.py", line 1022, in call_application
app_iter = application(self.environ, start_response)
File "/usr/lib/python2.6/site-packages/keystone/middleware/auth_token.py", line 176, in __call__
return self.app(env, start_response)
File "/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/dec.py", line 147, in __call__
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/dec.py", line 208, in call_func
return self.func(req, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/glance/common/wsgi.py", line 279, in __call__
response = req.get_response(self.application)
File "/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/request.py", line 1053, in get_response
application, catch_exc_info=False)
File "/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/request.py", line 1022, in call_application
app_iter = application(self.environ, start_response)
File "/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/dec.py", line 159, in __call__
return resp(environ, start_response)
File "/usr/lib/python2.6/site-packages/Routes-1.12.3-py2.6.egg/routes/middleware.py", line 131, in __call__
response = self.app(environ, start_response)
File "/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/dec.py", line 159, in __call__
return resp(environ, start_response)
File "/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/dec.py", line 147, in __call__
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/dec.py", line 208, in call_func
return self.func(req, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/glance/common/wsgi.py", line 477, in __call__
request, **action_args)
File "/usr/lib/python2.6/site-packages/glance/common/wsgi.py", line 494, in dispatch
return method(*args, **kwargs)
File "/usr/lib/python2.6/site-packages/glance/api/v1/images.py", line 603, in create
image_meta = self._reserve(req, image_meta)
File "/usr/lib/python2.6/site-packages/glance/api/v1/images.py", line 315, in _reserve
image_meta = registry.add_image_metadata(req.context, image_meta)
File "/usr/lib/python2.6/site-packages/glance/registry/__init__.py", line 145, in add_image_metadata
return c.add_image(image_meta)
File "/usr/lib/python2.6/site-packages/glance/registry/client.py", line 121, in add_image
res = self.do_request("POST", "/images", body, headers=headers)
File "/usr/lib/python2.6/site-packages/glance/common/client.py", line 58, in wrapped
return func(self, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/glance/common/client.py", line 420, in do_request
headers=headers)
File "/usr/lib/python2.6/site-packages/glance/common/client.py", line 75, in wrapped
return func(self, method, url, body, headers)
File "/usr/lib/python2.6/site-packages/glance/common/client.py", line 557, in _do_request
raise exception.ClientConnectionError(e)
ClientConnectionError: There was an error connecting to a server
Details: [Errno 111] ECONNREFUSED
the /var/log/api.log are as follow:
2012-07-18 02:20:24 15643 INFO [keystone.middleware.auth_token] Starting keystone auth_token middleware
2012-07-18 02:20:24 15643 INFO [eventlet.wsgi.server] Starting single process server
2012-07-18 02:58:51 16310 INFO [keystone.middleware.auth_token] Starting keystone auth_token middleware
2012-07-18 02:58:51 16310 INFO [eventlet.wsgi.server] Starting single process server
2012-07-18 03:14:16 16310 WARNING [keystone.middleware.auth_token] Unable to find authentication token in headers: {'SCRIPT_NAME': '/v1', 'webob.adhoc_attrs': {'response': <Response at 0x20338d0 200 OK>}, 'REQUEST_METHOD': 'GET', 'PATH_INFO': '/images', 'SERVER_PROTOCOL': 'HTTP/1.0', 'QUERY_STRING': 'limit=10', 'eventlet.posthooks': [], 'SERVER_NAME': '127.0.0.1', 'REMOTE_ADDR': '127.0.0.1', 'eventlet.input': <eventlet.wsgi.Input object at 0x2033810>, 'wsgi.url_scheme': 'http', 'api.major_version': 1, 'SERVER_PORT': '9292', 'api.minor_version': 0, 'wsgi.input': <eventlet.wsgi.Input object at 0x2033810>, 'HTTP_HOST': '0.0.0.0:9292', 'wsgi.multithread': True, 'wsgi.version': (1, 0), 'GATEWAY_INTERFACE': 'CGI/1.1', 'wsgi.run_once': False, 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7f2e894e91e0>, 'wsgi.multiprocess': False, 'CONTENT_TYPE': 'text/plain', 'HTTP_ACCEPT_ENCODING': 'identity'}
2012-07-18 03:14:16 16310 INFO [keystone.middleware.auth_token] Invalid user token - rejecting request
2012-07-18 03:14:16 16310 WARNING [keystone.middleware.auth_token] Unable to find authentication token in headers: {'SCRIPT_NAME': '/v1', 'webob.adhoc_attrs': {'response': <Response at 0x2033ed0 200 OK>}, 'REQUEST_METHOD': 'GET', 'PATH_INFO': '/images', 'SERVER_PROTOCOL': 'HTTP/1.0', 'QUERY_STRING': 'limit=10', 'eventlet.posthooks': [], 'SERVER_NAME': '127.0.0.1', 'REMOTE_ADDR': '127.0.0.1', 'eventlet.input': <eventlet.wsgi.Input object at 0x2033f50>, 'wsgi.url_scheme': 'http', 'api.major_version': 1, 'SERVER_PORT': '9292', 'api.minor_version': 0, 'wsgi.input': <eventlet.wsgi.Input object at 0x2033f50>, 'HTTP_HOST': '0.0.0.0:9292', 'wsgi.multithread': True, 'wsgi.version': (1, 0), 'GATEWAY_INTERFACE': 'CGI/1.1', 'wsgi.run_once': False, 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7f2e894e91e0>, 'wsgi.multiprocess': False, 'CONTENT_TYPE': 'text/plain', 'HTTP_ACCEPT_ENCODING': 'identity'}
2012-07-18 03:14:16 16310 INFO [keystone.middleware.auth_token] Invalid user token - rejecting request
2012-07-18 03:19:15 16310 WARNING [keystone.middleware.auth_token] Authorization failed for token 012345SECRET99TOKEN012345
2012-07-18 03:19:15 16310 INFO [keystone.middleware.auth_token] Invalid user token - rejecting request
2012-07-18 03:19:15 16310 WARNING [keystone.middleware.auth_token] Authorization failed for token 012345SECRET99TOKEN012345
2012-07-18 03:19:15 16310 INFO [keystone.middleware.auth_token] Invalid user token - rejecting request
2012-07-18 03:20:27 16310 WARNING [keystone.middleware.auth_token] Authorization failed for token 012345SECRET99TOKEN012345
2012-07-18 03:20:27 16310 INFO [keystone.middleware.auth_token] Invalid user token - rejecting request
2012-07-18 03:20:27 16310 WARNING [keystone.middleware.auth_token] Authorization failed for token 012345SECRET99TOKEN012345
2012-07-18 03:20:27 16310 INFO [keystone.middleware.auth_token] Invalid user token - rejecting request
2012-07-18 03:22:24 16310 WARNING [keystone.middleware.auth_token] Authorization failed for token 012345SECRET99TOKEN012345
2012-07-18 03:22:24 16310 INFO [keystone.middleware.auth_token] Invalid user token - rejecting request
2012-07-18 03:22:24 16310 WARNING [keystone.middleware.auth_token] Authorization failed for token 012345SECRET99TOKEN012345
2012-07-18 03:22:24 16310 INFO [keystone.middleware.auth_token] Invalid user token - rejecting request
2012-07-18 03:27:02 16310 WARNING [keystone.middleware.auth_token] Authorization failed for token ddeb2dadc71541608a6147c45af1adb9
2012-07-18 03:27:02 16310 INFO [keystone.middleware.auth_token] Invalid user token - rejecting request
2012-07-18 03:27:03 16310 WARNING [keystone.middleware.auth_token] Authorization failed for token ddeb2dadc71541608a6147c45af1adb9
2012-07-18 03:27:03 16310 INFO [keystone.middleware.auth_token] Invalid user token - rejecting request
2012-07-18 04:16:09 16310 WARNING [keystone.middleware.auth_token] Authorization failed for token 012345SECRET99TOKEN012345
2012-07-18 04:16:09 16310 INFO [keystone.middleware.auth_token] Invalid user token - rejecting request
2012-07-18 04:16:09 16310 WARNING [keystone.middleware.auth_token] Authorization failed for token 012345SECRET99TOKEN012345
2012-07-18 04:16:09 16310 INFO [keystone.middleware.auth_token] Invalid user token - rejecting request
2012-07-18 04:17:13 16310 WARNING [keystone.middleware.auth_token] Authorization failed for token 012345SECRET99TOKEN012345
2012-07-18 04:17:13 16310 INFO [keystone.middleware.auth_token] Invalid user token - rejecting request
2012-07-18 04:17:13 16310 WARNING [keystone.middleware.auth_token] Authorization failed for token 012345SECRET99TOKEN012345
2012-07-18 04:17:13 16310 INFO [keystone.middleware.auth_token] Invalid user token - rejecting request
The /var/log/registry.log are as follow:
2012-07-16 16:34:14 1231 INFO [glance.registry.db.migration] Upgrading mysql://glance:andy@localhost/glance to version latest
2012-07-16 19:14:17 2812 INFO [glance.registry.db.migration] Upgrading mysql://glance:andy@localhost/glance to version latest
2012-07-18 02:59:49 16332 INFO [glance.registry.db.migration] Upgrading mysql://glance:andy@localhost/glance to version latest
Note: Your image metadata may still be in the registry, but the image's status will likely be 'killed'.
=================================================[100%] 41.5M/s, ETA 0h 0m 0s
I try to get the -A option,but the error as follow:
glance --os_username=adminUser --os_password=secretword --os_tenant=openstackDemo --os_auth_url=http://localhost:5000/v2.0 add name="tty-linux-kernel" disk_format=aki container_format=aki < ttylinux-uec-amd64-12.1_2.6.35-22_1-vmlinuz -A 012345SECRET99TOKEN012345
Uploading image 'tty-linux-kernel'
=================================================[100%] 41.6M/s, ETA 0h 0m 0s
Uploading image 'tty-linux-kernel'
Failed to add image. Got error:
You are not authenticated.
Details: 401 Unauthorized
This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.
Authentication required
Note: Your image metadata may still be in the registry, but the image's status will likely be 'killed'.
=================================================[100%] 41.9M/s, ETA 0h 0m 0s
The /etc/glance/glance-api-past.ini as follow:
# Default minimal pipeline
[pipeline:glance-api]
pipeline = versionnegotiation authtoken context apiv1app
# Use the following pipeline for keystone auth
# i.e. in glance-api.conf:
# [paste_deploy]
# flavor = keystone
#
[pipeline:glance-api-keystone]
pipeline = versionnegotiation authtoken context apiv1app
# Use the following pipeline to enable transparent caching of image files
# i.e. in glance-api.conf:
# [paste_deploy]
# flavor = caching
#
[pipeline:glance-api-caching]
pipeline = versionnegotiation context cache apiv1app
# Use the following pipeline for keystone auth with caching
# i.e. in glance-api.conf:
# [paste_deploy]
# flavor = keystone+caching
#
[pipeline:glance-api-keystone+caching]
pipeline = versionnegotiation authtoken context cache apiv1app
# Use the following pipeline to enable the Image Cache Management API
# i.e. in glance-api.conf:
# [paste_deploy]
# flavor = cachemanagement
#
[pipeline:glance-api-cachemanagement]
pipeline = versionnegotiation context cache cachemanage apiv1app
# Use the following pipeline for keystone auth with cache management
# i.e. in glance-api.conf:
# [paste_deploy]
# flavor = keystone+cachemanagement
#
[pipeline:glance-api-keystone+cachemanagement]
pipeline = versionnegotiation authtoken context cache cachemanage apiv1app
[app:apiv1app]
paste.app_factory = glance.common.wsgi:app_factory
glance.app_factory = glance.api.v1.router:API
[filter:versionnegotiation]
paste.filter_factory = glance.common.wsgi:filter_factory
glance.filter_factory = glance.api.middleware.version_negotiation:VersionNegotiationFilter
[filter:cache]
paste.filter_factory = glance.common.wsgi:filter_factory
glance.filter_factory = glance.api.middleware.cache:CacheFilter
[filter:cachemanage]
paste.filter_factory = glance.common.wsgi:filter_factory
glance.filter_factory = glance.api.middleware.cache_manage:CacheManageFilter
[filter:context]
paste.filter_factory = glance.common.wsgi:filter_factory
glance.filter_factory = glance.common.context:ContextMiddleware
[filter:authtoken]
paste.filter_factory = keystone.middleware.auth_token:filter_factory
service_protocol = http
service_host = 127.0.0.1
service_port = 5000
auth_host = 127.0.0.1
auth_port = 35357
auth_protocol = http
auth_uri = http://127.0.0.1:5000/
admin_tenant_name = service
admin_user = glance
admin_password = glance
[paste_deploy]
flavor = keystone
The /etc/glance/glance-registry-paste.ini as follow:
# Default minimal pipeline
[pipeline:glance-registry]
pipeline = authtoken context registryapp
# Use the following pipeline for keystone auth
# i.e. in glance-registry.conf:
# [paste_deploy]
# flavor = keystone
#
[pipeline:glance-registry-keystone]
pipeline = authtoken context registryapp
[app:registryapp]
paste.app_factory = glance.common.wsgi:app_factory
glance.app_factory = glance.registry.api.v1:API
[filter:context]
context_class = glance.registry.context.RequestContext
paste.filter_factory = glance.common.wsgi:filter_factory
glance.filter_factory = glance.common.context:ContextMiddleware
[filter:authtoken]
paste.filter_factory = keystone.middleware.auth_token:filter_factory
service_protocol = http
service_host = 127.0.0.1
service_port = 5000
auth_host = 127.0.0.1
auth_port = 35357
auth_protocol = http
auth_uri = http://127.0.0.1:5000/
admin_tenant_name = service
admin_user = glance
admin_password = glance
could anyone can help me solve this probelm?