[libvirt-users] Error connecting to hypervisor

Hi, I have compiled and installed libvirt from git checkout and started libvirtd service. The version is 5.3.0 and I have done system-wide installation. When I do a `virsh list`, I get the following error: error: failed to connect to the hypervisor error: Unable to encode message header Similarly, the libvirtd instance shows the following error: 2019-04-23 21:36:57.777+0000: 1807: info : libvirt version: 5.3.0 2019-04-23 21:36:57.777+0000: 1807: info : hostname: dell 2019-04-23 21:36:57.777+0000: 1807: error : virNetSocketReadWire:1803 : End of file while reading data: Input/output error Furthermore, virnetmessagetest show the following error: $ VIR_TEST_DEBUG=1 ./virnetmessagetest TEST: virnetmessagetest 1) Message Header Encode ... libvirt: XML-RPC error : Unable to encode message header FAILED 2) Message Header Decode ... libvirt: XML-RPC error : Unable to decode message length FAILED 3) Message Payload Encode ... libvirt: XML-RPC error : Unable to encode message header FAILED 4) Message Payload Decode ... libvirt: XML-RPC error : Unable to decode message length FAILED 5) Message Payload Stream Encode ... libvirt: XML-RPC error : Unable to encode message header FAILED I am also compiling qemu from source and the virsh commands ran fine when I was using libvirt 4.7.0 from Fedora repository. Any ideas how I can solve this issue? Thanks, Sukrit

On 4/23/19 11:56 PM, Sukrit Bhatnagar wrote:
Hi,
I have compiled and installed libvirt from git checkout and started libvirtd service. The version is 5.3.0 and I have done system-wide installation.
When I do a `virsh list`, I get the following error: error: failed to connect to the hypervisor error: Unable to encode message header
This is very suspicious. The error is reported because the function that is generated by rpcgen and supposed to encode messages failed. Looks like rpcgen generated some unusable code? What's your rpcgen? I have glibc-rpcgen-2.26.9000-41.fc28.x86_64 and everything's working for me. BTW if you try compiling from 5.2.0 tarball the error should go away because we ship generated sources in there. Michal

On Sat, 27 Apr 2019 at 12:53, Michal Prívozník <mprivozn@redhat.com> wrote:
On 4/23/19 11:56 PM, Sukrit Bhatnagar wrote:
Hi,
I have compiled and installed libvirt from git checkout and started libvirtd service. The version is 5.3.0 and I have done system-wide installation.
When I do a `virsh list`, I get the following error: error: failed to connect to the hypervisor error: Unable to encode message header
This is very suspicious. The error is reported because the function that is generated by rpcgen and supposed to encode messages failed. Looks like rpcgen generated some unusable code? What's your rpcgen? I have
glibc-rpcgen-2.26.9000-41.fc28.x86_64
and everything's working for me. BTW if you try compiling from 5.2.0 tarball the error should go away because we ship generated sources in there.
I am using Fedora 29 and glibc-rpcgen is not available. I have these packages installed for rpc: rpcgen-1.4-1.fc29.x86_64 (rpcsvc-proto) libtirpc-1.1.4-2.rc2.fc29.x86_64 libtirpc-devel-1.1.4-2.rc2.fc29.x86_64 I have tried using libvirt 5.2.0 form tarball but the same error is there.
Michal

On 4/29/19 2:48 PM, Sukrit Bhatnagar wrote:
On Sat, 27 Apr 2019 at 12:53, Michal Prívozník <mprivozn@redhat.com> wrote:
On 4/23/19 11:56 PM, Sukrit Bhatnagar wrote:
Hi,
I have compiled and installed libvirt from git checkout and started libvirtd service. The version is 5.3.0 and I have done system-wide installation.
When I do a `virsh list`, I get the following error: error: failed to connect to the hypervisor error: Unable to encode message header
This is very suspicious. The error is reported because the function that is generated by rpcgen and supposed to encode messages failed. Looks like rpcgen generated some unusable code? What's your rpcgen? I have
glibc-rpcgen-2.26.9000-41.fc28.x86_64
and everything's working for me. BTW if you try compiling from 5.2.0 tarball the error should go away because we ship generated sources in there.
I am using Fedora 29 and glibc-rpcgen is not available. I have these packages installed for rpc: rpcgen-1.4-1.fc29.x86_64 (rpcsvc-proto) libtirpc-1.1.4-2.rc2.fc29.x86_64 libtirpc-devel-1.1.4-2.rc2.fc29.x86_64
Ah, looks like libtirpc bug then. Can you please get a stack trace and open a bug? Michal
participants (3)
-
Michal Privoznik
-
Michal Prívozník
-
Sukrit Bhatnagar