Ask Your Question
1

Create Instance but the status is ERROR

asked 2017-07-12 08:08:38 -0500

chasingw gravatar image

updated 2017-07-13 09:32:50 -0500

Hi Guys, I just installed the 2 nodes (controller0 and compute1) by following the guide lines: https://docs.openstack.org/ocata/install-guide-ubuntu

After the installaton is done, I tried to create an instance but the instance's status is ERROR

➜  ~ export OS_PROJECT_DOMAIN_NAME=Default
export OS_USER_DOMAIN_NAME=Default
export OS_PROJECT_NAME=demo
export OS_USERNAME=demo
export OS_PASSWORD=sti123
export OS_AUTH_URL=http://controller0:5000/v3
export OS_IDENTITY_API_VERSION=3
export OS_IMAGE_API_VERSION=2
➜  ~ openstack flavor list
+--------------------------------------+---------+------+------+-----------+-------+-----------+
| ID                                   | Name    |  RAM | Disk | Ephemeral | VCPUs | Is Public |
+--------------------------------------+---------+------+------+-----------+-------+-----------+
| 0                                    | m1.nano |   64 |    1 |         0 |     1 | True      |
+--------------------------------------+---------+------+------+-----------+-------+-----------+
➜  ~ openstack image list
+--------------------------------------+--------+--------+
| ID                                   | Name   | Status |
+--------------------------------------+--------+--------+
| 63c72412-37ef-4848-bbd0-1126d7e194a6 | cirros | active |
+--------------------------------------+--------+--------+
➜  ~ openstack network list
+--------------------------------------+-------------+--------------------------------------+
| ID                                   | Name        | Subnets                              |
+--------------------------------------+-------------+--------------------------------------+
| 3db8b501-dfe3-446f-ad9d-79e477979ae9 | selfservice | 97fc3069-5334-4229-9343-a8673bbabedf |
| b53842eb-706a-40ad-b45e-6432581d9caf | provider    | 41fb9831-046e-4a20-b9fe-6ed3bf860a67 |
+--------------------------------------+-------------+--------------------------------------+
➜  ~ openstack security group list
+--------------------------------------+---------+------------------------+---------+
| ID                                   | Name    | Description            | Project |
+--------------------------------------+---------+------------------------+---------+
| d2cdd76b-4cd5-45cc-87c7-b62783afd3e8 | default | Default security group |         |
+--------------------------------------+---------+------------------------+---------+
➜  ~ openstack server create --flavor m1.nano --image cirros \
  --nic net-id=3db8b501-dfe3-446f-ad9d-79e477979ae9 --security-group default \
  --key-name mykey selfservice-instance
+-----------------------------+-----------------------------------------------+
| Field                       | Value                                         |
+-----------------------------+-----------------------------------------------+
| OS-DCF:diskConfig           | MANUAL                                        |
| OS-EXT-AZ:availability_zone |                                               |
| OS-EXT-STS:power_state      | NOSTATE                                       |
| OS-EXT-STS:task_state       | scheduling                                    |
| OS-EXT-STS:vm_state         | building                                      |
| OS-SRV-USG:launched_at      | None                                          |
| OS-SRV-USG:terminated_at    | None                                          |
| accessIPv4                  |                                               |
| accessIPv6                  |                                               |
| addresses                   |                                               |
| adminPass                   | ivE3C4YZ2MGw                                  |
| config_drive                |                                               |
| created                     | 2017-07-12T11:57:48Z                          |
| flavor                      | m1.nano (0)                                   |
| hostId                      |                                               |
| id                          | f67cbd04-c886-4330-9c51-9ac11053cd18          |
| image                       | cirros (63c72412-37ef-4848-bbd0-1126d7e194a6) |
| key_name                    | mykey                                         |
| name                        | selfservice-instance                          |
| progress                    | 0                                             |
| project_id                  | fd72790d334f4f8eb97ed7edb54a034f              |
| properties                  |                                               |
| security_groups             | name='default'                                |
| status                      | BUILD                                         |
| updated                     | 2017-07-12T11:57:49Z                          |
| user_id                     | 0cddb04429904a78ba0c679aba2771c8              |
| volumes_attached            |                                               |
+-----------------------------+-----------------------------------------------+
➜  ~ openstack server list
+--------------------------------------+----------------------+--------+----------+------------+
| ID                                   | Name                 | Status | Networks | Image Name |
+--------------------------------------+----------------------+--------+----------+------------+
| f67cbd04-c886-4330-9c51-9ac11053cd18 | selfservice-instance | ERROR  |          | cirros     |
+--------------------------------------+----------------------+--------+----------+------------+

the nova-compute.log in my compute node.

2017-07-12 19:57:51.859 6576 ERROR nova.compute.manager [req-63e188c8-3655-4965-b5f3-e3208b4851db 0cddb04429904a78ba0c679aba2771c8 fd72790d334f4f8eb97ed7edb54a034f - - -] [instance: f67cbd04-c886-4330-9c51-9ac11053cd18] Failed to deallocate network for instance. Error: Unable to establish connection to http://127.0.0.1:9696/v2.0/ports.json?device_id=f67cbd04-c886-4330-9c51-9ac11053cd18: HTTPConnectionPool(host='127.0.0.1', port=9696): Max retries exceeded with url: /v2.0/ports.json?device_id=f67cbd04-c886-4330-9c51-9ac11053cd18 (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7ff8440453d0>: Failed to establish a new connection: [Errno 111] ECONNREFUSED',))
2017-07-12 19:57:51.974 6576 WARNING nova.compute.manager [req-63e188c8-3655-4965-b5f3-e3208b4851db 0cddb04429904a78ba0c679aba2771c8 fd72790d334f4f8eb97ed7edb54a034f - - -] Could not clean up failed build, not rescheduling. Error: Unable to establish connection to http://127.0.0.1:9696/v2.0/ports.json?device_id=f67cbd04-c886-4330-9c51-9ac11053cd18: HTTPConnectionPool(host='127.0.0.1', port=9696): Max retries exceeded with url: /v2.0/ports.json?device_id=f67cbd04-c886-4330-9c51-9ac11053cd18 (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7ff8440453d0>: Failed to establish a new connection: [Errno 111] ECONNREFUSED',))
2017-07-12 19:57:52.027 6576 INFO nova.scheduler.client.report [req-63e188c8-3655-4965-b5f3-e3208b4851db 0cddb04429904a78ba0c679aba2771c8 fd72790d334f4f8eb97ed7edb54a034f - - -] Deleted allocation for instance f67cbd04-c886-4330-9c51-9ac11053cd18
2017-07-12 19:57:52.215 6576 ERROR nova.compute.manager [req-63e188c8-3655-4965-b5f3-e3208b4851db 0cddb04429904a78ba0c679aba2771c8 fd72790d334f4f8eb97ed7edb54a034f - - -] [instance: f67cbd04-c886-4330-9c51-9ac11053cd18] Build of instance f67cbd04-c886-4330-9c51-9ac11053cd18 aborted: Unable to establish connection to http://127.0.0.1:9696/v2.0/networks.json?id=3db8b501-dfe3-446f-ad9d-79e477979ae9: HTTPConnectionPool(host='127.0.0.1', port=9696): Max retries exceeded with url: /v2.0/networks.json?id=3db8b501-dfe3-446f-ad9d-79e477979ae9 (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7ff844154a50>: Failed to establish a new connection: [Errno 111] ECONNREFUSED',))
2017-07-12 19:57:52.215 6576 ERROR nova.compute.manager [instance: f67cbd04-c886-4330-9c51-9ac11053cd18] Traceback (most recent call last):
2017-07-12 19:57:52.215 6576 ERROR nova.compute.manager [instance: f67cbd04-c886-4330-9c51-9ac11053cd18]   File ...
(more)
edit retag flag offensive close merge delete

Comments

seems like there is some problem during IP allocation to your instance..Please share the neutron server logs.

Praveen N gravatar imagePraveen N ( 2017-07-13 00:38:43 -0500 )edit

2 answers

Sort by » oldest newest most voted
1

answered 2017-07-13 02:12:50 -0500

Bernd Bausch gravatar image

updated 2017-07-13 02:13:33 -0500

nova-compute on the compute node tries to access the Neutron server, which uses port 9696. This fails for this reason:

Unable to establish connection to http://127.0.0.1:9696.....

It seems to me that you misconfigured the endpoints for Neutron, using 127.0.0.1 instead of the controller's name or address. Run openstack endpoint list to check. Delete and recreate the endpoints if you see they are wrong.

edit flag offensive delete link more

Comments

I check by openstack endpoint list and it seems nothing wrong.I reedit my question and the endpoint list is in the above.

chasingw gravatar imagechasingw ( 2017-07-13 02:36:52 -0500 )edit

hi chasingw, please share the output of file /etc/hosts

Praveen N gravatar imagePraveen N ( 2017-07-13 02:39:59 -0500 )edit
0

answered 2017-07-13 02:05:44 -0500

chasingw gravatar image

updated 2017-07-13 03:13:12 -0500

hi @Praveen N, I create an instance in the same way again and the instance's status is still ERROR. I check the neutron-server.log in my controller node, but it seems to have no useful info.

2017-07-13 14:12:16.006 2746 INFO neutron.wsgi [-] 192.168.1.189 - - [13/Jul/2017 14:12:16] "GET / HTTP/1.1" 200 268 0.000487
2017-07-13 14:12:16.091 2746 INFO neutron.wsgi [req-31d2b130-dfd8-4d8c-8dbd-023774291ec6 0cddb04429904a78ba0c679aba2771c8 fd72790d334f4f8eb97ed7edb54a034f - - -] 192.168.1.189 - - [13/Jul/2017 14:12:16] "GET /v2.0/networks/b53842eb-706a-40ad-b45e-6432581d9caf HTTP/1.1" 200 828 0.082873
2017-07-13 14:12:16.691 2747 INFO neutron.wsgi [req-76495d09-72df-42ac-a04f-2ade4a08fd63 0cddb04429904a78ba0c679aba2771c8 fd72790d334f4f8eb97ed7edb54a034f - - -] 192.168.1.189 - - [13/Jul/2017 14:12:16] "GET /v2.0/networks.json?id=b53842eb-706a-40ad-b45e-6432581d9caf HTTP/1.1" 200 831 0.445510
2017-07-13 14:12:16.700 2747 INFO neutron.wsgi [req-c8e879ef-7927-4dbf-8568-e8e01a92d72f 0cddb04429904a78ba0c679aba2771c8 fd72790d334f4f8eb97ed7edb54a034f - - -] 192.168.1.189 - - [13/Jul/2017 14:12:16] "GET /v2.0/quotas/fd72790d334f4f8eb97ed7edb54a034f.json HTTP/1.1" 200 370 0.007344
2017-07-13 14:12:16.753 2747 INFO neutron.wsgi [req-77ea0c9b-ae9d-46cd-abcd-2a0efba77d0c 0cddb04429904a78ba0c679aba2771c8 fd72790d334f4f8eb97ed7edb54a034f - - -] 192.168.1.189 - - [13/Jul/2017 14:12:16] "GET /v2.0/ports.json?fields=id&tenant_id=fd72790d334f4f8eb97ed7edb54a034f HTTP/1.1" 200 306 0.050839
2017-07-13 14:12:17.335 2747 INFO neutron.wsgi [req-bb5b6daf-b783-4166-9521-054be16c8cf4 0cddb04429904a78ba0c679aba2771c8 fd72790d334f4f8eb97ed7edb54a034f - - -] 192.168.1.189 - - [13/Jul/2017 14:12:17] "GET /v2.0/ports.json?device_id=2c5b4992-5c99-4ef0-87b5-02f10a25b2f2 HTTP/1.1" 200 211 0.037188
2017-07-13 14:12:41.309 2747 INFO neutron.wsgi [req-f202c0f4-70fe-4b20-8e12-a9b1494cbbd9 0cddb04429904a78ba0c679aba2771c8 fd72790d334f4f8eb97ed7edb54a034f - - -] 192.168.1.189 - - [13/Jul/2017 14:12:41] "GET /v2.0/ports.json?device_id=2c5b4992-5c99-4ef0-87b5-02f10a25b2f2&device_id=51703f46-1fb6-4d39-84db-58b4992cb78d&device_id=f67cbd04-c886-4330-9c51-9ac11053cd18 HTTP/1.1" 200 211 0.025081
2017-07-13 14:15:40.269 2747 INFO neutron.wsgi [req-10f855cb-1a6a-4226-bdb9-a933076468ac 0cddb04429904a78ba0c679aba2771c8 fd72790d334f4f8eb97ed7edb54a034f - - -] 192.168.1.189 - - [13/Jul/2017 14:15:40] "GET /v2.0/ports.json?device_id=2c5b4992-5c99-4ef0-87b5-02f10a25b2f2&device_id=51703f46-1fb6-4d39-84db-58b4992cb78d&device_id=f67cbd04-c886-4330-9c51-9ac11053cd18 HTTP/1.1" 200 211 0.028265
2017-07-13 14:21:43.161 2747 INFO neutron.wsgi [req-0393a65f-0fde-41a6-93b4-f6f3df03e4db 0cddb04429904a78ba0c679aba2771c8 fd72790d334f4f8eb97ed7edb54a034f - - -] 192.168.1.189 - - [13/Jul/2017 14:21:43] "GET /v2.0/ports.json?device_id=2c5b4992-5c99-4ef0-87b5-02f10a25b2f2 HTTP/1.1" 200 211 0.145171

I solved this problem by edit /etc/nova/nova.conf file in my compute node( In the [neutron] section, configure access parameters.) just a stupid mistake. thanks for your help @Praveen N @bernd-bausch

edit flag offensive delete link more

Comments

Hi, Nova compute is not able to communicate with neutron (uses port 9696). check all the neutron related logs. I assume you have ovs for L2. Verify the neutron config. Restart rabbitmq server and ensure dnsmasq service is up and check its logs. (Verify the output of ip netns command )

Praveen N gravatar imagePraveen N ( 2017-07-13 02:31:31 -0500 )edit

As Bernd Baush suggested, do verify the endpoints too. Since you have separate compute node the neutron endpoints should have the controller IP not the 127.0.0.1. Also give try once with different flavor. --Regards Praveen

Praveen N gravatar imagePraveen N ( 2017-07-13 02:33:38 -0500 )edit

Hey folks,i am facing similar issue but i tried with nova-status upgrade check, its working properly. Can you please go through the question/query raised and help me out Question raised:- Ocata Ubuntu 16.04 Openstack installation: Getting manager creation issue in neutron while launching an instance

Ruchir Nerurkar gravatar imageRuchir Nerurkar ( 2017-07-26 19:11:32 -0500 )edit

@Praveen N, please help me out with the similar issue.

https://ask.openstack.org/en/question/109191/imp-ocata-ubuntu-1604-openstack-installation-no-valid-host-was-found-there-are-not-enough-hosts-available/ (link text)

Refer to the above link shared by me as i have created my query here..Plz help

Ruchir Nerurkar gravatar imageRuchir Nerurkar ( 2017-07-28 13:34:36 -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: 2017-07-12 08:08:38 -0500

Seen: 125 times

Last updated: Jul 13