vnc websocket option not properly parsed when running on commandline

Bug #1455912 reported by flrichar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Undecided
Daniel Berrange

Bug Description

All of my vms are started with a simple script on the command line.
Starting with Qemu 2.3.0, the option "-vnc host:port,websocket" is no longer working.

Previously if I said listen on Tor:17,websocket it would function correctly. Now it's kicking an error:

qemu-system-x86_64: -vnc tor:17,websocket: Failed to start VNC server on `(null)': address resolution failed for tor:on: Servname not supported for ai_socktype

The error leads me to believe it's not parsing the command line options for the "vnc" option correctly. If I leave off ",websocket" it works correctly. I've even tried, replacing the hostname with an IP address, and using the alternate form " -display vnc=tor:17,webscoket". It reports the same error.

Revision history for this message
flrichar (fredr) wrote :

Someone has had a similar issue with the port portion of the display as a string and not an integer (so it's looking in /etc/services etc):

http://stackoverflow.com/questions/23079017/servname-not-supported-for-ai-socktype

Revision history for this message
flrichar (fredr) wrote :

I have more information about the bug. The host I'm running this on is called "tor' (no, it has nothing to do with an onion router, its an old nickname and something I've been calling my main dev host for years). Its IP is 10.16.0.5. If I designate the command line option as "-vnc tor:11,websocket=5711" or "-vnc 10.16.0.5:11,websocket=5711" it appears to work fine.

I have to include the specific IP I wish it to listen on because this host has a lot of different interfaces, and I don't want it listening on all interfaces. So there's still an issue with it resolving the "short" name in local dns to the local IP, and listening only on that IP with the abbreviated option. It's still not parsed correctly.

On another host, with much fewer interfaces and addresses, a simple "-vnc :80,websocket" works fine without modification. Same version of Qemu, the ArchLinux x86_64 package for 2.3.0-2.

Revision history for this message
Daniel Berrange (berrange) wrote :

This is an accidental regression caused by

      commit 4db14629c38611061fc19ec6927405923de84f08
      Author: Gerd Hoffmann <email address hidden>
      Date: Tue Sep 16 12:33:03 2014 +0200

        vnc: switch to QemuOpts, allow multiple servers

Changed in qemu:
assignee: nobody → Daniel Berrange (berrange)
status: New → Confirmed
Revision history for this message
Daniel Berrange (berrange) wrote :
Changed in qemu:
status: Confirmed → In Progress
Revision history for this message
Peter Maydell (pmaydell) wrote :

Dan's patch linked in comment #4 went into git as commit 1b1aeb5828c978a, so this has been fixed (with the fix going into the 2.9.0 release).

Changed in qemu:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers