All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brad Barnett <lists@l8r.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] qemu qmp unix sockets stop working with 'connection refused' randomly
Date: Thu, 27 Oct 2016 12:36:45 -0400	[thread overview]
Message-ID: <20161027123645.1cd7c2db@be.back.L8R.net> (raw)


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	other threads:[~2016-10-27 16:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161027123645.1cd7c2db@be.back.L8R.net \
    --to=lists@l8r.net \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.