Description of problem: Cannot connect to browser console in VM portal due to missing key 'path' in the ticket with data. Mar 24 17:15:30 engine1 ovirt-websocket-proxy.py[3747]: ovirt-websocket-proxy[30218] INFO msg:871 handler exception: 'path' # /usr/libexec/platform-python /usr/share/ovirt-engine/services/ovirt-websocket-proxy/ovirt-websocket-proxy.py start ovirt-websocket-proxy[31532] INFO daemonContext:470 Using the following ciphers: HIGH:!aNULL ovirt-websocket-proxy[31532] INFO daemonContext:474 Minimum SSL version requested: TLSv1.2 ovirt-websocket-proxy[31532] WARNING daemonContext:509 websockify does not support minimum SSL version ovirt-websocket-proxy[31532] INFO msg:871 WebSocket server settings: ovirt-websocket-proxy[31532] INFO msg:871 - Listen on *:6100 ovirt-websocket-proxy[31532] INFO msg:871 - Flash security policy server ovirt-websocket-proxy[31532] INFO msg:871 - SSL/TLS support ovirt-websocket-proxy[31532] INFO msg:871 - Deny non-SSL/TLS connections ovirt-websocket-proxy[31532] INFO msg:871 - proxying from *:6100 to targets generated by str {'port': '5902', 'host': 'host1ip', 'ssl_target': False} ovirt-websocket-proxy[31534] INFO msg:871 handler exception: 'path' /usr/share/ovirt-engine/services/ovirt-websocket-proxy/ovirt-websocket-proxy.py 224 def get_target(self, target_cfg, path): 225 """ 226 Parses the path, extracts a token, and looks for a valid 227 target for that token in the configuration file(s). Returns 228 target_host and target_port if successful and sets an ssl_target 229 flag. 230 """ 231 connection_data = json.loads(parse.unquote( 232 self._proxy._ticketDecoder.decode(path[1:]))) 233 target_host = connection_data['host'].encode('utf8') 234 target_port = connection_data['port'].encode('utf8') 235 print(conection_data) 236 path = connection_data['path'] Version-Release number of selected component (if applicable): ovirt-engine-websocket-proxy-4.4.0-0.0.master.20200317103500.git3e2b0274306.el8.noarch ovirt-engine-4.4.0-0.0.master.20200317103500.git3e2b0274306.el8.noarch How reproducible: Always Steps to Reproduce: 1. Login to VM portal and go to running VM 2. Click on VNC browser console option 3. Check that console is connected Actual results: Console could not be connected, there is exception handler info in the logs of the websocket proxy service. Expected results: Console is connected. Additional info:
"path" is mandatory...I guess. Don't really recall. Ryan, can you pick that up? It could be that the path needs to be passed in the ticket now, in that case flip it back to UX please (though such code change would be tracked on ovirt-web-ui's github)
Sure, I'll pick it up
The value is missing in VM portal as it seems. From webadmin: ovirt-websocket-proxy[2822] INFO msg:871 WebSocket server settings: ovirt-websocket-proxy[2822] INFO msg:871 - Listen on *:6100 ovirt-websocket-proxy[2822] INFO msg:871 - Flash security policy server ovirt-websocket-proxy[2822] INFO msg:871 - SSL/TLS support ovirt-websocket-proxy[2822] INFO msg:871 - Deny non-SSL/TLS connections ovirt-websocket-proxy[2822] INFO msg:871 - proxying from *:6100 to targets generated by str {'host': '10.46.9.68', 'port': '5900', 'ssl_target': False, 'path': None, 'token': None} None ovirt-websocket-proxy[2868] INFO log_message:117 127.0.0.1 - - [31/Mar/2020 11:24:36] 127.0.0.1: SSL/TLS (wss://) WebSocket connection ovirt-websocket-proxy[2868] INFO log_message:117 127.0.0.1 - - [31/Mar/2020 11:24:36] 127.0.0.1: Version hybi-13, base64: 'False' And everything went fine. It might be a problem in the VM Portal (https://github.com/oVirt/ovirt-web-ui/blob/master/src/components/VmConsole/index.js#L129). But, we can easily fix it in the ovirt-websocket-proxy by setting None when this 'path' key is missing.
I was trying to verify the bug on RHV 4.4.0-31 RHEL 8.2 (Both engine and hosts) Steps: In web admin: 1. I created a Host, Data center, Cluster with Enable VNC Encryption under console disabled, Storage domain and a VM. 2. I run the VM. 3. I set the console to open as VNC and console invocation as noVNC. 4. Added the CA to the browser and launched the console Everything worked as expected and I successfully launched the noVNC console and it worked. In the VM portal I couldn't open any sort of a Console because of a bug. I will search if the bug is opened and attach it and if not I will open it. I don't think we can mark this bug as verified yet until I will be able to verify it in the VM portal.
I verified it again on RHV-4.4.1-4 and everything works
This bugzilla is included in oVirt 4.4.0 release, published on May 20th 2020. Since the problem described in this bug report should be resolved in oVirt 4.4.0 release, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report.