qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] qemu qmp unix sockets stop working with 'connection refused


From: Brad Barnett
Subject: [Qemu-devel] qemu qmp unix sockets stop working with 'connection refused' randomly
Date: Thu, 27 Oct 2016 12:36:45 -0400

Hey all,

So, I've been unable to find anything about this via Google searches,
mailing list searches, IRC, you name it.  Nor, does the documentation
seem to indicate I'm doing anything wrong.

I'm starting qemu with various options, including this:

-qmp unix:/path_to_sock_dir/box.uniquename.sock,server,nowait

I'm using socat to connect:

socat UNIX-CONNECT:/path_to_sock_dir/box.uniquename.sock STDIO

This works fine, for the most part.  I can connect, issue commands:

{"QMP": {"version": {"qemu": {"micro": 2, "minor": 1, "major": 2},
"package": " (Debian 1:2.1+dfsg-12+deb8u6)"}, "capabilities": []}}
{ "execute": "qmp_capabilities" }
{"return": {}}

And as you see, get responses.  When it works, it works perfectly.

Qemu version is the one shippied with Debian Jessie:

# qemu-system-x86_64 --version
QEMU emulator version 2.1.2 (Debian 1:2.1+dfsg-12+deb8u6), Copyright (c)
2003-2008 Fabrice Bellard

What happens is that randomly, socat can no longer connect to the socket
in question.  This has happened after successful uses of that very
socket, and also if I've never used that socket before.

EG, I start qemu, later connect to socket, do things, exit.  I can even
connect a random amount of times, do things, etc.  Or, not connect at all
after start!

Randomly, I'll end up with the socket in a state where socat states
"connection refused' when trying to connect.

This was the only bug I could find, that seemed even remotely close:

https://bugs.launchpad.net/qemu/+bug/1156632

However, my issue also happen if I have never before connected to the
socket in question.

This has happened on multiple servers with varying configurations -- but
all servers are the above qemu version, Debian Jessie, and similar qemu
command line configs.

ps shows qemu running as:

qvmuser-system-x86_64 -enable-kvm -net nic,macaddr=<mac address here>
-net vde,sock=/var/run/vde2/mytap.ctl -m 3G -smp 2 -name boxname -drive
file=/home/vmuser/images/boxname.raw,if=virtio,boot=on
-D /home/vmuser/log/boxname.logfile -pidfile /run/vmuser/boxname.pid
-monitor stdio -display vnc=127.0.0.1:14,password -vga qxl -qmp
unix:/home/vmuser/sock/boxname.sock,server,nowait

Anyone have any ideas?  Is there something I missed with qmp?  

I do have some ability to test / debug on a local server farm, with VMs,
VM images, etc that are identical to production.



Thanks!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]