Project

General

Profile

Bug #31317

VNC Console broken

Added by Christian Ruppert 13 days ago. Updated 13 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
VM management
Target version:
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Hi,

the VNC connection in 2.2.0 was broken because it was using "ws://" instead of "wss://" in my case (:websockets_encrypt: on).
It only showed "Disconnected." in the console tab. Nothing else/more.
Turning debug logging on only resulted in nonsense "error" messages:
2020-11-16T10:14:15 [D|app|46df8879] VNCProxy Error: WebSocket server settings:
46df8879 |
2020-11-16T10:14:15 [D|app|46df8879] VNCProxy Error: - Listen on :5929
46df8879 |
2020-11-16T10:14:15 [D|app|46df8879] VNCProxy Error: - Flash security policy server
46df8879 |
2020-11-16T10:14:15 [D|app|46df8879] VNCProxy Error: - SSL/TLS support
46df8879 |
2020-11-16T10:14:15 [D|app|46df8879] VNCProxy Error: - Backgrounding (daemon)
46df8879 |

So those errors, which weren't actual errors, didn't help.

This was likely introduced via #27319, especially https://github.com/theforeman/foreman/pull/6907/files#diff-acf85befb293c237348f2c37f605909896cb7240beca4c7d7ad7a62d5fe8ead5R20
tbrisker provided a possible fix via IRC:
idl0r: can you try changing https://github.com/theforeman/foreman/pull/6907/files#diff-acf85befb293c237348f2c37f605909896cb7240beca4c7d7ad7a62d5fe8ead5R20 to data-encrypt='<%= @encrypt %>' ?

Which we did and it worked afterwards.
Previously the JS error console of the browser logged "Failed when connecting: Error when opening socket (SecurityError: The operation is insecure.)"


Related issues

Related to Foreman - Feature #27319: VNC console for kubevirtClosed

Associated revisions

Revision c11b7561 (diff)
Added by Shira Maximov 13 days ago

Fixes #31317 - Fix broken VNC console in a secured connection

@encrypt veriable that was created in console_common.rb wasn't in the scope of the ws_proxy.rb
so, instead i sent directly Setting[:websockets_encrypt]

History

#1 Updated by Tomer Brisker 13 days ago

#2 Updated by Tomer Brisker 13 days ago

  • Target version set to 2.2.2
  • Category set to VM management

#3 Updated by The Foreman Bot 13 days ago

  • Assignee set to Shira Maximov
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/8138 added

#4 Updated by The Foreman Bot 13 days ago

  • Fixed in Releases 2.4.0 added

#5 Updated by Tomer Brisker 13 days ago

  • Fixed in Releases 2.2.2, 2.3.0 added
  • Fixed in Releases deleted (2.4.0)

#6 Updated by Tomer Brisker 13 days ago

  • Subject changed from VNC Console broken through #27319 to VNC Console broken

#7 Updated by Shira Maximov 13 days ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF