Ask Your Question
0

Error in keystone command

asked 2015-01-22 07:45:48 -0500

deepak6446 gravatar image

i executed the following command
keystone user-list error Expecting an auth URL via either --os-auth-url or env[OS_AUTH_URL]

thanks in advance

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2015-01-22 16:04:55 -0500

MarkE gravatar image

You either need to set environment variables for username,password and authURL or extend the command with the appropriate flags.

Look at the install guide, section 3 - Identity and the verify operation sub-section on how to do this.

edit flag offensive delete link more
2

answered 2015-01-22 23:24:33 -0500

hello deepak, the error is because you need to source admin-credentials

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

1 follower

Stats

Asked: 2015-01-22 07:45:48 -0500

Seen: 86 times

Last updated: Jan 22 '15