Custom Search

Sunday, May 5, 2013

Recoverable error Unable to communicate with identity service: coercing to Unicode: need string or buffer, NoneType found

Error Log From Horizon
----------------------------------------

Recoverable error: Unable to communicate with identity service: {"error": {"message": "coercing to Unicode: need string or buffer, NoneType found", "code": 400, "title": "Bad Request"}}. (HTTP 400)

Error Log From Keystone
------------------------------------------

return os.stat(filename).st_mtime
TypeError: coercing to Unicode: need string or buffer, NoneType found

Solution
-------------

1)
###Start Keystone in debug mode and check error
#cd install_dir/keystone
#source .venv/bin/activate
#./bin/Keystone-all --debug

2)
###Copy policy.json to /etc/Keystone/
#cd install_dir/nova
#sudo cp etc/Keystone/policy.json /etc/Keystone/

3)
##Retart Keystone in debug mode and check error
#cd install_dir/Keystone
#source .venv/bin/activate
#./bin/Keystone-all --debug


Complete Error Log from Keystone
---------------------------------------------------------

#./bin/Keystone-all --debug

2013-05-05 00:01:45    DEBUG [keystone.common.wsgi] arg_dict: {}
2013-05-05 00:01:45    DEBUG [keystone.policy.backends.rules] enforce admin_required: {'tenant_id': u'7daefbb63e404763a9081954dacff2a9', 'user_id': u'26fc766cef74414eb9cb0b57d06a0642', u'roles': [u'admin']}
2013-05-05 00:01:45    ERROR [keystone.common.wsgi] coercing to Unicode: need string or buffer, NoneType found
Traceback (most recent call last):
  File "/home/saju/ops_manual/keystone/keystone/common/wsgi.py", line 236, in __call__
    result = method(context, **params)
  File "/home/saju/ops_manual/keystone/keystone/identity/controllers.py", line 41, in get_all_projects
    self.assert_admin(context)
  File "/home/saju/ops_manual/keystone/keystone/common/wsgi.py", line 304, in assert_admin
    self.policy_api.enforce(context, creds, 'admin_required', {})
  File "/home/saju/ops_manual/keystone/keystone/common/manager.py", line 47, in _wrapper
    return f(*args, **kw)
  File "/home/saju/ops_manual/keystone/keystone/policy/backends/rules.py", line 94, in enforce
    enforce(credentials, action, target)
  File "/home/saju/ops_manual/keystone/keystone/policy/backends/rules.py", line 81, in enforce
    init()
  File "/home/saju/ops_manual/keystone/keystone/policy/backends/rules.py", line 55, in init
    reload_func=_set_rules)
  File "/home/saju/ops_manual/keystone/keystone/common/utils.py", line 52, in read_cached_file
    mtime = os.path.getmtime(filename)
  File "/home/saju/ops_manual/keystone/.venv/lib/python2.7/genericpath.py", line 54, in getmtime
    return os.stat(filename).st_mtime
TypeError: coercing to Unicode: need string or buffer, NoneType found
2013-05-05 00:01:45     INFO [access] 127.0.0.1 - - [04/May/2013:18:31:45 +0000] "GET http://localhost:35357/v2.0/tenants HTTP/1.0" 400 121
2013-05-05 00:01:45    DEBUG [eventlet.wsgi.server] 127.0.0.1 - - [05/M

Complete Error Log from Horizon
-------------------------------------------------------

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 

Unauthorized: Unauthorized (HTTP 401)
Traceback (most recent call last):
  File "/home/saju/ops_manual/horizon/openstack_dashboard/usage/base.py", line 112, in get_quotas
    self.quotas = quotas.tenant_quota_usages(self.request)
  File "/home/saju/ops_manual/horizon/horizon/utils/memoized.py", line 33, in __call__
    value = self.func(*args)
  File "/home/saju/ops_manual/horizon/openstack_dashboard/usage/quotas.py", line 116, in tenant_quota_usages
    disabled_quotas=disabled_quotas):
  File "/home/saju/ops_manual/horizon/openstack_dashboard/usage/quotas.py", line 99, in get_tenant_quota_data
    tenant_id=tenant_id)
  File "/home/saju/ops_manual/horizon/openstack_dashboard/usage/quotas.py", line 76, in _get_quota_data
    quotasets.append(getattr(nova, method_name)(request, tenant_id))
  File "/home/saju/ops_manual/horizon/openstack_dashboard/api/nova.py", line 470, in tenant_quota_get
    return QuotaSet(novaclient(request).quotas.get(tenant_id))
  File "/home/saju/ops_manual/horizon/.venv/local/lib/python2.7/site-packages/novaclient/v1_1/quotas.py", line 37, in get
    return self._get("/os-quota-sets/%s" % (tenant_id), "quota_set")
  File "/home/saju/ops_manual/horizon/.venv/local/lib/python2.7/site-packages/novaclient/base.py", line 140, in _get
    _resp, body = self.api.client.get(url)
  File "/home/saju/ops_manual/horizon/.venv/local/lib/python2.7/site-packages/novaclient/client.py", line 230, in get
    return self._cs_request(url, 'GET', **kwargs)
  File "/home/saju/ops_manual/horizon/.venv/local/lib/python2.7/site-packages/novaclient/client.py", line 227, in _cs_request
    raise e
Unauthorized: Unauthorized (HTTP 401)
Creating a new keystoneclient connection to http://localhost:35357/v2.0.
Request returned failure status: 400
Recoverable error: Unable to communicate with identity service: {"error": {"message": "coercing to Unicode: need string or buffer, NoneType found", "code": 400, "title": "Bad Request"}}. (HTTP 400)
[04/May/2013 18:28:56] "GET /admin/ HTTP/1.1" 200 8435
[04/May/2013 18:28:56] "GET /i18n/js/horizon/ HTTP/1.1" 200 2158
[04/May/2013 18:28:56] "GET /static/dashboard/img/logo.png HTTP/1.1" 200 5093
[04/May/2013 18:28:57] "GET /static/bootstrap/img/glyphicons-halflings.png HTTP/1.1" 200 4352
[04/May/2013 18:28:57] "GET /static/dashboard/fonts/Anivers_Regular-webfont.woff HTTP/1.1" 200 29432

No comments:

Post a Comment