nova connect to neutron failed

Asked by Bo Lin

I hit an internal service error when trying to launch a VM in OpenStack environment:
the Trace log is as following:
 from (pid=27765) http_log_req /opt/stack/python-neutronclient/neutronclient/common/utils.py:173
2014-03-14 18:09:27.803 DEBUG neutronclient.client [-] throwing ConnectionFailed : __init__() got an unexpected keyword argument 'set_nonblocking' from (pid=27765) _cs_request /opt/stack/python-neutronclient/neutronclient/client.py:153
2014-03-14 18:09:27.803 ERROR nova.api.openstack [req-d25cd369-1ac8-4fc5-baa3-73f8c24e10ff admin admin] Caught error: Connection to neutron failed: Maximum attempts reached
2014-03-14 18:09:27.803 TRACE nova.api.openstack Traceback (most recent call last):
2014-03-14 18:09:27.803 TRACE nova.api.openstack File "/opt/stack/nova/nova/api/openstack/__init__.py", line 125, in __call__
2014-03-14 18:09:27.803 TRACE nova.api.openstack return req.get_response(self.application)
2014-03-14 18:09:27.803 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1296, in send
2014-03-14 18:09:27.803 TRACE nova.api.openstack application, catch_exc_info=False)
2014-03-14 18:09:27.803 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1260, in call_application
2014-03-14 18:09:27.803 TRACE nova.api.openstack app_iter = application(self.environ, start_response)
2014-03-14 18:09:27.803 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
2014-03-14 18:09:27.803 TRACE nova.api.openstack return resp(environ, start_response)
2014-03-14 18:09:27.803 TRACE nova.api.openstack File "/opt/stack/python-keystoneclient/keystoneclient/middleware/auth_token.py", line 601, in __call__
2014-03-14 18:09:27.803 TRACE nova.api.openstack return self.app(env, start_response)
2014-03-14 18:09:27.803 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
2014-03-14 18:09:27.803 TRACE nova.api.openstack return resp(environ, start_response)
2014-03-14 18:09:27.803 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
2014-03-14 18:09:27.803 TRACE nova.api.openstack return resp(environ, start_response)
2014-03-14 18:09:27.803 TRACE nova.api.openstack File "/usr/lib/python2.7/dist-packages/routes/middleware.py", line 131, in __call__
2014-03-14 18:09:27.803 TRACE nova.api.openstack response = self.app(environ, start_response)
2014-03-14 18:09:27.803 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
2014-03-14 18:09:27.803 TRACE nova.api.openstack return resp(environ, start_response)
2014-03-14 18:09:27.803 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
2014-03-14 18:09:27.803 TRACE nova.api.openstack resp = self.call_func(req, *args, **self.kwargs)
2014-03-14 18:09:27.803 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
2014-03-14 18:09:27.803 TRACE nova.api.openstack return self.func(req, *args, **kwargs)
2014-03-14 18:09:27.803 TRACE nova.api.openstack File "/opt/stack/nova/nova/api/openstack/wsgi.py", line 917, in __call__
2014-03-14 18:09:27.803 TRACE nova.api.openstack content_type, body, accept)
2014-03-14 18:09:27.803 TRACE nova.api.openstack File "/opt/stack/nova/nova/api/openstack/wsgi.py", line 983, in _process_stack
2014-03-14 18:09:27.803 TRACE nova.api.openstack action_result = self.dispatch(meth, request, action_args)
2014-03-14 18:09:27.803 TRACE nova.api.openstack File "/opt/stack/nova/nova/api/openstack/wsgi.py", line 1070, in dispatch
2014-03-14 18:09:27.803 TRACE nova.api.openstack return method(req=request, **action_args)
2014-03-14 18:09:27.803 TRACE nova.api.openstack File "/opt/stack/nova/nova/api/openstack/compute/contrib/os_tenant_networks.py", line 97, in index
2014-03-14 18:09:27.803 TRACE nova.api.openstack networks = self.network_api.get_all(context)
2014-03-14 18:09:27.803 TRACE nova.api.openstack File "/opt/stack/nova/nova/network/neutronv2/api.py", line 734, in get_all
2014-03-14 18:09:27.803 TRACE nova.api.openstack networks = client.list_networks().get('networks')
2014-03-14 18:09:27.803 TRACE nova.api.openstack File "/opt/stack/python-neutronclient/neutronclient/v2_0/client.py", line 108, in with_params
2014-03-14 18:09:27.803 TRACE nova.api.openstack ret = self.function(instance, *args, **kwargs)
2014-03-14 18:09:27.803 TRACE nova.api.openstack File "/opt/stack/python-neutronclient/neutronclient/v2_0/client.py", line 333, in list_networks
2014-03-14 18:09:27.803 TRACE nova.api.openstack **_params)
2014-03-14 18:09:27.803 TRACE nova.api.openstack File "/opt/stack/python-neutronclient/neutronclient/v2_0/client.py", line 1271, in list
2014-03-14 18:09:27.803 TRACE nova.api.openstack for r in self._pagination(collection, path, **params):
2014-03-14 18:09:27.803 TRACE nova.api.openstack File "/opt/stack/python-neutronclient/neutronclient/v2_0/client.py", line 1284, in _pagination
2014-03-14 18:09:27.803 TRACE nova.api.openstack res = self.get(path, params=params)
2014-03-14 18:09:27.803 TRACE nova.api.openstack File "/opt/stack/python-neutronclient/neutronclient/v2_0/client.py", line 1257, in get
2014-03-14 18:09:27.803 TRACE nova.api.openstack headers=headers, params=params)
2014-03-14 18:09:27.803 TRACE nova.api.openstack File "/opt/stack/python-neutronclient/neutronclient/v2_0/client.py", line 1249, in retry_request
2014-03-14 18:09:27.803 TRACE nova.api.openstack raise exceptions.ConnectionFailed(reason=_("Maximum attempts reached"))
2014-03-14 18:09:27.803 TRACE nova.api.openstack ConnectionFailed: Connection to neutron failed: Maximum attempts reached
2014-03-14 18:09:27.803 TRACE nova.api.openstack

I think it maybe due to the debug info: "DEBUG neutronclient.client [-] throwing ConnectionFailed : __init__() got an unexpected keyword argument 'set_nonblocking' from (pid=27765) _cs_request /opt/stack/python-neutronclient/neutronclient/client.py:153", but have no idea how to debug the error.

Also #nova net-list would report the error error, while neutron net-list runs okay.

Question information

Language:
English Edit question
Status:
Solved
For:
devstack Edit question
Assignee:
No assignee Edit question
Solved by:
Bo Lin
Solved:
Last query:
Last reply:
Revision history for this message
Bo Lin (linb) said :
#1

I got the reason. It is due to my wrong proxy settings in localrc. Since my env is behind a proxy, so i set the "http_proxy" parameter which now I think is not necessary. It lead to nova connect the proxy first to connect neutron which is within the proxy and then lead to connection timeout. so I just clean the parameter and nova runs okay. It is also okay to add no_proxy prameter.