Ask Your Question

how to solve keystone error"Expecting an auth URL via either --os-auth-url or env[OS_AUTH_URL]" on havana

asked 2014-02-08 08:44:58 -0500

robbie gravatar image

updated 2014-02-08 08:52:30 -0500

  1. I have installed keystone according to "openstack-install-guide-apt-havana.pdf" on ubuntu 12.04, but it's fail to create new tenant:
    robbie@robbie-Controller:~$ sudo keystone tenant-create --name=admin
    Expecting an auth URL via either --os-auth-url or env[OS_AUTH_URL]

    I have export OS_AUTH_URL:
    robbie@robbie-Controller:~$ env
    DESKTOP_SESSION=ubuntu OS_SERVICE_ENDPOINT=http://controller:35357/v2.0 LC_IDENTIFICATION=en_US.UTF-8 PWD=/home/robbie GNOME_KEYRING_PID=2418 LANG=en_US.UTF-8 MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path LC_MEASUREMENT=en_US.UTF-8 COMPIZ_CONFIG_PROFILE=ubuntu OS_AUTH_URL=http://controller:35357/v2.0

  2. I have also tried:
    robbie@robbie-Controller:~$ sudo keystone tenant-create --name=admin --os-auth-url=OS_AUTH_URL=http://controller:35357/v2.0
    usage: keystone [--version] [--timeout <seconds>] [--os-username <auth-user-name>] [--os-password <auth-password>] [--os-tenant-name <auth-tenant-name>] [--os-tenant-id <tenant-id>] [--os-auth-url <auth-url>] [--os-region-name <region-name>] [--os-identity-api-version <identity-api-version>] [--os-token <service-token>] [--os-endpoint <service-endpoint>] [--os-cacert <ca-certificate>] [--insecure] [--os-cert <certificate>] [--os-key <key>] [--os-cache] [--force-new-token] [--stale-duration <seconds>] <subcommand> ... keystone: error: unrecognized arguments: --os-auth-url=OS_AUTH_URL=http://controller:35357/v2.0

who can help me ? Thanks.

edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted

answered 2014-02-08 21:20:20 -0500

updated 2014-02-08 21:27:18 -0500

Keystone expects those --os- arguments to be used immediately after the keyword "keystone". It is mentioned in the usage itself, <subcommand> is your tenant-create command, all square brackets given before are optional arguments.

Try this:

sudo keystone --os-auth-url=http://controller:35357/v2.0 tenant-create --name=admin 

and a handy tip:

env | grep OS_AUTH_URL

This will only display env data which contains OS_AUTH_URL.

Hope this helps.

edit flag offensive delete link more

answered 2014-02-09 08:04:51 -0500

Indeep_Minku-OPENSTACK gravatar image

try with

*keystone --os-auth-url=http://controller:35357/v2.0 --os-endpoint=http://controller:35357/v2.0 tenant-create --name=admin *

may be this will work.. I encountered same error many times . But then i found this solution and that worked for me. May be it will work for you also.

edit flag offensive delete link more

answered 2016-03-23 12:33:31 -0500

cihilt gravatar image

The alternative is to do this.

source /root/keystonerc_admin

Then run command.

edit flag offensive delete link more

answered 2014-02-08 23:03:55 -0500

shnkc gravatar image

Copy following lines into a bash script and run it:

export SERVICE_ENDPOINT="http://controller:35357/v2.0" 
keystone tenant-create --name=admin

The script should successfully complete the process.

edit flag offensive delete link more


Add those export statements to ~/.bashrc You won't be needing any bash script file, you can simply run the command directly.

prasoontelang gravatar imageprasoontelang ( 2014-02-09 05:24:18 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-02-08 08:44:58 -0500

Seen: 14,235 times

Last updated: Mar 23 '16