Ask Your Question
1

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 --email=xx@xx.com 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

Comments

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
3

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 admin-openrc.sh 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 \
token-get

now copy the credentials to your admin-openrc file

export OS_USERNAME=admin
export OS_PASSWORD=ADMIN_PASS
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

source admin-openrc.sh
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

Stats

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

Seen: 152 times

Last updated: Nov 25 '14