[Openstack] Keystone: No handlers could be found

Duan, Li-Gong (Gary@BCS-HST-SSTL) li-gong.duan at hp.com
Wed Oct 30 06:01:51 UTC 2013


Hi Hugo,

Thank you so much for help investigating this issue.

Now I am able to manage to execute ¡°keystone user-role-add¡± successfully.

---------------
root at ubuntu:/var/log# keystone user-role-add --user d1877fedeafa4672b332d4698f894d94 --tenant_id 22bce9d51bd34fd3a74baedb610f77c9 --role  ea4957e6be0d40658a5384015873fbe0
---------------

The reason of my previous error is because of incorrect parameters. we need specify user/role as USER-ID/ROLE-ID.
while I entered username and role name.

----------------------------
root at ubuntu:/etc/keystone# dpkg -l | grep keystone
ii  keystone                          2012.1.3+stable-20130423-f48dd0fc-0ubuntu1.1 OpenStack identity service - Daemons
ii  python-keystone                   2012.1.3+stable-20130423-f48dd0fc-0ubuntu1.1 OpenStack identity service - Python library
ii  python-keystoneclient             2012.1-0ubuntu1                              Client libary for Openstack Keystone API
----------------------------

Thanks a lot again.

Regards,
Gary


From: Kuo Hugo [mailto:tonytkdk at gmail.com]
Sent: Tuesday, October 29, 2013 6:05 PM
To: Dheerendra
Cc: Duan, Li-Gong (Gary at BCS-HST-SSTL); Openstack at lists.openstack.org
Subject: Re: [Openstack] Keystone: No handlers could be found

Hi Li-Gong,

I verified that the doc of Havana is correct.
What's your version of Keystone ?


root at keystone-havana:/etc/keystone# keystone --version
0.4.1
root at keystone-havana:/etc/keystone# dpkg -l | grep keystone
ii  keystone                          1:2013.2~rc4-0ubuntu1~cloud0      OpenStack identity service - Daemons
ii  python-keystone                   1:2013.2~rc4-0ubuntu1~cloud0      OpenStack identity service - Python library
ii  python-keystoneclient             1:0.3.2-0ubuntu1~cloud0           Client library for OpenStack Identity API

+Hugo Kuo+
(+886) 935004793

2013/10/29 Kuo Hugo <tonytkdk at gmail.com<mailto:tonytkdk at gmail.com>>
Hi Li-Gong,

I verified that the doc of Havana is correct.
What's your version of Keystone ?


root at keystone-havana:/etc/keystone# keystone --version
0.4.1
root at keystone-havana:/etc/keystone# dpkg -l | grep keystone
ii  keystone                          1:2013.2~rc4-0ubuntu1~cloud0      OpenStack identity service - Daemons
ii  python-keystone                   1:2013.2~rc4-0ubuntu1~cloud0      OpenStack identity service - Python library
ii  python-keystoneclient             1:0.3.2-0ubuntu1~cloud0           Client library for OpenStack Identity API


[ƒÈÖÈDƬ 1]

Hugo

+Hugo Kuo+
(+886) 935004793<tel:%28%2B886%29%20935004793>

2013/10/29 Kuo Hugo <tonytkdk at gmail.com<mailto:tonytkdk at gmail.com>>
Wait .... The error is different from the beginning....

No handlers could be found for logger "keystoneclient.client"
Could not find user: admin (HTTP 404)

No handlers could be found for logger "keystoneclient.client"
Could not find tenant: admin (HTTP 404)


Which means the uuid of user admin was passed. The problem is tenant should be uuid now.



+Hugo Kuo+
(+886) 935004793<tel:%28%2B886%29%20935004793>

2013/10/29 Dheerendra <dheerendra.madhusudhana at gmail.com<mailto:dheerendra.madhusudhana at gmail.com>>
Error what you are seeing is "admin" user not found(404 error).  This would mean that particular user is not available with keystone you are trying to work with or some end point is not availble.  I suggest you the following.
1. Create different user, tenant and role. Then try to configure 'user-role-add'
2. Your service_endpoint URL is http://controller:35357. Ensure that "controller" is resolving to the correct IP address
3. If you have installed the havana release, you need to define environment variables as OS_SERVICE_TOKEN and OS_SERVICE_ENDPOINT.
Hope this helps.

-Dheerendra

On Tue, Oct 29, 2013 at 1:51 PM, Kuo Hugo <tonytkdk at gmail.com<mailto:tonytkdk at gmail.com>> wrote:
Is it help by specifying --user=d1877fedeafa4672b332d4698f894d94 ?



+Hugo Kuo+
(+886) 935004793<tel:%28%2B886%29%20935004793>

2013/10/29 Duan, Li-Gong (Gary at BCS-HST-SSTL) <li-gong.duan at hp.com<mailto:li-gong.duan at hp.com>>
Hi,

Has anyone encountered ¡°No handlers¡± error when executing ¡°keystone user-role-add¡±?

root at ubuntu:/var/lib/glance# keystone user-role-add --user=admin --tenant=admin --role=admin
No handlers could be found for logger "keystoneclient.client"
Could not find user: admin (HTTP 404)


root at ubuntu:~# export SERVICE_TOKEN=64b4102eec95651658b2

root at ubuntu:~# export SERVICE_ENDPOINT=http://controller:35357/v2.0


I follows the below manual to configure keystone:
http://docs.openstack.org/havana/install-guide/install/apt/content/keystone-users.html


----------------------------
root at ubuntu:/var/lib/glance# keystone user-role-add --user=admin --tenant=admin --role=admin
No handlers could be found for logger "keystoneclient.client"
Could not find user: admin (HTTP 404)
root at ubuntu:/var/lib/glance# keystone --debug user-role-add --user=admin --tenant=admin --role=admin
connect: (controller, 35357)
send: 'PUT /v2.0/tenants/admin/users/admin/roles/OS-KSADM/admin HTTP/1.1\r\nHost: controller:35357\r\nContent-Length: 4\r\nx-auth-token: 64b4102eec95651658b2\r\ncontent-type: application/json\r\naccept-encoding: gzip, deflate\r\nuser-agent: python-keystoneclient\r\n\r\nnull'
reply: 'HTTP/1.1 404 Not Found\r\n'
header: Content-Type: application/json
header: Vary: X-Auth-Token
header: Date: Tue, 29 Oct 2013 15:47:35 GMT
header: Transfer-Encoding: chunked
No handlers could be found for logger "keystoneclient.client"
Traceback (most recent call last):
  File "/usr/bin/keystone", line 9, in <module>
    load_entry_point('python-keystoneclient==2012.1', 'console_scripts', 'keystone')()
  File "/usr/lib/python2.7/dist-packages/keystoneclient/shell.py", line 306, in main
    OpenStackIdentityShell().main(sys.argv[1:])
  File "/usr/lib/python2.7/dist-packages/keystoneclient/shell.py", line 266, in main
    args.func(self.cs, args)
  File "/usr/lib/python2.7/dist-packages/keystoneclient/v2_0/shell.py", line 235, in do_user_role_add
    kc.roles.add_user_role(args.user, args.role, args.tenant_id)
  File "/usr/lib/python2.7/dist-packages/keystoneclient/v2_0/roles.py", line 73, in add_user_role
    return self._update(route % params, None, "role")
  File "/usr/lib/python2.7/dist-packages/keystoneclient/base.py", line 94, in _update
    resp, body = methods[method](url, body=body)
  File "/usr/lib/python2.7/dist-packages/keystoneclient/client.py", line 172, in put
    return self._cs_request(url, 'PUT', **kwargs)
  File "/usr/lib/python2.7/dist-packages/keystoneclient/client.py", line 150, in _cs_request
    **kwargs)
  File "/usr/lib/python2.7/dist-packages/keystoneclient/client.py", line 130, in request
    raise exceptions.from_response(resp, body)
keystoneclient.exceptions.NotFound: Could not find user: admin (HTTP 404)
root at ubuntu:/var/lib/glance# keystone user-list
+----------------------------------+---------+---------------------+--------+
|                id                | enabled |        email        |  name  |
+----------------------------------+---------+---------------------+--------+
| cde4a83ef91e4b4d8373417c5df1e96c | True    | glance at example.com<mailto:glance at example.com>  | glance |
| d1877fedeafa4672b332d4698f894d94 | True    | li-gong.duan at hp.com<mailto:li-gong.duan at hp.com> | admin  |
+----------------------------------+---------+---------------------+--------+
root at ubuntu:/var/lib/glance# keystone role-list
+----------------------------------+-------+
|                id                |  name |
+----------------------------------+-------+
| ea4957e6be0d40658a5384015873fbe0 | admin |
+----------------------------------+-------+
root at ubuntu:/var/lib/glance# keystone tenant-list
+----------------------------------+---------+---------+
|                id                |   name  | enabled |
+----------------------------------+---------+---------+
| 0f93b77a88074dd48a9f4795b443d72d | service | True    |
| 22bce9d51bd34fd3a74baedb610f77c9 | admin   | True    |
+----------------------------------+---------+---------+
---------------------

Regards,
Gary

_______________________________________________
Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to     : openstack at lists.openstack.org<mailto:openstack at lists.openstack.org>
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack


_______________________________________________
Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to     : openstack at lists.openstack.org<mailto:openstack at lists.openstack.org>
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20131030/d2b16f3e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.jpg
Type: image/jpeg
Size: 41656 bytes
Desc: image002.jpg
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20131030/d2b16f3e/attachment.jpg>


More information about the Openstack mailing list