All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian Ehrhardt " <1849644@bugs.launchpad.net>
To: qemu-devel@nongnu.org
Subject: [Bug 1849644] Re: QEMU VNC websocket proxy requires non-standard 'binary' subprotocol
Date: Wed, 30 Sep 2020 08:15:00 -0000	[thread overview]
Message-ID: <160145370044.22921.7460141716073428660.malone@wampee.canonical.com> (raw)
In-Reply-To: 157191258679.29920.9268940625941119092.malonedeb@soybean.canonical.com

Trying to connect using
novnc   latest/stable:    1.2.0      2020-07-31 (6) 18MB -

as-is failing to connect
Keeping VNC up and refreshing qemu.


Updating to the new qemu from focal proposed (by now resolved the archive publishing issues we had before this morning).
Get:67 http://archive.ubuntu.com/ubuntu focal-proposed/main amd64 qemu-utils amd64 1:4.2-3ubuntu6.7 [975 kB]                                                                                  
Get:68 http://archive.ubuntu.com/ubuntu focal-proposed/main amd64 qemu-system-common amd64 1:4.2-3ubuntu6.7 [1056 kB]                                                                         
Get:69 http://archive.ubuntu.com/ubuntu focal-proposed/main amd64 qemu-block-extra amd64 1:4.2-3ubuntu6.7 [53.8 kB]                                                                           
Get:70 http://archive.ubuntu.com/ubuntu focal-proposed/main amd64 qemu-system-data all 1:4.2-3ubuntu6.7 [563 kB]                                                                              
Get:71 http://archive.ubuntu.com/ubuntu focal-proposed/main amd64 qemu-kvm amd64 1:4.2-3ubuntu6.7 [13.1 kB]                                                                                   
Get:72 http://archive.ubuntu.com/ubuntu focal-proposed/main amd64 qemu-system-x86 amd64 1:4.2-3ubuntu6.7 [6720 kB]                                                                            
Get:73 http://archive.ubuntu.com/ubuntu focal-proposed/main amd64 qemu-system-gui amd64 1:4.2-3ubuntu6.7 [40.8 kB]                                                                            
Get:74 http://archive.ubuntu.com/ubuntu focal-proposed/main amd64 qemu-system-mips amd64 1:4.2-3ubuntu6.7 [12.9 MB]


Now the same novnc1.2 can connect to it \o/
Setting verified

** Tags removed: verification-needed verification-needed-focal
** Tags added: verification-done verification-done-focal

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1849644

Title:
  QEMU VNC websocket proxy requires non-standard 'binary' subprotocol

Status in QEMU:
  Fix Released
Status in qemu package in Ubuntu:
  Fix Released
Status in qemu source package in Focal:
  Fix Committed

Bug description:
  [Impact]

   * The exact details of the protocol/subprotocal was slightly unclear
     between the projects. So qemu ended up insisting on "binary" being
     used but newer noVNC clients no more used it.

   * Qemu got fixed in 5.0 to be more tolerant and accept an empty sub-
     protocol as well. This SRU backports that fix to Focal.

  [Test Case]

   * Without the fix the following will "Failed to connect", but with
  the fix it will work.

  $ sudo apt install qemu-system-x86
  # will only boot into a failing bootloader, but that is enough
  $ qemu-system-x86_64 -vnc :0,websocket
  # We need version 1.2 or later, so use the snap
  $ snap install novnc
  $ novnc --vnc localhost:5700
  Connect browser to http://<IP>:6080/vnc.html
  Click "Connect"

   * Cross check with an older noVNC (e.g. the one in Focal) if the 
     connectivity still works on those as well

     - Reminders when switching between the noVNC implementations
       - always refresh the browser with all clear ctrl+alt+f5
       - start/stop the snapped one via snap.novnc.novncsvc.service

  [Regression Potential]

   * This is exclusive to the functionality of noVNC, so regressions would 
     have to be expected in there. The tests try to exercise the basics, but
     e.g. Openstack would be a major product using 

  [Other Info]
   
   * The noVNC in Focal itself does not yet have the offending change, but
     we want the qemu in focal to be connecteable from ~any type of client


  ---


  
  When running a machine using "-vnc" and the "websocket" option QEMU seems to require the subprotocol called 'binary'. This subprotocol does not exist in the WebSocket specification. In fact it has never existed in the spec, in one of the very early drafts of WebSockets it was briefly mentioned but it never made it to a final version.

  When the WebSocket server requires a non-standard subprotocol any
  WebSocket client that works correctly won't be able to connect.

  One example of such a client is noVNC, it tells the server that it
  doesn't want to use any subprotocol. QEMU's WebSocket proxy doesn't
  let noVNC connect. If noVNC is modified to ask for 'binary' it will
  work, this is, however, incorrect behavior.

  Looking at the code in "io/channel-websock.c" it seems it's quite
  hard-coded to binary:

  Look at line 58 and 433 here:
  https://git.qemu.org/?p=qemu.git;a=blob;f=io/channel-websock.c

  This code has to be made more dynamic, and shouldn't require binary.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1849644/+subscriptions


  parent reply	other threads:[~2020-09-30  8:22 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-24 10:23 [Bug 1849644] [NEW] QEMU VNC websocket proxy requires non-standard 'binary' subprotocol Samuel
2019-10-24 17:15 ` [Bug 1849644] " Daniel Berrange
2019-10-28 12:36 ` Samuel
2019-11-23  3:48 ` yuchenlin
2020-01-02 10:41 ` Samuel
2020-01-15  1:43 ` yuchenlin
2020-01-27  8:27 ` Samuel
2020-02-10  9:52 ` Daniel Berrange
2020-03-10  9:08 ` Laurent Vivier
2020-04-30 13:36 ` Laurent Vivier
2020-09-24  9:25 ` Christian Ehrhardt 
2020-09-24 10:22 ` Christian Ehrhardt 
2020-09-24 13:15 ` Christian Ehrhardt 
2020-09-25  5:47 ` Christian Ehrhardt 
2020-09-25  6:07 ` Launchpad Bug Tracker
2020-09-25  6:09 ` Christian Ehrhardt 
2020-09-29 12:59 ` Robie Basak
2020-09-30  3:53 ` [Bug 1849644] Autopkgtest regression report (qemu/1:4.2-3ubuntu6.7) Ubuntu SRU Bot
2020-09-30  8:15 ` Christian Ehrhardt  [this message]
2020-10-12  9:44 ` [Bug 1849644] Re: QEMU VNC websocket proxy requires non-standard 'binary' subprotocol Launchpad Bug Tracker
2020-10-12  9:44 ` [Bug 1849644] Update Released Łukasz Zemczak

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=160145370044.22921.7460141716073428660.malone@wampee.canonical.com \
    --to=1849644@bugs.launchpad.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.