Ask Your Question
0

openstack liberty image list : internal server error http 500

asked 2016-01-17 22:35:17 -0500

Jwitalbert gravatar image

updated 2016-01-20 00:02:33 -0500

Hi, I'm trying to deploy openstack liberty by centos 7 (rdo).

※ Environment

kernel version : 3.10.0-327.4.4.el7.x86_64

reference doc : http://docs.openstack.org/liberty/install-guide-rdo/glance-install.html

※ admin-openrc.sh

export OS_PROJECT_DOMAIN_ID=default
export OS_USER_DOMAIN_ID=default
export OS_PROJECT_NAME=admin
export OS_TENANT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=Admin23!QAZ
export OS_AUTH_URL=http://controller:35357/v3
export OS_IDENTITY_API_VERSION=3
export OS_TOKEN=cd806f06555ab6994fd5
export OS_AUTH_TOKEN=cd806f06555ab6994fd5
export OS_URL=http://controller:35357/v3
export OS_IMAGE_API_VERSION=2
export OS_AUTH_TYPE=password

when i run the command :

# openstack glance list
Internal Server Error (HTTP 500)

keystone is fine, i can show everything i need.

# openstack endpoing list
+----------------------------------+-----------+--------------+--------------+---------+-----------+------------------------------+
| ID                               | Region    | Service Name | Service Type | Enabled | Interface | URL                          |
+----------------------------------+-----------+--------------+--------------+---------+-----------+------------------------------+
| 0671c3e189c240b9a6355a325d53bff4 | RegionOne | glance       | image        | True    | public    | http://controller:9292       |
| 135179b7ebdb4b2094d86bc0c8660e62 | RegionOne | keystone     | identity     | True    | admin     | http://controller:35357/v2.0 |
| 182e1b37a3a042ff9509632dd0de2c29 | RegionOne | keystone     | identity     | True    | public    | http://controller:5000/v2.0  |
| 590df17551084bd694047e1ad596a205 | RegionOne | glance       | image        | True    | internal  | http://controller:9292       |
| 9ab48fcd134141e88e79e90187920daa | RegionOne | glance       | image        | True    | admin     | http://contorller:9292       |
| af051747e27548d589ea469dd01cc7ad | RegionOne | keystone     | identity     | True    | internal  | http://controller:5000/v2.0  |
+----------------------------------+-----------+--------------+--------------+---------+-----------+------------------------------+

glance-api.conf :

[database]

connection = mysql://glance:glance123@controller/glance

[keystone_authtoken]

auth_uri = http://controller:5000
auth_uri = http://controller:35357
auth_plugin = password
project_domain_id = default
user_admin_id = default
project_name = service
username = glance
password = glance123

[paste_deploy]
flavor = keystone       

[glance_store]
default_store = file
filesystem_store_datadir = /var/lib/glance/images/

[default]
nofificatoin_driver = noop
verbose = True

glance-registry.conf
[database]
connection = mysql://glance:glance123@controller/glance

[keystone_authtoken]
auth_uri = http://controller:5000
auth_uri = http://controller:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = glance
password = glance123

[paste_deploy]
flavor = keystone

[default]
notification_driver = noop
verbose = True

/bin/sh -c "glance-manage db_sync" glance  
=> it's work, all the glance tables are generated in glance database.


※  glance/api.log : 

2016-01-18 11:56:14.304 12220 CRITICAL keystonemiddleware.auth_token [-] Unable to validate token

2016-01-18 11:56:14.304 12220 ERROR keystonemiddleware.auth_token Traceback (most recent call last):

2016-01-18 11:56:14.304 12220 ERROR keystonemiddleware.auth_token   File "/usr/lib/python2.7/site-packages/keystonemiddleware/auth_token/__init__.py", line 849, in _fetch_token

2016-01-18 11:56:14.304 12220 ERROR keystonemiddleware.auth_token     data = self._identity_server.verify_token(token)

2016-01-18 11:56:14.304 12220 ERROR keystonemiddleware.auth_token   File "/usr/lib/python2.7/site-packages/keystonemiddleware/auth_token/_identity.py", line 213, in verify_token

2016-01-18 11:56:14.304 12220 ERROR keystonemiddleware.auth_token     auth_ref = self._request_strategy.verify_token(user_token)

2016-01-18 11:56:14.304 12220 ERROR keystonemiddleware.auth_token   File "/usr/lib/python2.7/site-packages/keystonemiddleware/auth_token/_identity.py", line 165, in _request_strategy

2016-01-18 11:56:14.304 12220 ERROR keystonemiddleware.auth_token     strategy_class = self._get_strategy_class()

2016-01-18 11:56:14.304 12220 ERROR keystonemiddleware.auth_token   File "/usr/lib/python2.7/site-packages/keystonemiddleware/auth_token/_identity.py", line 187, in _get_strategy_class

2016-01-18 11:56:14.304 12220 ERROR keystonemiddleware.auth_token     if self._adapter.get_endpoint(version=klass.AUTH_VERSION):

2016-01-18 11:56:14.304 12220 ERROR keystonemiddleware.auth_token   File "/usr/lib/python2.7/site-packages/keystoneclient/adapter.py", line 129, in get_endpoint

2016-01-18 11:56:14.304 12220 ERROR keystonemiddleware.auth_token     return self.session.get_endpoint(auth or self.auth, **kwargs)

2016-01-18 11:56:14.304 12220 ...
(more)
edit retag flag offensive close merge delete

Comments

Ensure you have default_domain option set to default in keystone.conf

Eduardo Gonzalez gravatar imageEduardo Gonzalez ( 2016-01-19 04:31:44 -0500 )edit

Openstack/keystone commands works? EG: openstack token issue. May be a misconfiguration between keystone version in keystone and glance config files.

Eduardo Gonzalez gravatar imageEduardo Gonzalez ( 2016-01-19 04:35:38 -0500 )edit

3 answers

Sort by » oldest newest most voted
1

answered 2016-01-18 09:40:52 -0500

Hi,

at the first glance you have used auth_uri twice in configuration files under [keystone_authtoken] section:

One is auth_uri and the other one is auth_url:

auth_uri = http://controller:5000
auth_url = http://controller:35357

Change the configuration file with the appropriate values and restart glance services.

Regards

edit flag offensive delete link more
0

answered 2016-01-25 10:07:36 -0500

Tony gravatar image

Confirm the password for the Glance service user. According to your configuration above, you are using the password 'glance123'. Test this password using the following command.

openstack --os-username glance --os-password glance123 --os-project-name service image list

If the password is incorrect you can use the following command to update the password.

openstack user set --password-prompt glance

Once you have confirmed the correct password, make sure that is reflecting in the keystone_authtoken section of the glance-api.conf and glance-registry.conf

edit flag offensive delete link more

Comments

Thanks.

I will try this.

Jwitalbert gravatar imageJwitalbert ( 2016-01-25 20:18:30 -0500 )edit
0

answered 2018-01-17 13:55:46 -0500

Hi Tony, I have the same problem, I am doing a new installation and I cannot get the glance service. When I type the command:

openstack --os-username glance --os-password password --os-project-name service image list --debug

I get the error: http://controller:9292 "GET /v2/images HTTP/1.1" 500 228 RESP: [500]

I reviewed the keystone.conf and uncomment the line: [root@localhost keystone]# diff keystone.conf keystone.conf.Jan17.old < default_domain_id = default

About the comment "One is auth_uri and the other one is auth_url:" That is the way that it should be, ina cording to the instructions: https://docs.openstack.org/glance/pike/install/install-rdo.html (https://docs.openstack.org/glance/pik...)

About the comment "openstack user set --password-prompt glance" . I checked the password (in my case I am using the word "password" for the password).

I will appreciate any additional help. Thanks

edit flag offensive delete link more

Comments

Guys I contacted a friend and we reviewed the installation. Pike under the glance section doesn't have details on the installation of the database. https://docs.openstack.org/glance/pike/install/install-rdo.html (https://docs.openstack.org/glance/pik...) Check by doing: MariaDB [(none)]> show databases; and search the glance database.

yayoayala gravatar imageyayoayala ( 2018-01-18 10:09:20 -0500 )edit

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: 2016-01-17 22:35:17 -0500

Seen: 1,829 times

Last updated: Jan 25 '16