Error Define users, tenants, and roles

asked 2014-11-24 11:45:11 -0500

Ejhay0101 gravatar image

I'm trying to create an administrative user account using this command keystone user-create --name=admin --pass=xxx but I'm encountering this error "Unable to establish connection to http://controller:35357/v2.0/users%22 (http://controller:35357/v2.0/users") .

edit retag flag offensive close merge delete


Can you see http://controller:35357/v2.0/in the output of keystone endpoint-list?

stdg11 gravatar imagestdg11 ( 2014-11-24 17:29:46 -0500 )edit

"Unable to stablish connection to ..." is general error. Please put your keystone logs(/var/log/keystone/keystone.log) on your post to aim others closely find your solution.

Mzoorikh gravatar imageMzoorikh ( 2014-11-24 20:22:43 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2014-11-25 08:25:34 -0500

updated 2014-11-25 17:14:18 -0500

smaffulli gravatar image

unable to establish connection means your auth_credentials are not mapping correctly to keystone user-create.

for the first user better you set environmental variables like OS_SERVICE_TOKEN and OS_SERVICE_ENDPOINT by the following command.

openssl rand -hex 10  (this will produce a 10 digit key copy it) then type
export OS_SERVICE_TOKEN=10 digit key   
export OS_SERVICE_ENDPOINT=http://controller:35357/v2.0

if this works properly then for second time onwards you have to create filef first. then execute the following command

keystone --os-username=admin --os-password=ADMIN_PASS --os-auth-url=http://controller:35357/v2.0 token-get

this returns a token with name and id generated randomly (don't panic output would be bigger than your screen) after that run the below command

keystone --os-username=admin --os-password=ADMIN_PASS --os-tenant-name=admin --os-auth-url=http://controller:35357/v2.0 \

now copy the credentials to your admin-openrc file

export OS_USERNAME=admin
export OS_TENANT_NAME=admin
export OS_AUTH_URL=http://controller:35357/v2.0

just remember where you create this file its better to create it in /etc/keystone then source it by the command

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools


Asked: 2014-11-24 11:45:11 -0500

Seen: 184 times

Last updated: Nov 25 '14