Ask Your Question
0

Uploading image to the Image Service failed (failure status 401)

asked 2015-07-07 03:15:02 -0500

Kevin Bratek gravatar image

updated 2015-07-17 10:34:34 -0500

smaffulli gravatar image

Hello there,

i'm new to Openstack and trying to build my own Openstack-environment. After following the "OpenStack Installation Guide for Red Hat Enterprise Linux 7, CentOS 7, and Fedora 20" (on Fedora 21), I faced a problem at uploading cirrOS to the Image-Service.

My Openstack-version, refering to this command: "[root@localhost ~]# keystone-manage --version" should be 2014.2.2

After I try to upload the image I get this output:

ADMIN-OPENRC.SH:

export OS_TENANT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=MYPASS
export OS_AUTH_URL=http://controller:35357/v2.0

[root@localhost ~]# source admin-openrc.sh 
[root@localhost ~]# glance --debug image-create  --name "cirros-0.3.3-x86_64" --file /tmp/images/cirros-0.3.3-x86_64-disk.img  --disk-format qcow2 --container-format bare --is-public True --progress
curl -i -X POST -H 'Accept-Encoding: gzip, deflate' -H 'x-image-meta-container_format: bare' -H 'Accept: */*' -H 'X-Auth-Token: {SHA1}726116102202fa50ff0c064ca3cadb86b65fe997' -H 'x-image-meta-size: 13200896' -H 'Connection: keep-alive' -H 'x-image-meta-is_public: True' -H 'User-Agent: python-glanceclient' -H 'Content-Type: application/octet-stream' -H 'x-image-meta-disk_format: qcow2' -H 'x-image-meta-name: cirros-0.3.3-x86_64' http://controller:9292/v1/images
[=============================>] 100%
Request returned failure status 401.
Invalid OpenStack Identity credentials.

I have to mention that i can get a token from keystone without problems:

[root@localhost ~]# keystone token-get
<br>+-----------+----------------------------------+
<br>|  Property |              Value               |
<br>+-----------+----------------------------------+
<br>|  expires  |       2015-07-03T10:26:38Z       |
<br>|     id    | 96299e7c355d43a9b8e5b7f47a4d4cdd |
<br>| tenant_id | 425de1784b644473b6f1cffe874992c5 |
<br>|  user_id  | 0a85326e1c744d449327894b6a276b5d |
<br>+-----------+----------------------------------+

Here are my config files:


GLANCE-API.CONF & GLANCE-REGISTRY.CONF
connection=mysql://glance:MYPASS@controller/glance
[keystone_authtoken]
auth_uri = http://controller:5000/v2.0
identity_uri = http://controller:35357
admin_tenant_name = service
admin_user = glance
admin_password = MYPASS


KEYSTONE.CONF
connection=mysql://keystone:MYPASS@controller/keystone

Here is my api.log:


/var/log/glance/api.log
2015-07-03 11:15:00.763 3447 WARNING keystonemiddleware.auth_token [-] Retrying on HTTP connection exception: Unable to establish connection to http://controller:35357/
2015-07-03 11:15:01.266 3447 WARNING keystonemiddleware.auth_token [-] Retrying on HTTP connection exception: Unable to establish connection to http://controller:35357/
2015-07-03 11:15:02.269 3447 WARNING keystonemiddleware.auth_token [-] Retrying on HTTP connection exception: Unable to establish connection to http://controller:35357/
2015-07-03 11:15:04.273 3447 ERROR keystonemiddleware.auth_token [-] HTTP connection exception: Unable to establish connection to http://controller:35357/
2015-07-03 11:15:04.274 3447 WARNING keystonemiddleware.auth_token [-] Authorization failed for token
2015-07-03 11:15:04.274 3447 INFO keystonemiddleware.auth_token [-] Invalid user token - deferring reject downstream
2015-07-03 11:15:04.327 3447 INFO glance.wsgi.server [-] 192.168.13.92 - - [03/Jul/2015 11:15:04] "POST /v1/images HTTP/1.1" 401 571 3.579172
2015-07-03 11:30:29.083 3446 WARNING keystonemiddleware.auth_token [-] Retrying on HTTP connection exception: Unable to establish connection to http://controller:35357/
2015-07-03 11:30:29.587 3446 WARNING keystonemiddleware.auth_token [-] Retrying on HTTP connection exception: Unable to establish connection to http://controller:35357/
2015-07-03 11:30:30.591 3446 WARNING keystonemiddleware.auth_token [-] Retrying on HTTP connection exception: Unable to establish connection to http://controller:35357/
2015-07-03 11:30:32.595 3446 ERROR keystonemiddleware.auth_token [-] HTTP connection exception: Unable to establish connection to http://controller:35357/
2015-07-03 11:30:32.595 3446 WARNING keystonemiddleware.auth_token [-] Authorization ...












(more)

edit retag flag offensive close merge delete

Comments

hello, I have the same problem,how do you fix this? thanks

bingyu gravatar imagebingyu ( 2015-07-17 04:59:15 -0500 )edit

3 answers

Sort by ยป oldest newest most voted
0

answered 2015-10-21 03:50:22 -0500

Kevin Bratek gravatar image

Solved my problem by disabling SeLinux: Edit /etc/selinux/config and set: SELINUX=disabled Reboot and check with: /usr/sbin/sestatus. This will return that SeLinux is disabled.

Cheers Kevin

edit flag offensive delete link more
0

answered 2015-09-11 19:06:42 -0500

I have the same issue :( Anyone has a fix yet??

edit flag offensive delete link more
0

answered 2015-09-11 19:43:21 -0500

Hosam gravatar image

me Too :( same issue

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: 2015-07-07 03:15:02 -0500

Seen: 702 times

Last updated: Oct 21 '15