Ask Your Question

keystone setup adding admin user 'NoneType' object has no attribute 'encode' [closed]

asked 2014-07-14 11:21:36 -0500

rgroten gravatar image

updated 2014-07-14 12:38:17 -0500

SamYaple gravatar image

I'm following the Openstack Icehouse Install Guide. So far so good but when configuring the keystone service I'm having issues adding the admin user:

[root@controller keystone]# keystone user-create --name=admin --pass=$ADMIN_PASS
**'NoneType' object has no attribute 'encode'**

There are no errors in /var/log/keystone/keystone.log, I tried uninstalling and dropping the keystone database then restarting but I have the same problem.

Here's the output with debug on:

[root@rlx7001 keystone]# keystone --debug user-create --name=admin --pass=$ADMIN_PASS
DEBUG:keystoneclient.session:REQ: curl -i -X POST -H "User-Agent: python-keystoneclient" -H "Content-Type: application/json" -H "X-Auth-Token: 0efa132694af466ccc7d" -d '{"user": {"email": null, "password": "1574aa7235ff", "enabled": true, "name": "admin", "tenantId": null}}'
INFO:urllib3.connectionpool:Starting new HTTP connection (1): None
'NoneType' object has no attribute 'encode'

Thanks, Ryan

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by SamYaple
close date 2014-07-14 13:20:56.146251

2 answers

Sort by ยป oldest newest most voted

answered 2014-07-14 11:52:20 -0500

updated 2014-07-14 13:08:33 -0500

Is that error coming from keystone or keystone command line tool?

Can you try the following? keystone --debug user-create --name=admin --pass=$ADMIN_PASS

If you don't see request and response from keystone, then that error is coming from keystone command line client. Debug will give you more information.

Your url is wrong. You are missing "//"

edit flag offensive delete link more


The error is coming from the command line tool. I put the debug output above.

rgroten gravatar imagergroten ( 2014-07-14 12:31:16 -0500 )edit

I can't believe I did that...thank you very much the missing "//" in OS_SERVICE_ENDPOINT environment variable was the issue. Thanks again.

rgroten gravatar imagergroten ( 2014-07-14 13:13:09 -0500 )edit

answered 2014-07-14 12:41:31 -0500

SamYaple gravatar image

updated 2014-07-14 13:10:46 -0500

Did you run keystone-manage db_sync after setting up keystone?

EDIT: Haneef Ali has the correct answer. Your URL is wrong.

edit flag offensive delete link more


Yep, if I go into the database I see a list of tables that were created. the db_sync returned no output when run so I'm assuming it was successful.

rgroten gravatar imagergroten ( 2014-07-14 12:49:43 -0500 )edit

Hmm. I would check would be that the correct database (mysql vs sqllite) is being used in keystone.conf. Also purging the keystone database restarting the service and recreating it would be my next step.

I recommend this only if you do not have any data in the database, which you appear to not since this is an initial install.

SamYaple gravatar imageSamYaple ( 2014-07-14 13:03:41 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-07-14 11:21:36 -0500

Seen: 1,334 times

Last updated: Jul 14 '14