Bug 1395782

Summary: Trying to connect to VM console randomly fails on RHV environments
Product: Red Hat CloudForms Management Engine Reporter: movciari
Component: ProvidersAssignee: Martin Tessun <mtessun>
Status: CLOSED ERRATA QA Contact: Angelina Vasileva <anikifor>
Severity: high Docs Contact:
Priority: unspecified    
Version: 5.7.0CC: dajohnso, greartes, istein, jfrey, jhardy, kkulkarn, mgoldboi, obarenbo, simaishi
Target Milestone: GAFlags: istein: needinfo+
Target Release: 5.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: ui:html5
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-01 13:08:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Bug
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: RHEVM Target Upstream Version:
Bug Depends On: 1404354    
Bug Blocks: 1393520    

Description movciari 2016-11-16 16:12:17 UTC
Description of problem:
When trying to connect to VM console, for VM on RHV provider, sometimes it fails.
From browser it looks the same way as on screenshot:
https://bugzilla.redhat.com/attachment.cgi?id=1213529 
from bug:
https://bugzilla.redhat.com/show_bug.cgi?id=1388180
(which is cloned by https://bugzilla.redhat.com/show_bug.cgi?id=1393520 )
Couldn't find anything useful in logs

Version-Release number of selected component (if applicable):


How reproducible:
60%

Steps to Reproduce:
1. Manage RHEVM provider (say RHEVM 36 or 35)
2. Navigate to Compute ==> Infrastructure ==> Virtual Machines ==> Select a Virtual Machine
3. Click on the HTML5 icon in the vm details page

Actual results:
fails

Expected results:
should connect to VM's console

Additional info:
On some environments this fails randomly, but on other environments using the same CFME version it failed ~20 times and I wasn't able to connect to console at all

Comment 2 Oved Ourfali 2016-11-17 06:19:31 UTC
Michal - so isn't this a clone of that issue?

Comment 3 Ilanit Stein 2016-11-17 08:38:15 UTC
On CFME-5.7.0.9, 
VM console (Before bug 1393520 was fixed), failed to connect constantly.

On CFME-5.7.0.11 (including bug 1393520 fix), 
we see it failing sometimes.

This problem is seen on FF 49 & Chrome 50.0.2661.86.

Martin,
Would you please add your input on this?

Comment 4 Oved Ourfali 2016-11-17 08:41:16 UTC
Also, when this fails. Will another attempt just work or is it constantly failing?

Comment 5 Ilanit Stein 2016-11-20 11:58:17 UTC
When I tested it today, using Chrome, on first connection trial, it failed, but refreshing the page (pressing "F5") made it work.

On the second time, I connected to the same VM console, connection worked well.

After login again to CFME appliance, and connecting to the VM console didn't work, and F5 didn't help. 

I am not sure there's a constant pattern here, that make the problem reproduce/vanish.

Comment 8 movciari 2016-11-22 11:56:00 UTC
Even on successful connection I can see this in JS console:

Connected to wss://{cfme_ip}/ws/console/1335df39ab6ef0f0ff18b6bebd223875
spice-h...25b9.js (line 351)
WARNING: Unimplemented function 108(Inval All Palettes) [ further notices suppressed ]
spice-h...25b9.js (line 351)
WARNING: Unimplemented function 102(Display Mark) [ further notices suppressed ]
spice-h...25b9.js (line 351)
Firefox can’t establish a connection to the server at wss://{cfme_ip}/ws/console/1335df39ab6ef0f0ff18b6bebd223875.
	

spice-h...25b9.js (line 127, col 113)
ERROR: WebSocket error: Can't connect to websocket on URL: wss://{cfme_ip}/ws/console/1335df39ab6ef0f0ff18b6bebd223875
spice-h...25b9.js (line 351)
ERROR: [object Event]
spice-h...25b9.js (line 351)
uncaught exception: [object Event]

and when this bug is reproduced, console says this:

"NetworkError: 500 Internal Server Error - https://{cfme_ip}/ws/console/1335df39ab6ef0f0ff18b6bebd223875"
1335df3...d223875
Firefox can’t establish a connection to the server at wss://{cfme_ip}/ws/console/1335df39ab6ef0f0ff18b6bebd223875.
	

spice-h...25b9.js (line 127, col 113)
ERROR: WebSocket error: Can't connect to websocket on URL: wss://{cfme_ip}/ws/console/1335df39ab6ef0f0ff18b6bebd223875
spice-h...25b9.js (line 351)
ERROR: [object Event]
spice-h...25b9.js (line 351)

Comment 9 Ilanit Stein 2016-11-22 16:00:28 UTC
Adding requires_doc_text flag, so that this bug will be added in the release notes.
It seems it will take some time to resolve this bug, and it won't be ready on time for CFME-5.7.0 GA

Comment 16 Dave Johnson 2018-01-02 18:12:41 UTC
Ugh, my needinfo is from February...  so at this point I think we can close this.  I defer to Ilanit.  Assuming this is working, please do so.

Comment 17 Ilanit Stein 2018-01-16 10:06:52 UTC
Tested 10 times in a role VM console for SPICE display type.
Console was opened successfully.

Comment 20 errata-xmlrpc 2018-03-01 13:08:18 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:0380