Ask Your Question

OpenStack Icehouse glance image-list The request you have made requires authentication. (HTTP 401)

asked 2014-07-31 18:19:37 -0500

Robert gravatar image

I can not figure out what is wrong with authentication when using glance? I have installed keystone which is worknig, but I can not set glance to work.

export OS_USERNAME=admin
export OS_PASSWORD=adminpass
export OS_TENANT_NAME=admin
export OS_AUTH_URL=http://controler:35357/v2.0

When I use keystone I set:

$ export OS_SERVICE_TOKEN=43beada85170163c97e1
$ export OS_SERVICE_ENDPOINT=http://controler:35357/v2.0

and it is working fine. But when I try to run glance command I always get this error or error: Invaild OpenStack Identity credentials.

Users and passwords of mysql are:

root mysqlpass
keystone mysqlpass
glance mysqlpass

I have instaled glance in this order:

$ apt-get install glance python-glanceclient

Set up connection in /etc/glance/glance-api.conf and /etc/glance/glance-registry.conf:

connection =mysql://glance:mysqlpass@controler/glance

Set up configuration in /etc/glance/glance-api.conf:

rpc_backend = rabbit
rabbit_host = controller
rabbit_password = rabbitpass

Set up mysql for glance:

$ mysql -u root -p
mysql> CREATE DATABASE glance;
mysql> GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost'  IDENTIFIED BY 'mysqlpass';
mysql> GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%'  IDENTIFIED BY 'mysqlpass';
$glance-manage db_sync
$ keystone user-create --name=glance --pass=glancepass
$ keystone user-role-add --user=glance --tenant=service --role=admin

I have made needed configurations in /etc/glance/glance-api.conf and /etc/glance/glance-registry.conf:


$ keystone service-create --name=glance --type=image  --description="OpenStack Image Service"
$ keystone endpoint-create  --service-id=23a41691715b4a4581e3ad7e1620977c 

$ service glance-registry restart
$ service glance-api restart
$ glance image-list
The request you hacve made requires authentication. (HTTP 401)
$ env | grep OS_
The request you hacve made requires authentication. (HTTP 401)

Then I have tried with changing with this environment variables ( here isn't all changes, only ones that I remmber):

$ export OS_USERNAME=glance
$ export OS_PASSWORD=glancepass
$ glance image-list
The request you hacve made requires authentication. (HTTP 401)
$ export OS_PASSWORD=mysqlpass

I have also tried with some others OS_TENANT_ID from these:

$ keystone tenant-list
                            id                             name   enabled
2e2a2d61c8fb4de0932347ca8c6b78b2    admin    True
32070f16d71f4c30a2cfca25298e9f59     demo     True
da83c962081f465381e61067481d731a   service  True

And now I am very confused. I wolud like to get answers on these questions: 1. How to solve this issue? 2. Should every sevice (keystone, glance, etc) should have his own SERVICE But I don't understand then why did I create file? 3. Can someone explains me about atuhnetication for users as admin and demo and for users as services keystone, glance, etc. If services are running when cloud is working these service authentication should work automaticly. What about if I (administrator) want to administrate cloud? What about if I as user want to use cloud? Then how should I athenticate? 4. I have noticed I can't ping google ... (more)

edit retag flag offensive close merge delete


Search this site, read the documentation. Most importantly: check the logs! Sharing the configuration files is important only up to a point. Last: ask one question at the time (FAQ).

smaffulli gravatar imagesmaffulli ( 2014-07-31 18:46:23 -0500 )edit

3 answers

Sort by ยป oldest newest most voted

answered 2014-09-12 16:20:14 -0500

bill l gravatar image

You use both "controler" and "controller".

edit flag offensive delete link more

answered 2014-08-08 01:18:04 -0500

raiesmh08 gravatar image

Look in the top of the page -

1 - you have created -

2. Now you are using -

    $ export OS_SERVICE_TOKEN=43beada85170163c97e1
    $ export OS_SERVICE_ENDPOINT=http://controler:35357/v2.0
  1. Now you are running glance command which is getting failed. this is due to wrong credentials (not compatible with glance) which you have set on command line.

To resolve this problem please follow following steps -

1. run following command to unset currently exported credentials-
2. Now source file to export glance compatible credentials -
   $ source
3. Now run any glance command i.e- 
   $ glance image-list
edit flag offensive delete link more

answered 2014-12-28 00:47:55 -0500

Kannan Raman gravatar image

Please make sure that your admin password should be in correctly . I will explain my experience .
1. i had received slimier error message when i was installing openstack. 2. problem is , i was changed the password via openstack API. 3. I forgot to update the password on file. 4. After i have updated newest password on file. 5. After which successfully cleared this error: " The request you have made requires authentication. (HTTP 401)"

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-07-31 18:19:37 -0500

Seen: 8,076 times

Last updated: Jul 31 '14