Ask Your Question
1

HTTP 500 Error when Creating a VM Instance - kilo

asked 2016-05-06 06:37:02 -0600

hercwey gravatar image

Hi,

I got HTTP 500 Error when creating an instance, and stuck for a few days. Please give me a hand, any advice will be appreciated. The log as bellow, it seems can not get the image details.

[root@controller ~]# glance image-list
+--------------------------------------+---------------------+
| ID                                   | Name                |
+--------------------------------------+---------------------+
| aa64cc18-c8db-489d-a463-9c67bec6dd8b | cirros              |
| 0077a9dc-4827-4011-9731-b7e5719e55d4 | cirros-0.3.4-x86_64 |
+--------------------------------------+---------------------+

[root@controller ~]# neutron net-list
+--------------------------------------+----------+--------------------------------------------------+
| id                                   | name     | subnets                                          |
+--------------------------------------+----------+--------------------------------------------------+
| 05aa8df1-beee-459c-86eb-3844cc3d5cd3 | ext-net  | 7f8dee80-18bb-468a-9739-933d00c699a5             |
| 1cd3fffe-e00d-4451-ae5a-63c62b7d7308 | demo-net | f7ec844d-3778-410c-9246-8bd77351d60f 10.4.1.0/24 |
+--------------------------------------+----------+--------------------------------------------------+

[root@controller ~]# neutron agent-list     
+--------------------------------------+--------------------+----------+-------+----------------+---------------------------+
| id                                   | agent_type         | host     | alive | admin_state_up | binary                    |
+--------------------------------------+--------------------+----------+-------+----------------+---------------------------+
| 82e0498f-2445-4cdb-a0c4-6c627484d4ab | Metadata agent     | network  | :-)   | True           | neutron-metadata-agent    |
| 848b56d2-6cdd-4d88-b9df-19746f7dc9b7 | L3 agent           | network  | :-)   | True           | neutron-l3-agent          |
| 94212715-d094-4846-9153-15436d69cd30 | Open vSwitch agent | network  | :-)   | True           | neutron-openvswitch-agent |
| c332097a-a2e7-4ab9-83ba-13283dc999e4 | Open vSwitch agent | compute1 | :-)   | True           | neutron-openvswitch-agent |
| da5b8c9d-4a3a-42b5-a8f1-f0a8e1978771 | DHCP agent         | network  | :-)   | True           | neutron-dhcp-agent        |
+--------------------------------------+--------------------+----------+-------+----------------+---------------------------+

[root@controller ~]# nova --debug boot --flavor m1.tiny --image cirros-0.3.4-x86_64 --nic net-id=1cd3fffe-e00d-4451-ae5a-63c62b7d7308  --security-group default --key-name demo-key demo-instance1
DEBUG (session:195) REQ: curl -g -i -X GET http://controller:5000/v3 -H "Accept: application/json" -H "User-Agent: python-keystoneclient"
INFO (connectionpool:213) Starting new HTTP connection (1): controller
DEBUG (connectionpool:393) "GET /v3 HTTP/1.1" 200 249
DEBUG (session:224) RESP: [200] Content-Length: 249 Vary: X-Auth-Token Keep-Alive: timeout=5, max=100 Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.1e-fips mod_fcgid/2.3.9 mod_wsgi/3.4 Python/2.7.5 Connection: Keep-Alive Date: Fri, 06 May 2016 10:03:48 GMT Content-Type: application/json x-openstack-request-id: req-7d28f12d-a7b8-463c-86c2-d46008e972e8 
RESP BODY: {"version": {"status": "stable", "updated": "2015-03-30T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}], "id": "v3.4", "links": [{"href": "http://controller:5000/v3/", "rel": "self"}]}}
DEBUG (base:171) Making authentication request to http://controller:5000/v3/auth/tokens
DEBUG (connectionpool:393) "POST /v3/auth/tokens HTTP/1.1" 201 4105
DEBUG (session:195) REQ: curl -g -i -X GET http://controller:8774/v2/d17b4ad81ee241a8bba4bb0dc2777d8c/images -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}de72d432a17a3b09c1cb741d1c7bd0888f00579f"
INFO (connectionpool:213) Starting new HTTP connection (1): controller
DEBUG (connectionpool:393) "GET /v2/d17b4ad81ee241a8bba4bb0dc2777d8c/images HTTP/1.1" 200 991
DEBUG (session:224) RESP: [200] Date: Fri, 06 May 2016 10:03:52 GMT Connection: keep-alive Content-Type: application/json Content-Length: 991 X-Compute-Request-Id: req-7efc2b62-2ece-4f3c-9f9c-418f035e4a02 
RESP BODY: {"images": [{"id": "aa64cc18-c8db-489d-a463-9c67bec6dd8b", "links": [{"href": "http://controller:8774/v2/d17b4ad81ee241a8bba4bb0dc2777d8c/images/aa64cc18-c8db-489d-a463-9c67bec6dd8b", "rel": "self"}, {"href": "http://controller:8774/d17b4ad81ee241a8bba4bb0dc2777d8c/images/aa64cc18-c8db-489d-a463-9c67bec6dd8b", "rel": "bookmark"}, {"href": "http://controller:9292/images/aa64cc18-c8db-489d-a463-9c67bec6dd8b", "type": "application/vnd.openstack.image", "rel": "alternate"}], "name": "cirros"}, {"id": "0077a9dc-4827-4011-9731-b7e5719e55d4", "links": [{"href": "http://controller:8774/v2/d17b4ad81ee241a8bba4bb0dc2777d8c/images/0077a9dc-4827-4011-9731-b7e5719e55d4", "rel": "self"}, {"href": "http://controller:8774/d17b4ad81ee241a8bba4bb0dc2777d8c/images/0077a9dc-4827-4011-9731-b7e5719e55d4", "rel": "bookmark"}, {"href": "http://controller:9292/images/0077a9dc-4827-4011-9731-b7e5719e55d4", "type": "application/vnd.openstack.image", "rel": "alternate"}], "name": "cirros-0.3.4-x86_64"}]}
200
True
DEBUG (session:195) REQ: curl -g -i -X GET http://controller:8774/v2/d17b4ad81ee241a8bba4bb0dc2777d8c/images/0077a9dc-4827-4011-9731-b7e5719e55d4 -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}de72d432a17a3b09c1cb741d1c7bd0888f00579f"
DEBUG (connectionpool:393) "GET /v2/d17b4ad81ee241a8bba4bb0dc2777d8c/images/0077a9dc-4827-4011-9731-b7e5719e55d4 HTTP/1.1" 500 128
DEBUG (session:224) RESP:
500
True
DEBUG (shell:914) The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-de3d2532-64c4-4121-8e68-20d89784de49)
Traceback (most recent call last):
  File "/usr/lib ...
(more)
edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted
2

answered 2016-06-29 08:56:21 -0600

jckreddy gravatar image
 Thanks guys i have also encountered with similar problem 
and this info helped me to find the solution and it got solved 

please find detailed steps/debug info.


[root@controller-node ~]# 
[root@controller-node ~]# nova --debug boot --flavor m1.tiny --image cirros-0.3.4-x86_64 --nic netid=3e1f50b7-4f07-4479-b4fd-2db23854f3bc --security-group default --key-name demo-key demo-instance1 
DEBUG (session:195) REQ: curl -g -i -X GET http://controller-node:5000/v3 -H "Accept: application/json" -H "User-Agent: python-keystoneclient"
INFO (connectionpool:213) Starting new HTTP connection (1): controller-node
DEBUG (connectionpool:395) "GET /v3 HTTP/1.1" 200 253
DEBUG (session:224) RESP: [200] Date: Wed, 05 Jan 2000 06:46:34 GMT Server: Apache/2.4.6 (CentOS) mod_wsgi/3.4 Python/2.7.5 Vary: X-Auth-Token x-openstack-request-id: req-3b76f610-d971-46e4-b90c-dc971d57ee90 Content-Length: 253 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: application/json 
RESP BODY: {"version": {"status": "stable", "updated": "2015-03-30T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}], "id": "v3.4", "links": [{"href": "http://controller-node:5000/v3/", "rel": "self"}]}}

DEBUG (base:171) Making authentication request to http://controller-node:5000/v3/auth/tokens
DEBUG (connectionpool:395) "POST /v3/auth/tokens HTTP/1.1" 201 4177
DEBUG (session:195) REQ: curl -g -i -X GET http://controller-node:8774/v2/3cd53bc659334d1f84a72002a9f9159a/images -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}81f4ad5ac15259cd379cee7909d3c50b880a6fc1"
INFO (connectionpool:213) Starting new HTTP connection (1): controller-node
DEBUG (connectionpool:395) "GET /v2/3cd53bc659334d1f84a72002a9f9159a/images HTTP/1.1" 200 520
DEBUG (session:224) RESP: [200] Content-Type: application/json Content-Length: 520 X-Compute-Request-Id: req-d7e22a4c-d5f0-461c-8c61-08efb8525a83 Date: Wed, 05 Jan 2000 06:46:35 GMT Connection: keep-alive 
RESP BODY: {"images": [{"id": "128ddb4e-73b9-4f79-841c-ca327376594e", "links": [{"href": "http://controller-node:8774/v2/3cd53bc659334d1f84a72002a9f9159a/images/128ddb4e-73b9-4f79-841c-ca327376594e", "rel": "self"}, {"href": "http://controller-node:8774/3cd53bc659334d1f84a72002a9f9159a/images/128ddb4e-73b9-4f79-841c-ca327376594e", "rel": "bookmark"}, {"href": "http://controller-node:9292/images/128ddb4e-73b9-4f79-841c-ca327376594e", "type": "application/vnd.openstack.image", "rel": "alternate"}], "name": "cirros-0.3.4-x86_64"}]}

DEBUG (session:195) REQ: curl -g -i -X GET http://controller-node:8774/v2/3cd53bc659334d1f84a72002a9f9159a/images/128ddb4e-73b9-4f79-841c-ca327376594e -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}81f4ad5ac15259cd379cee7909d3c50b880a6fc1"
DEBUG (connectionpool:395) "GET /v2/3cd53bc659334d1f84a72002a9f9159a/images/128ddb4e-73b9-4f79-841c-ca327376594e HTTP/1.1" 500 128
DEBUG (session:224) RESP:
DEBUG (shell:914) The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-4562c62c-d003-4198-95d4-7a64239628f9)
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/novaclient/shell.py", line 911, in main
    OpenStackComputeShell().main(argv)
  File "/usr/lib/python2.7/site-packages/novaclient/shell.py", line 838, in main
    args.func(self.cs, args)
  File "/usr/lib/python2.7/site-packages/novaclient/v2/shell.py", line 495, in do_boot
    boot_args, boot_kwargs = _boot(cs, args)
  File "/usr/lib/python2.7/site-packages/novaclient/v2/shell.py", line 142, in _boot
    image = _find_image(cs, args.image)
  File "/usr/lib/python2.7/site-packages/novaclient/v2/shell.py", line 1894, in _find_image
    return utils.find_resource(cs.images, image)
  File "/usr/lib/python2.7/site-packages/novaclient/utils.py", line 216, in find_resource
    return manager.find(**kwargs)
  File "/usr/lib/python2.7/site-packages/novaclient/base.py", line 196, in find
    matches = self.findall(**kwargs)
  File "/usr/lib/python2.7/site-packages ...
(more)
edit flag offensive delete link more
1

answered 2016-06-14 19:19:53 -0600

tahder gravatar image

updated 2016-06-14 19:30:46 -0600

Check glance version via cli:

glance --version

if it is 0.17.0 it is affected with the bug below.

A simple test of this, if you click glance image you will get an error or via cli:

glance image-list glance image-show <id>

to get rid of this error you can use

glance --os-image-api-version 2 image-show <id>

It is related to the bug https://bugs.launchpad.net/python-gla... and https://bugs.launchpad.net/glance/+bu...

the solutions was to download a python-glanceclient from a liberty..

wget http://mirror.centos.org/centos/7/clo... rpm -Uvh python-glanceclient-1.1.0-1.el7.noarch.rpm

Afterwards try to restart your glance-services, webserver, and your nova-services. Or try to reboot your controller node to do it.

edit flag offensive delete link more

Comments

Hi tahder, thx for your info, but the command glance image-show can get correct output on my env.

hercwey gravatar imagehercwey ( 2016-06-21 14:34:39 -0600 )edit

This request got http 500 while launching an instance "DEBUG (connectionpool:393) "GET /v2/d17b4ad81ee241a8bba4bb0dc2777d8c/images/0077a9dc-4827-4011-9731-b7e5719e55d4 HTTP/1.1" 500"

hercwey gravatar imagehercwey ( 2016-06-21 14:37:14 -0600 )edit
1

answered 2016-06-22 01:29:41 -0600

hercwey gravatar image

Thanks guys, I find the root cause. It is a bug of kilo release. I changed the python source codes and reboot the server, after that the instance was successfully launched. Please refer to https://review.openstack.org/#/c/244899/

edit flag offensive delete link more
0

answered 2016-07-02 12:25:38 -0600

os_newbie gravatar image

I faced the same issue. I install python-glance-client from liberty and it helped me. If reboot is not preferred, then Restart of networks services also required in controller and compute for it to come up. Dashboard also failed. restart dashboard services too.

It would be better if the error can give more description like some issue in glance etc.. Instead it was reporting as the server is either erred or incable of performing.

I installed openstack kilo version in 2015 end and did not see this issue. I guess some packages were updated and they have some issue. Old packages seems to be fine in kilo.

edit flag offensive delete link more

Comments

Thanks for the solution, glance is buggy in kilo.

soumitrakarmakar gravatar imagesoumitrakarmakar ( 2016-07-13 01:15:52 -0600 )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

2 followers

Stats

Asked: 2016-05-06 05:10:13 -0600

Seen: 1,582 times

Last updated: Jul 02 '16