Glance - HTTPInternalServerError (HTTP 500)

asked 2014-05-01 14:10:56 -0500

keiser gravatar image

updated 2014-05-01 14:34:49 -0500

When trying to verify image service installation running this command:

glance image-create --name "CirrOS-0.3.2-x86_64" --disk-format qcow2 --container-format bare --is-public True --copy-from (

I get this error:

Request returned failure status.
HTTPInternalServerError (HTTP 500) (glance-registry.conf) (glance-api.conf) (api.log) (registry.log)

Error seems to be a mysql database error:

DBError: (ProgrammingError) (1146, "Table 'glance.images' doesn't exist")

First time user trying to install and setup openstack trial on Redhat 6.5. System was patched with latest updates. I am following docs step by step for Redhat install and ran into issues at this page:

Openstack RHEL doc ( ( )

Using this openrc file:

    export OS_USERNAME=admin
    export OS_PASSWORD=jdsu
    export OS_TENANT_NAME=admin
    export OS_AUTH_URL=http://ibm-bc5-51:35357/v2.0

Have tried this openrc file with same results:

export OS_USERNAME=glance
export OS_PASSWORD=glance
export OS_TENANT_NAME=service
export OS_AUTH_URL=http://ibm-bc5-51:35357/v2.0

Do not see authentication errors. I have destroyed the glance database in mysql and tried to recreate but this did not make any difference. Have read through all other questions about this same error and have found nothing that would fix it. Have tried "glance-manage db sync" several times with no effect.

Endpoint list:

| 6b02880336194cb59a0a532f5dc95ece | regionOne | http://ibm-bc5-51:5000/v2.0 | http://ibm-bc5-51:5000/v2.0 | http://ibm-bc5-51:35357/v2.0 | b5306b17f373421ba1a568f89cce6be5 |
| ca130eaf42f547b786f166f53e037772 | regionOne |    http://ibm-bc5-51:9292   |  http://ibm-bc5-51:9292   |    http://ibm-bc5-51:9292    | d73c70270c5f46228f60a1e8ec49b2fd |

Service list:

| d73c70270c5f46228f60a1e8ec49b2fd |  glance  |  image   | OpenStack Image Service |
| b5306b17f373421ba1a568f89cce6be5 | keystone | identity |    OpenStack Identity   |

netstat shows ports 9292 and 9191 listening so glance services seem to be running.

edit retag flag offensive close merge delete


As you said , that you had destroyed the glance database. After creating the glance database, did you put the access permission for glance service user 'glance' using the password 'glance'.


if yes, try to access the database using below command mysql -uglance -pglance -h ibm-bc5-51 -D glance

Ranjit gravatar imageRanjit ( 2014-05-02 03:14:38 -0500 )edit

2 answers

Sort by ยป oldest newest most voted

answered 2014-05-06 22:49:20 -0500

Hrushi gravatar image

Drop the glance database and set the character set to utf8 mysql -u root -e "CREATE DATABASE glance DEFAULT CHARACTER SET utf8";

then, do db sync

edit flag offensive delete link more


Thanks much!! This solved my issue. If this is necessary in the creation of the mysql database, I would like to suggest that this gets added to the online manual for installing glance:

By the way, isn't utf8 the default character set in mysql?

keiser gravatar imagekeiser ( 2014-05-07 09:27:57 -0500 )edit

Thank you! I ran into same issue, but I'm through. Anyway, here's bugzilla about it.

t.goto gravatar imaget.goto ( 2014-06-10 01:13:05 -0500 )edit

answered 2014-05-02 08:58:51 -0500

keiser gravatar image

updated 2014-05-06 16:23:13 -0500

I do have the following line in both /etc/glance/glance-api.conf and glance-registry.conf:


I executed your recommend command and saw no issues with the connection to mysql:

[root@ibm-bc5-51 ~]# mysql -uglance -pglance -h ibm-bc5-51 -D glance
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 266
Server version: 5.1.73 Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

| Tables_in_glance |
| migrate_version  |
1 row in set (0.00 sec)


From what I can find, I should be seeing something like this:

| Tables_in_glance |
| image_members |
| image_properties |
| image_tags |
| images |
| migrate_version |
5 rows in set (0.00 sec)

I'm assuming the glance-manage db_sync should be creating these rows in the database but it isn't. No issues with accessing the database, just can't get the initial setup created.

I also tried this command with the resulting error:

[root@ibm-bc5-51 ~]# echo "INSERT INTO images (created_at, updated_at, deleted_at, deleted, id, name, disk_format, container_format, size, status, is_public, location, checksum, min_disk, min_ram, owner, protected)  VALUES ('2013-01-18 17:00:00', '2013-01-18 17:00:00', NULL, 0, '53c06e6d-ced7-4ee0-9a92-acfc2d8219c7',  'tty-linux-kernel', 'aki', 'aki', 4404752, 'queued', 0, NULL, NULL, 0, 0, 'f9a70976a8064aceb3523191e03d8c1c', 0);" | mysql -uglance -pglance glance
ERROR 1146 (42S02) at line 1: Table 'glance.images' doesn't exist

Any ideas what I need to do to get the glance database setup for images?

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-05-01 14:10:56 -0500

Seen: 6,831 times

Last updated: May 07 '14