glance安装错误排查1 | 张恒镭的博客

glance安装错误排查1

时间:15-04-20 栏目:openstack 作者:恒镭, 张 评论:0 点击: 2,196 次

执行 glance image-list

报:Invalid OpenStack Identity Credentials
一般情况原因:[keystone_authtoken] 配置问题

如果检查无误,检查selinux 是否关闭:

The SELinux policy is denying access to the directory.
[root@controller0 ~]# glance image-list
报:HTTPInternalServerError (HTTP 500)

查日志:

tail -f /var/log/glance/api.log

2015-04-21 01:38:44.390 2841 INFO glance.registry.client.v1.client [5b333679-d9d9-4a48-a863-7e890bb35048 a052f141d17e4856bb4f6c584d75802e 99ee8994307040dc8e0d1bb33acd5cb6 - - -] Registry client request POST /images raised ServerError

2015-04-21 01:38:44.392 2841 INFO glance.wsgi.server [5b333679-d9d9-4a48-a863-7e890bb35048 a052f141d17e4856bb4f6c584d75802e 99ee8994307040dc8e0d1bb33acd5cb6 - - -] Traceback (most recent call last):

  File "/usr/lib/python2.7/site-packages/eventlet/wsgi.py", line 433, in handle_one_response

    result = self.application(self.environ, start_response)

  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 130, in __call__

    resp = self.call_func(req, *args, **self.kwargs)

  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 195, in call_func

    return self.func(req, *args, **kwargs)

  File "/usr/lib/python2.7/site-packages/glance/common/wsgi.py", line 394, in __call__

    response = req.get_response(self.application)

  File "/usr/lib/python2.7/site-packages/webob/request.py", line 1296, in send

    application, catch_exc_info=False)

  File "/usr/lib/python2.7/site-packages/webob/request.py", line 1260, in call_application

    app_iter = application(self.environ, start_response)

  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 130, in __call__

    resp = self.call_func(req, *args, **self.kwargs)

  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 195, in call_func

    return self.func(req, *args, **kwargs)

  File "/usr/lib/python2.7/site-packages/osprofiler/web.py", line 99, in __call__

    return request.get_response(self.application)

  File "/usr/lib/python2.7/site-packages/webob/request.py", line 1296, in send

    application, catch_exc_info=False)

  File "/usr/lib/python2.7/site-packages/webob/request.py", line 1260, in call_application

    app_iter = application(self.environ, start_response)

  File "/usr/lib/python2.7/site-packages/keystonemiddleware/auth_token.py", line 748, in __call__

    return self._call_app(env, start_response)

  File "/usr/lib/python2.7/site-packages/keystonemiddleware/auth_token.py", line 684, in _call_app

    return self._app(env, _fake_start_response)

  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 130, in __call__

    resp = self.call_func(req, *args, **self.kwargs)

  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 195, in call_func

    return self.func(req, *args, **kwargs)

  File "/usr/lib/python2.7/site-packages/glance/common/wsgi.py", line 394, in __call__

    response = req.get_response(self.application)

  File "/usr/lib/python2.7/site-packages/webob/request.py", line 1296, in send

    application, catch_exc_info=False)

  File "/usr/lib/python2.7/site-packages/webob/request.py", line 1260, in call_application

    app_iter = application(self.environ, start_response)

  File "/usr/lib/python2.7/site-packages/paste/urlmap.py", line 203, in __call__

    return app(environ, start_response)

  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 144, in __call__

    return resp(environ, start_response)

  File "/usr/lib/python2.7/site-packages/routes/middleware.py", line 131, in __call__

    response = self.app(environ, start_response)

  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 144, in __call__

    return resp(environ, start_response)

  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 130, in __call__

    resp = self.call_func(req, *args, **self.kwargs)

  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 195, in call_func

    return self.func(req, *args, **kwargs)

  File "/usr/lib/python2.7/site-packages/glance/common/wsgi.py", line 683, in __call__

    request, **action_args)

  File "/usr/lib/python2.7/site-packages/glance/common/wsgi.py", line 707, in dispatch

    return method(*args, **kwargs)

  File "/usr/lib/python2.7/site-packages/glance/common/utils.py", line 449, in wrapped

    return func(self, req, *args, **kwargs)

  File "/usr/lib/python2.7/site-packages/glance/api/v1/images.py", line 842, in create

    image_meta = self._reserve(req, image_meta)

  File "/usr/lib/python2.7/site-packages/glance/api/v1/images.py", line 547, in _reserve

    image_meta = registry.add_image_metadata(req.context, image_meta)

  File "/usr/lib/python2.7/site-packages/glance/registry/client/v1/api.py", line 161, in add_image_metadata

    return c.add_image(image_meta)

  File "/usr/lib/python2.7/site-packages/glance/registry/client/v1/client.py", line 171, in add_image

    res = self.do_request("POST", "/images", body=body, headers=headers)

  File "/usr/lib/python2.7/site-packages/glance/registry/client/v1/client.py", line 130, in do_request

    'exc_name': exc_name})

  File "/usr/lib/python2.7/site-packages/glance/openstack/common/excutils.py", line 82, in __exit__

    six.reraise(self.type_, self.value, self.tb)

  File "/usr/lib/python2.7/site-packages/glance/registry/client/v1/client.py", line 115, in do_request

    **kwargs)

  File "/usr/lib/python2.7/site-packages/glance/common/client.py", line 68, in wrapped

    return func(self, *args, **kwargs)

  File "/usr/lib/python2.7/site-packages/glance/common/client.py", line 373, in do_request

    headers=copy.deepcopy(headers))

  File "/usr/lib/python2.7/site-packages/glance/common/client.py", line 85, in wrapped

    return func(self, method, url, body, headers)

  File "/usr/lib/python2.7/site-packages/glance/common/client.py", line 531, in _do_request

    raise exception.ServerError()

ServerError: The request returned 500 Internal Server Error.

[root@controller0 ~]# tail /var/log/glance/registry.log
  File "/usr/lib/python2.7/site-packages/oslo/db/sqlalchemy/session.py", line 549, in _test_connection
    return exc_filters.handle_connect_error(engine)
  File "/usr/lib/python2.7/site-packages/oslo/db/sqlalchemy/exc_filters.py", line 351, in handle_connect_error
    handler(ctx)
  File "/usr/lib/python2.7/site-packages/oslo/db/sqlalchemy/exc_filters.py", line 323, in handler
    context.is_disconnect)
  File "/usr/lib/python2.7/site-packages/oslo/db/sqlalchemy/exc_filters.py", line 254, in _raise_operational_errors_directly_filter
    raise operational_error
OperationalError: (OperationalError) (1045, "Access denied for user 'glance'@'localhost' (using password: YES)") None None

明显看到是数据库配置问题 registry 里检查数据库配置

声明: 本文由( 恒镭, 张 )原创编译,转载请保留链接: glance安装错误排查1

glance安装错误排查1:等您坐沙发呢!

发表评论




------====== 本站公告 ======------
欢迎关注我的博客。

其他