Ask Your Question

How do I solve error NotAuthenticated when trying to upload image to Glance

asked 2013-05-15 18:04:14 -0600

ComputerConcepts gravatar image

updated 2013-05-15 20:40:47 -0600

smaffulli gravatar image

Attempting install using the RedHat Install & Deploy Guide, and am having an issue uploading the test image. When I run the image-create command, I get the following:

 NotAuthenticated: 401 Unauthorized 
 This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.
 Authentication required
 (HTTP 500)

I've tried every userid & password combination that I can think of. I've tried different values in the glance-api.conf and glance-registry.conf files. I've even used the user-password-update directive to change the passwords for the glance userid.

There is a warning in the keystone.log file that authentication failed with my management IP address. I don't know if it matters, but my public IP on the services is set to a true public IP, not my internal IP as suggested in the Install Guide. Also, the following message is in the glance/api.log:

   2013-05-15 17:46:22.932 INFO glance.registry.client [949202b5-9417-4cf8-a275-7a21fc6bc3c4 None None] Registry client request POST /images raised NotAuthenticated

There is nothing evident in the glance/registry.log file.

My environment is CentOS 6.4, dual Xeon 2.66 GHz processors, 16 GB RAM, with a fresh minimal install of CentOS.

Thanks in advance for any assistance.

edit retag flag offensive close merge delete


Did you use user/pass for glance service or user/pass for tenant when you executed image-create?

Alen Komljen gravatar imageAlen Komljen ( 2013-05-16 03:20:52 -0600 )edit

I"m not sure that I follow you. Following the Installation Guide on page 26, I created a tenant named 'service', then created a service user in the service tenant named glance. That glance user/password combination is what I'm attempting to use.

ComputerConcepts gravatar imageComputerConcepts ( 2013-05-16 08:17:19 -0600 )edit

You need to use tenant user or to be more clear your admin user to execute that command.

Alen Komljen gravatar imageAlen Komljen ( 2013-05-16 08:23:11 -0600 )edit

I'm sorry, I wasn't totally clear. I used the glance userid/password combination in glance-api.conf and glance-registry.conf. I did use the admin userid/password when executing the command.

ComputerConcepts gravatar imageComputerConcepts ( 2013-05-16 08:25:34 -0600 )edit

3 answers

Sort by ยป oldest newest most voted

answered 2013-07-23 10:32:31 -0600

shardy gravatar image

In addition to the suggestions above, this can happen if the glance service is misconfigured; check that /etc/glance/glance-api-paste.ini and /etc/glance/glance-registry-paste.ini have admin_tenant_name, admin_user and admin_password set correctly

edit flag offensive delete link more

answered 2013-05-16 09:27:44 -0600

RomilGupta gravatar image

Hi, You have to get authenticated with keystone. Hope these commands help you :

export OS_USERNAME=<user-name>
export OS_PASSWORD=< password>
export OS_TENANT_NAME=<tenant-name>
export OS_AUTH_URL=
export OS_REGION_NAME= < region-name>

Replace ' < > ' as per your credentials.

edit flag offensive delete link more


Rather than entering these variables into a rc file and sourcing them, I have entered them on the command line, to no avail. I've tried with and without the region directive.

ComputerConcepts gravatar imageComputerConcepts ( 2013-05-16 13:43:19 -0600 )edit

answered 2013-10-07 00:34:24 -0600

sph gravatar image

I was facing the same problem. I was using keystone as the authentication mechanism. But my glance-api.conf and glance-registry.conf contained "flavor = caching". I changed that to "flavor = keystone" and restarted glance-registry and glance-api services and I could create an image / lookup already created images.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2013-05-15 18:04:14 -0600

Seen: 9,315 times

Last updated: Oct 07 '13