webvirtmgr icon indicating copy to clipboard operation
webvirtmgr copied to clipboard

Connect to console fails

Open snoopyf opened this issue 8 years ago • 1 comments

Hi everyone,

I freshly installed WebVirtMgr which is running fine. Now I try to connect to an instaces console, which fails no matter how the guest is configured (VNC or spice) and no matter how WS_* variables are set.

Backgrounds:

  • KVM Host IP: 192.168.42.158
  • Client from which to connect is in the same LAN / Subnet
  • Connect from client to KVM Host over SSH Tunnel:

Scenario 1: WS_* are set like this (the defaults): SECRET_KEY = None LOCAL_PATH = None TIME_JS_REFRESH = 2000 WS_PORT = 6080 WS_HOST = '0.0.0.0' WS_PUBLIC_HOST = None WS_CERT = None WS_KEY = None

Try to open an instances console on the client opens a new browser window. After 1-2 seconds an error appears: "Server disconnected (code: 1006)" followed by the error "Connect timeout". In Firebug one can see:

Firefox can't connect to Server: ws://localhost:17523/ 
.
Firefox can't connect to Server: ws://localhost:6080/
.
New state 'failed', was 'connect'. Msg: Server disconnected (code: 1006)
.
New state 'failed', was 'connect'. Msg: Connect timeout

In /var/log/supervisor/webvirtmgr-console.log are no entrys.

Scenario 2: Changed WS_PUBLIC_HOST: WS_PUBLIC_HOST = '192.168.42.158' Behaviour is slightly different: In the new browser window the error "Server disconnected (code: 1006)" remains. This is in firebug:

New state 'failed', was 'ProtocolVersion'. Msg: Failed to connect to server (code: 1006)
.
Firefox can't connect to server ws://localhost:17523/

In /var/log/supervisor/webvirtmgr-console.log these entrys can be found:

192.168.42.175 - - [07/Aug/2016 10:57:22] 192.168.42.175: Plain non-SSL (ws://) WebSocket connection
192.168.42.175 - - [07/Aug/2016 10:57:22] 192.168.42.175: Version hybi-13, base64: 'False'
192.168.42.175 - - [07/Aug/2016 10:57:39] 192.168.42.175: Plain non-SSL (ws://) WebSocket connection
192.168.42.175 - - [07/Aug/2016 10:57:39] 192.168.42.175: Version hybi-13, base64: 'False'

In both scenarios webvirtmgr-console is running fine:

kvm-host# netstat -anp|grep 6080
tcp        0      0 0.0.0.0:6080            0.0.0.0:*               LISTEN      3178/python

Telnet from client also works:

client$ telnet 192.168.42.158 6080
Trying 192.168.42.158...
Connected to 192.168.42.158.
Escape character is '^]'.

Any idea what could be wrong here? BTW: These entrys in /var/log/supervisor/webvirtmgr-console.log: WARNING:root:No local_settings file found.

during a supervisor (re-)start are normal? Thx in advance!

Snoopy

snoopyf avatar Aug 07 '16 09:08 snoopyf

Same issue here

UPDATE: Open firewall port 6080/tcp under webvirtmgr server solved to me

c411n avatar Jan 11 '18 23:01 c411n