Ask Your Question
1

Can't Create Instance - Unable to Establish Connection to 127.0.0.1:9696

asked 2016-04-23 17:22:19 -0500

elliotp gravatar image

updated 2016-04-29 08:59:57 -0500

I've setup OpenStack for the first time to start learning. I've followed the installation guide and i believe i've got everything correct. However, when trying to create an instance i get the error:

Build of instance e948205a-2287-4b0e-9829-f2c6fe3a93eb aborted: Unable to establish connection to http://127.0.0.1:9696/v2.0/extensions.json (http://127.0.0.1:9696/v2.0/extensions...)

From what I understand this is the api request to Neutron. Neutron is running on the controller and it's listening:

netstat -ln | grep 9696 tcp 0
0 0.0.0.0:9696 0.0.0.0:*
LISTEN

What I don't understand, and I'm not sure if this is part of the problem, is that it should be looking for http://controller:9696/v2.0/extensions.json (http://controller:9696/v2.0/extension...) rather than 127.0.0.1? I don't know if this is being run from the compute node and therefore won't find it on localhost. I've checked all configs for mentions of 127.0.0.1 but can't find it, and I've checked the api endpoints in the Keystone database. I've also rebooted both controller and compute node. My other assumption is that I have an auth problem, but I don't know how to identify this.

My neutron api endpoints:

| 440735e5dd8d468e89de9a8077ea9491 | RegionOne | neutron      | network      | True    | public    | http://controller:9696                    |
| 5985d944b02b4148a87cafae8df006c8 | RegionOne | neutron      | network      | True    | internal  | http://controller:9696                    |

I've checked all of the Nova and Neutron logs, and i can't see any errors in there so I'm at a loss how to continue debugging.

Update: Further debugging and testing is showing i can authenticate and get a response from neutron manually with the curl test below, this responds with expected data.

curl -i -H'X-Auth-Token: MY_TOKEN' http://controller:9696/v2.0/extensions.json

I now have debug info in the create error:

| {u'message': u'Build of instance 3e2f5678-6a4a-478b-8953-d10db929d367 aborted: Unable to establish connection to http://127.0.0.1:9696/v2.0/extensions.json', u'code': 500, u'details': u'  File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1926, in _do_build_and_run_instance\n    filter_properties)\n  File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2083, in _build_and_run_instance\n    \'create.error\', fault=e)\n  File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__\n    self.force_reraise()\n  File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise\n    six.reraise(self.type_, self.value, self.tb)\n  File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2067, in _build_and_run_instance\n    instance=instance)\n  File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__\n    self.gen.throw(type, value, traceback)\n  File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2244, in _build_resources\n    reason=six.text_type(exc))\n', u'created': u'2016-04-29T13:56:55Z'} |
edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2016-06-08 10:50:12 -0500

hiddenengine gravatar image

Had the same problem. Turned out to be missing the [neutron] section in /etc/nova/nova.conf so it was using the defaults (which assume localhost).

edit flag offensive delete link more
1

answered 2016-04-29 15:47:23 -0500

elliotp gravatar image

Resolved by re-imaging and reinstalling - no idea what this problem was, and i don't think i ever will!

edit flag offensive delete link more

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-04-23 17:12:23 -0500

Seen: 2,865 times

Last updated: Apr 29 '16