webvirtmgr icon indicating copy to clipboard operation
webvirtmgr copied to clipboard

VNC fails after a few seconds of working

Open lahdekorpi opened this issue 10 years ago • 7 comments

VNC works at first perfectly but after a few seconds of being connected, the log outputs this:

==> /var/log/supervisor/webvirtmgr-console.log <==
  5: 88.195.6.57: Plain non-SSL (ws://) WebSocket connection
  5: 88.195.6.57: Version hybi-13, base64: 'False'
  5: Try to open tunnel on [email protected]:3000 on console 127.0.0.1:5900 (or socket None)
  5: Tunnel openned
  5: Start proxying
  5: handler exception: (4, 'Interrupted system call')

And I get a disconnect in the browser: "Server disconnected (code: 1006)". After refreshing the browser window, everything works again for a few seconds.

Any ideas?

I'm behind a NAT and doing this:

iptables -t nat -I PREROUTING -p tcp -d {public_ip} --dport 6080 -j DNAT --to-destination 10.0.1.5:6080

Is this something that might affect it?

lahdekorpi avatar May 21 '15 10:05 lahdekorpi

Hi.

I am seeing the same thing. I am not behind NAT so that should be ruled out :) However it appear only to happen if there is no input for a few seconds.

Regards

Jens

Hyllegaard avatar Jun 09 '15 11:06 Hyllegaard

maybe related #561 ?

kaystrobach avatar Jun 15 '15 14:06 kaystrobach

Automatic reconnect would be a nice feature, but that doesn't really fix the root cause. It is disconnecting even if the machine isn't rebooting, etc. And in my case it disconnects randomly even when typing input.

lahdekorpi avatar Jun 15 '15 14:06 lahdekorpi

mhmm also had this :(

kaystrobach avatar Jun 15 '15 16:06 kaystrobach

Same here also, any ideas for a fix?

Edit: seems to be fixed in websockify 0.7.0. Will try to upgrade via pip.

Yup, fixed with websockify upgrade (sudo pip install --upgrade websockify) but seems to break direct TCP connections, it's only working for SSH. Not really a problem.

howels avatar Aug 14 '15 23:08 howels

Hello I had the same problem, my connection name was server-kvm, and i ve the problem with the console (vnc or spice). I delete my server "server-kvm", and i recreate it with the name "server" and now the problem is solve

it-community avatar Nov 09 '15 22:11 it-community

I was having the same issue. Further research and I ran across this noVNC issue. https://github.com/kanaka/noVNC/issues/238#issuecomment-24316499

Updated the rfb.js configuration file to the following:

case 'connect':
        connTimer = setTimeout(function () {
                fail("Connect timeout");
            }, conf.connectTimeout * 5000);

        init_vars();
        connect();

        // WebSocket.onopen transitions to 'ProtocolVersion'
        break;

Once updates, I restarted the supervisor service and refreshed my browser. Issue appears to have gone away. --- still watching / testing.

update: 30min on an idle noVNC console session has not disconnected after changing the timeout value.

sf32738 avatar Jun 10 '16 17:06 sf32738