hi:i change the code by you ,but still get the error: 2016-12-29 05:14:24.367 2371 ERROR nova.virt.libvirt.host [req-9f0f7a12-5947-4d8d-be12-904376ab13cc f78cc871fb804d548b956ca8971dbf32 500ef1d3e27a410daad8075fd915087e - - -] Connection to libvirt failed: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Connection refused 2016-12-29 05:14:24.367 2371 ERROR nova.virt.libvirt.host Traceback (most recent call last): 2016-12-29 05:14:24.367 2371 ERROR nova.virt.libvirt.host File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/host.py", line 411, in get_connection 2016-12-29 05:14:24.367 2371 ERROR nova.virt.libvirt.host conn = self._get_connection() 2016-12-29 05:14:24.367 2371 ERROR nova.virt.libvirt.host File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/host.py", line 398, in _get_connection 2016-12-29 05:14:24.367 2371 ERROR nova.virt.libvirt.host wrapped_conn = self._get_new_connection() 2016-12-29 05:14:24.367 2371 ERROR nova.virt.libvirt.host File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/host.py", line 350, in _get_new_connection 2016-12-29 05:14:24.367 2371 ERROR nova.virt.libvirt.host wrapped_conn = self._connect(self._uri, self._read_only) 2016-12-29 05:14:24.367 2371 ERROR nova.virt.libvirt.host File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/host.py", line 204, in _connect 2016-12-29 05:14:24.367 2371 ERROR nova.virt.libvirt.host libvirt.openAuth, uri, auth, flags) 2016-12-29 05:14:24.367 2371 ERROR nova.virt.libvirt.host File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 144, in proxy_call 2016-12-29 05:14:24.367 2371 ERROR nova.virt.libvirt.host rv = execute(f, *args, **kwargs) 2016-12-29 05:14:24.367 2371 ERROR nova.virt.libvirt.host File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 125, in execute 2016-12-29 05:14:24.367 2371 ERROR nova.virt.libvirt.host six.reraise(c, e, tb) 2016-12-29 05:14:24.367 2371 ERROR nova.virt.libvirt.host File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 83, in tworker 2016-12-29 05:14:24.367 2371 ERROR nova.virt.libvirt.host rv = meth(*args, **kwargs) 2016-12-29 05:14:24.367 2371 ERROR nova.virt.libvirt.host File "/usr/lib64/python2.7/site-packages/libvirt.py", line 105, in openAuth 2016-12-29 05:14:24.367 2371 ERROR nova.virt.libvirt.host if ret is None:raise libvirtError('virConnectOpenAuth() failed') 2016-12-29 05:14:24.367 2371 ERROR nova.virt.libvirt.host libvirtError: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Connection refused 2016-12-29 05:14:24.367 2371 ERROR nova.virt.libvirt.host 2016-12-29 05:14:24.371 2371 WARNING nova.compute.manager [req-9f0f7a12-5947-4d8d-be12-904376ab13cc f78cc871fb804d548b956ca8971dbf32 500ef1d3e27a410daad8075fd915087e - - -] Could not clean up failed build, not rescheduling. Error: Connection to the hypervisor is broken on host: OS-N-Compute-1 2016-12-29 05:14:24.729 2371 ERROR nova.compute.manager [req-9f0f7a12-5947-4d8d-be12-904376ab13cc f78cc871fb804d548b956ca8971dbf32 500ef1d3e27a410daad8075fd915087e - - -] [instance: b40d05c9-5616-433b-9333-bca270f5873e] Build of instance b40d05c9-5616-433b-9333-bca270f5873e aborted: internal error: client socket is closed 2016-12-29 05:14:24.729 2371 ERROR nova.compute.manager [instance: b40d05c9-5616-433b-9333-bca270f5873e] Traceback (most recent call last): 2016-12-29 05:14:24.729 2371 ERROR nova.compute.manager [instance: b40d05c9-5616-433b-9333-bca270f5873e] File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 1779, in _do_build_and_run_instance 2016-12-29 05:14:24.729 2371 ERROR nova.compute.manager [instance: b40d05c9-5616-433b-9333-bca270f5873e] filter_properties) 2016-12-29 05:14:24.729 2371 ERROR nova.compute.manager [instance: b40d05c9-5616-433b-9333-bca270f5873e] File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 1939, in _build_and_run_instance 2016-12-29 05:14:24.729 2371 ERROR nova.compute.manager [instance: b40d05c9-5616-433b-9333-bca270f5873e] 'create.error', fault=e) 2016-12-29 05:14:24.729 2371 ERROR nova.compute.manager [instance: b40d05c9-5616-433b-9333-bca270f5873e] File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__ 2016-12-29 05:14:24.729 2371 ERROR nova.compute.manager [instance: b40d05c9-5616-433b-9333-bca270f5873e] self.force_reraise() 2016-12-29 05:14:24.729 2371 ERROR nova.compute.manager [instance: b40d05c9-5616-433b-9333-bca270f5873e] File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise 2016-12-29 05:14:24.729 2371 ERROR nova.compute.manager [instance: b40d05c9-5616-433b-9333-bca270f5873e] six.reraise(self.type_, self.value, self.tb) 2016-12-29 05:14:24.729 2371 ERROR nova.compute.manager [instance: b40d05c9-5616-433b-9333-bca270f5873e] File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 1923, in _build_and_run_instance 2016-12-29 05:14:24.729 2371 ERROR nova.compute.manager [instance: b40d05c9-5616-433b-9333-bca270f5873e] instance=instance) 2016-12-29 05:14:24.729 2371 ERROR nova.compute.manager [instance: b40d05c9-5616-433b-9333-bca270f5873e] File "/usr/lib64/python2.7/contextlib.py", line 35, in __exit__ 2016-12-29 05:14:24.729 2371 ERROR nova.compute.manager [instance: b40d05c9-5616-433b-9333-bca270f5873e] self.gen.throw(type, value, traceback) 2016-12-29 05:14:24.729 2371 ERROR nova.compute.manager [instance: b40d05c9-5616-433b-9333-bca270f5873e] File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2105, in _build_resources 2016-12-29 05:14:24.729 2371 ERROR nova.compute.manager [instance: b40d05c9-5616-433b-9333-bca270f5873e] reason=six.text_type(exc)) 2016-12-29 05:14:24.729 2371 ERROR nova.compute.manager [instance: b40d05c9-5616-433b-9333-bca270f5873e] BuildAbortException: Build of instance b40d05c9-5616-433b-9333-bca270f5873e aborted: internal error: client socket is closed 2016-12-29 05:14:24.729 2371 ERROR nova.compute.manager [instance: b40d05c9-5616-433b-9333-bca270f5873e]
hi:i change the code by you ,but still get the error: libvirt. host [req-9f0f7a12- 5947-4d8d- be12-904376ab13 cc f78cc871fb804d5 48b956ca8971dbf 32 500ef1d3e27a410 daad8075fd91508 7e - - -] Connection to libvirt failed: Failed to connect socket to '/var/run/ libvirt/ libvirt- sock': Connection refused libvirt. host Traceback (most recent call last): libvirt. host File "/usr/lib/ python2. 7/site- packages/ nova/virt/ libvirt/ host.py" , line 411, in get_connection libvirt. host conn = self._get_ connection( ) libvirt. host File "/usr/lib/ python2. 7/site- packages/ nova/virt/ libvirt/ host.py" , line 398, in _get_connection libvirt. host wrapped_conn = self._get_ new_connection( ) libvirt. host File "/usr/lib/ python2. 7/site- packages/ nova/virt/ libvirt/ host.py" , line 350, in _get_new_connection libvirt. host wrapped_conn = self._connect( self._uri, self._read_only) libvirt. host File "/usr/lib/ python2. 7/site- packages/ nova/virt/ libvirt/ host.py" , line 204, in _connect libvirt. host libvirt.openAuth, uri, auth, flags) libvirt. host File "/usr/lib/ python2. 7/site- packages/ eventlet/ tpool.py" , line 144, in proxy_call libvirt. host rv = execute(f, *args, **kwargs) libvirt. host File "/usr/lib/ python2. 7/site- packages/ eventlet/ tpool.py" , line 125, in execute libvirt. host six.reraise(c, e, tb) libvirt. host File "/usr/lib/ python2. 7/site- packages/ eventlet/ tpool.py" , line 83, in tworker libvirt. host rv = meth(*args, **kwargs) libvirt. host File "/usr/lib64/ python2. 7/site- packages/ libvirt. py", line 105, in openAuth libvirt. host if ret is None:raise libvirtError( 'virConnectOpen Auth() failed') libvirt. host libvirtError: Failed to connect socket to '/var/run/ libvirt/ libvirt- sock': Connection refused libvirt. host manager [req-9f0f7a12- 5947-4d8d- be12-904376ab13 cc f78cc871fb804d5 48b956ca8971dbf 32 500ef1d3e27a410 daad8075fd91508 7e - - -] Could not clean up failed build, not rescheduling. Error: Connection to the hypervisor is broken on host: OS-N-Compute-1 manager [req-9f0f7a12- 5947-4d8d- be12-904376ab13 cc f78cc871fb804d5 48b956ca8971dbf 32 500ef1d3e27a410 daad8075fd91508 7e - - -] [instance: b40d05c9- 5616-433b- 9333-bca270f587 3e] Build of instance b40d05c9- 5616-433b- 9333-bca270f587 3e aborted: internal error: client socket is closed manager [instance: b40d05c9- 5616-433b- 9333-bca270f587 3e] Traceback (most recent call last): manager [instance: b40d05c9- 5616-433b- 9333-bca270f587 3e] File "/usr/lib/ python2. 7/site- packages/ nova/compute/ manager. py", line 1779, in _do_build_ and_run_ instance manager [instance: b40d05c9- 5616-433b- 9333-bca270f587 3e] filter_properties) manager [instance: b40d05c9- 5616-433b- 9333-bca270f587 3e] File "/usr/lib/ python2. 7/site- packages/ nova/compute/ manager. py", line 1939, in _build_ and_run_ instance manager [instance: b40d05c9- 5616-433b- 9333-bca270f587 3e] 'create.error', fault=e) manager [instance: b40d05c9- 5616-433b- 9333-bca270f587 3e] File "/usr/lib/ python2. 7/site- packages/ oslo_utils/ excutils. py", line 220, in __exit__ manager [instance: b40d05c9- 5616-433b- 9333-bca270f587 3e] self.force_ reraise( ) manager [instance: b40d05c9- 5616-433b- 9333-bca270f587 3e] File "/usr/lib/ python2. 7/site- packages/ oslo_utils/ excutils. py", line 196, in force_reraise manager [instance: b40d05c9- 5616-433b- 9333-bca270f587 3e] six.reraise( self.type_ , self.value, self.tb) manager [instance: b40d05c9- 5616-433b- 9333-bca270f587 3e] File "/usr/lib/ python2. 7/site- packages/ nova/compute/ manager. py", line 1923, in _build_ and_run_ instance manager [instance: b40d05c9- 5616-433b- 9333-bca270f587 3e] instance=instance) manager [instance: b40d05c9- 5616-433b- 9333-bca270f587 3e] File "/usr/lib64/ python2. 7/contextlib. py", line 35, in __exit__ manager [instance: b40d05c9- 5616-433b- 9333-bca270f587 3e] self.gen. throw(type, value, traceback) manager [instance: b40d05c9- 5616-433b- 9333-bca270f587 3e] File "/usr/lib/ python2. 7/site- packages/ nova/compute/ manager. py", line 2105, in _build_resources manager [instance: b40d05c9- 5616-433b- 9333-bca270f587 3e] reason= six.text_ type(exc) ) manager [instance: b40d05c9- 5616-433b- 9333-bca270f587 3e] BuildAbortExcep tion: Build of instance b40d05c9- 5616-433b- 9333-bca270f587 3e aborted: internal error: client socket is closed manager [instance: b40d05c9- 5616-433b- 9333-bca270f587 3e]
2016-12-29 05:14:24.367 2371 ERROR nova.virt.
2016-12-29 05:14:24.367 2371 ERROR nova.virt.
2016-12-29 05:14:24.367 2371 ERROR nova.virt.
2016-12-29 05:14:24.367 2371 ERROR nova.virt.
2016-12-29 05:14:24.367 2371 ERROR nova.virt.
2016-12-29 05:14:24.367 2371 ERROR nova.virt.
2016-12-29 05:14:24.367 2371 ERROR nova.virt.
2016-12-29 05:14:24.367 2371 ERROR nova.virt.
2016-12-29 05:14:24.367 2371 ERROR nova.virt.
2016-12-29 05:14:24.367 2371 ERROR nova.virt.
2016-12-29 05:14:24.367 2371 ERROR nova.virt.
2016-12-29 05:14:24.367 2371 ERROR nova.virt.
2016-12-29 05:14:24.367 2371 ERROR nova.virt.
2016-12-29 05:14:24.367 2371 ERROR nova.virt.
2016-12-29 05:14:24.367 2371 ERROR nova.virt.
2016-12-29 05:14:24.367 2371 ERROR nova.virt.
2016-12-29 05:14:24.367 2371 ERROR nova.virt.
2016-12-29 05:14:24.367 2371 ERROR nova.virt.
2016-12-29 05:14:24.367 2371 ERROR nova.virt.
2016-12-29 05:14:24.367 2371 ERROR nova.virt.
2016-12-29 05:14:24.371 2371 WARNING nova.compute.
2016-12-29 05:14:24.729 2371 ERROR nova.compute.
2016-12-29 05:14:24.729 2371 ERROR nova.compute.
2016-12-29 05:14:24.729 2371 ERROR nova.compute.
2016-12-29 05:14:24.729 2371 ERROR nova.compute.
2016-12-29 05:14:24.729 2371 ERROR nova.compute.
2016-12-29 05:14:24.729 2371 ERROR nova.compute.
2016-12-29 05:14:24.729 2371 ERROR nova.compute.
2016-12-29 05:14:24.729 2371 ERROR nova.compute.
2016-12-29 05:14:24.729 2371 ERROR nova.compute.
2016-12-29 05:14:24.729 2371 ERROR nova.compute.
2016-12-29 05:14:24.729 2371 ERROR nova.compute.
2016-12-29 05:14:24.729 2371 ERROR nova.compute.
2016-12-29 05:14:24.729 2371 ERROR nova.compute.
2016-12-29 05:14:24.729 2371 ERROR nova.compute.
2016-12-29 05:14:24.729 2371 ERROR nova.compute.
2016-12-29 05:14:24.729 2371 ERROR nova.compute.
2016-12-29 05:14:24.729 2371 ERROR nova.compute.
2016-12-29 05:14:24.729 2371 ERROR nova.compute.