Ask Your Question
1

Getting 'HTTP 500' while creating image in Glance [closed]

asked 2014-09-15 02:15:09 -0500

updated 2014-09-17 05:54:37 -0500

Hi Experts,

I have configured Glance configuration step by step as per Openstack Officical Document. In the last step I am getting error while trying to create image.. Please guide to trouble shhot the error.

@control images]# grep ^[^#] /etc/glance/glance-api.conf
[DEFAULT]
[DEFAULT]
rpc_backend = qpid
qpid_hostname = control
[database]
connection = mysql://glance:labs123@control/glance
[keystone_authtoken]
auth_uri = http://control:5000
auth_host = control
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = glance
admin_password = labs123
[paste_deploy]
flavor = keystone
[store_type_location_strategy]

@control images]# grep ^[^#] /etc/glance/glance-registry.conf
[DEFAULT]
[database]
connection = mysql://glance:labs123@control/glance
[keystone_authtoken]
auth_uri = http://control:5000
auth_host = control
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = glance
admin_password = labs123
[paste_deploy]
flavor = keystone

Created glance service point..

-------+
|                id                |   region  |        publicurl         |       internalurl        |          adminurl         |            service_id            |
+----------------------------------+-----------+--------------------------+--------------------------+---------------------------+----------------------------------+
| 006f674412154aa4bf13a84bd05d1f26 | regionOne |   http://control:9292    |   http://control:9292    |    http://control:9292    | c3c6b999f5cf4dfc871019f3a8fd1e8a |
| 977ff0c49dec4cf6873804edf3fa6e34 | regionOne | http://control:5000/v2.0 | http://control:5000/v2.0 | http://control:35357/v2.0 | 808ee4f6b8944fc9895f5fa52ad2327f |
+----------------------------------+-----------+--------------------------+--------------------------+---------------------------+----------------------------------+

Still I am getting below error,, Please let me know is there any value se for enviroment..

@control images]# glance --debug image-create --name "cirros-0.3.2-x86_64" --disk-format qcow2 --container-format bare --is-public True --progress < cirros-0.3.2-x86_64-disk.img
curl -i -X POST -H 'x-image-meta-container_format: bare' -H 'Transfer-Encoding: chunked' -H 'User-Agent: python-glanceclient' -H 'x-image-meta-size: 13167616' -H 'x-image-meta-is_public: True' -H 'X-Auth-Token: MIIFpAYJKoZIhvc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XR5IiwgIm5hbWUiOiAia2V5c3RvbmUifV0sICJ1c2VyIjogeyJ1c2VybmFtZSI6ICJhZG1pbiIsICJyb2xlc19saW5rcyI6IFtdLCAiaWQiOiAiZmU0MTIyOWE0Njc4NDgyMGFkZGViZjg2ZjQ3M2VlM2IiLCAicm9sZXMiOiBbeyJuYW1lIjogImFkbWluIn1dLCAibmFtZSI6ICJhZG1pbiJ9LCAibWV0YWRhdGEiOiB7ImlzX2FkbWluIjogMCwgInJvbGVzIjogWyJjMmUwNWViOGRmODY0NmQ5OTQ0YWY1MGE0YmEwOThjNSJdfX19MYIBgTCCAX0CAQEwXDBXMQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVW5zZXQxDjAMBgNVBAcMBVVuc2V0MQ4wDAYDVQQKDAVVbnNldDEYMBYGA1UEAwwPd3d3LmV4YW1wbGUuY29tAgEBMAcGBSsOAwIaMA0GCSqGSIb3DQEBAQUABIIBADQFal6QU24fdXtXoNd2rbsPVMvuiwWJvtoHgOaTqA7jQpsojIfSzya+XArWLUykDZq6U3x5ZM8TS6tGtOFQkA7LAhXN6qtH3p7Tgpufsl0c+PYFtKxrDGLQYk+F69z4bxAxszYJqcopnMdn2RdEznDI0tLPZK1bvlXXrfv6owJEh-Lv6HFVUautkCukpzK07pDE+AIkU9o0KPxDTWp97LiNhxZgJj9ocGTuuqBFSKsQnD92i4kOopr2p7gq62FAfs7+CEo1gxcJ73nHxzM3fhbc2GkVNAkm6vi5MJkOenol2c0gZwxVXzKJdAUzWMEXstzPWisg1oH5D6tDYwO8PR0=' -H 'Content-Type: application/octet-stream' -H 'x-image-meta-disk_format: qcow2' -H 'x-image-meta-name: cirros-0.3.2-x86_64' -d '<glanceclient.common.progressbar.VerboseFileWrapper object at 0x274eb10>' http://control:9292/v1/images
[=============================>] 100%

HTTP/1.1 500 Internal Server Error
date: Mon, 15 Sep 2014 07:03:36 GMT
content-length: 0
content-type: text/plain
connection: close

Request returned failure status.
HTTPInternalServerError (HTTP 500)

I could see the below error while I am doing db_sync.. Please help me to guide the solution..

@control ~]# su -s /bin/sh -c "glance-manage db_sync" glance
/usr/lib64/python2.6/site-packages/Crypto/Util/number.py:57: PowmInsecureWarning: Not using mpz_powm_sec.  You should rebuild using libgmp >= 5 to avoid timing attack vulnerability.
  _warn("Not using mpz_powm_sec.  You should rebuild using libgmp >= 5 to avoid timing attack vulnerability.", PowmInsecureWarning)

==================================================================================================

As per my understood I belive something messed up in glance-api configuration file.. So I am sharing api log details and database details for glance. Please suggest me..

[root@control ~]# keystone user-list
+----------------------------------+--------+---------+-----------------+
|                id                |  name  | enabled |      email      |
+----------------------------------+--------+---------+-----------------+
| fe41229a46784820addebf86f473ee3b | admin  |   True  |  admin@labs.com |
| 7ffefa6f64de43679241fb2870966092 | glance |   True  | glance@labs.com |
+----------------------------------+--------+---------+-----------------+
[root@control ~]# keystone tenant-list
+----------------------------------+---------+---------+
|                id                |   name  | enabled |
+----------------------------------+---------+---------+
| f87792686f494a959c7c312ecba2f233 |  admin  |   True  |
| 720ddd2e5f2f4084ae810734cf00cf40 | service |   True  |
+----------------------------------+---------+---------+
[root@control ~]# keystone service-list
+----------------------------------+----------+----------+---------------------------+
|                id                |   name   |   type   |        description        |
+----------------------------------+----------+----------+---------------------------+
| c3c6b999f5cf4dfc871019f3a8fd1e8a |  glance  |  image   |  OpenStack Image Service  |
| d8c36ce1cdb544c098f8b3f5d9332d3f |  glance  |  image   |  OpenStack Image Service  |
| 808ee4f6b8944fc9895f5fa52ad2327f | keystone | identity | Keystone Identity Service |
+----------------------------------+----------+----------+---------------------------+

API LOG

@control ~]# tail /var/log/glance/api.log
2014-09-16 20:15:28.948 1643 WARNING glance.store.base [-] Failed to configure store correctly: Store swift could not be configured correctly. Reason: Could not find swift_store_auth_address in configuration options. Disabling add method.
2014-09-16 20:15:28.951 1643 WARNING glance.store [-] Deprecated: glance.store.swift.Store not found in `known_store`. Stores need to be explicitly enabled in the configuration file.
2014-09-16 20:15 ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Pradipta_OS_M
close date 2014-10-09 10:01:08.926494

3 answers

Sort by ยป oldest newest most voted
1

answered 2014-09-15 07:28:46 -0500

This quoted answer is given here.

The error is due to authorization, or the Connectivity of db. First see whether the glance-api and glance-registry services/daemons are running. If they are not please make them run using the command service glance-api restart and service glance-registry restart. If that doesnot work try this glance-manage version_control 0 and then glance-manage db_sync, this should get you going. see if this may be of some help to you.

edit flag offensive delete link more

Comments

1

The Glance API and registry deamon are running fine,, But I believe as u mentioned 'glance-manage db_sync'.. Let me try it,, I will update you on this..

Thank you for valuable update..

Pradipta_OS_M gravatar imagePradipta_OS_M ( 2014-09-15 07:33:39 -0500 )edit

I have update errors in db_sync,, but still getting error... Please guide for what are the process to fix the issue.

Pradipta_OS_M gravatar imagePradipta_OS_M ( 2014-09-15 15:03:47 -0500 )edit

check this link. it may help you to get through the time vulnerability error.

Syed Awais Ali gravatar imageSyed Awais Ali ( 2014-09-16 01:10:06 -0500 )edit

Hi Ali,

I have tried install all the step with provided link but getting same error.

I have updated additional investigation details in Query section ^^. I believe something I messed up in api conf file. Please have look and kindly suggest me.

Pradipta_OS_M gravatar imagePradipta_OS_M ( 2014-09-16 10:24:24 -0500 )edit
1

answered 2014-09-17 23:20:52 -0500

SGPJ gravatar image

Earlier I faced same issue in Fedora: I switched from MySQL to Maria DB and re-installed glance. That worked.

edit flag offensive delete link more
1

answered 2014-09-15 07:34:50 -0500

Anand TS gravatar image
edit flag offensive delete link more

Comments

Hi Anand, The issue is still not yet fixed, I have pasted updated issue details above query section. Please have a look into this and help me.

Pradipta_OS_M gravatar imagePradipta_OS_M ( 2014-09-15 07:44:56 -0500 )edit
1

Hi Pradip, Drop the DB for Glance and recreate it. sync the db and try. It that did nt work , you need to reinstall the Glance and reconfigured DB.

I got the same issue. Re-install got fix.

surisetty gravatar imagesurisetty ( 2014-09-17 02:44:01 -0500 )edit

Thank you for the suggestion, I have successfully configured after re install Glance..

Pradipta_OS_M gravatar imagePradipta_OS_M ( 2014-09-27 10:50:27 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-09-15 02:15:09 -0500

Seen: 3,472 times

Last updated: Sep 17 '14