Project

General

Profile

Actions

Bug #11790

closed

VNCProxy Error: WebSocket server

Added by Brian Musson over 8 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Compute resources - oVirt
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Hi, I am using the console feature on 1.9 to look into node on the oVirt compute resource. I get a blank screen on several browsers so I enabled debugging and looked around.

Here is what I have done so far:
  • installed foreman
  • added ec2, oVirt and Vmware compute resources
  • disabled SELinux (was getting a connection refused error message)
  • in firefox, went to about:config and modified network.websocket.allowInsecureFromHTTPS to true

This is the output of /var/log/foreman/production.log after clicking on the "Console" button:

2015-09-11 22:03:55 [app] [I] 
 | 
 | Started GET "/hosts/bmusson.lab.practicefusion.com/console" for 10.12.99.134 at 2015-09-11 22:03:55 -0400
2015-09-11 22:03:55 [app] [I] Processing by HostsController#console as HTML
2015-09-11 22:03:55 [app] [I]   Parameters: {"id"=>"bmusson.lab.practicefusion.com"}
2015-09-11 22:03:55 [sql] [D]   User Load (0.3ms)  SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1  [["id", 3]]
2015-09-11 22:03:55 [app] [D] Setting current user thread-local variable to admin
2015-09-11 22:03:55 [sql] [D]   AuthSource Load (0.4ms)  SELECT "auth_sources".* FROM "auth_sources" WHERE "auth_sources"."id" = 1 LIMIT 1
2015-09-11 22:03:55 [sql] [D]   Host::Managed Load (0.6ms)  SELECT "hosts".* FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."name" = 'bmusson.lab.practicefusion.com' LIMIT 1
2015-09-11 22:03:55 [sql] [D]   ComputeResource Load (0.4ms)  SELECT "compute_resources".* FROM "compute_resources" WHERE "compute_resources"."id" = 1 ORDER BY compute_resources.name LIMIT 1
2015-09-11 22:03:55 [sql] [I] Successfully decrypted field for Foreman::Model::Ovirt ovirt
2015-09-11 22:03:55 [app] [D] Starting VNC Proxy: /usr/share/foreman/extras/noVNC/websockify.py --daemon --idle-timeout=120 --timeout=120 5913 10.12.17.195:5903 --ssl-target --cert /var/lib/puppet/ssl/certs/foreman-master1.lab.practicefusion.com.pem --key /var/lib/puppet/ssl/private_keys/foreman-master1.lab.practicefusion.com.pem
2015-09-11 22:03:55 [app] [D] VNCProxy Error: WebSocket server settings:
 | 
2015-09-11 22:03:55 [app] [D] VNCProxy Error:   - Listen on :5913
 | 
2015-09-11 22:03:55 [app] [D] VNCProxy Error:   - Flash security policy server
 | 
2015-09-11 22:03:55 [app] [D] VNCProxy Error:   - SSL/TLS support
 | 
2015-09-11 22:03:55 [app] [D] VNCProxy Error:   - Backgrounding (daemon)
 | 
2015-09-11 22:03:55 [app] [I]   Rendered hosts/console/spice.html.erb within layouts/application (3.9ms)
2015-09-11 22:03:55 [app] [I]   Rendered home/_user_dropdown.html.erb (1.6ms)
2015-09-11 22:03:55 [app] [I] Read fragment views/tabs_and_title_records-3 (0.2ms)
2015-09-11 22:03:55 [app] [I]   Rendered home/_topbar.html.erb (2.7ms)
2015-09-11 22:03:55 [app] [I]   Rendered layouts/base.html.erb (4.4ms)
2015-09-11 22:03:55 [app] [I] Completed 200 OK in 459ms (Views: 10.5ms | ActiveRecord: 1.6ms)
2015-09-11 22:03:55 [app] [I] 
 | 
 | Started GET "/hosts/bmusson.lab.practicefusion.com/console" for 10.12.99.134 at 2015-09-11 22:03:55 -0400
2015-09-11 22:03:55 [app] [I] Processing by HostsController#console as HTML
2015-09-11 22:03:55 [app] [I]   Parameters: {"id"=>"bmusson.lab.practicefusion.com"}
2015-09-11 22:03:55 [sql] [D]   User Load (0.2ms)  SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1  [["id", 3]]
2015-09-11 22:03:55 [app] [D] Setting current user thread-local variable to admin
2015-09-11 22:03:55 [sql] [D]   AuthSource Load (0.4ms)  SELECT "auth_sources".* FROM "auth_sources" WHERE "auth_sources"."id" = 1 LIMIT 1
2015-09-11 22:03:55 [sql] [D]   Host::Managed Load (0.6ms)  SELECT "hosts".* FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."name" = 'bmusson.lab.practicefusion.com' LIMIT 1
2015-09-11 22:03:55 [sql] [D]   ComputeResource Load (0.3ms)  SELECT "compute_resources".* FROM "compute_resources" WHERE "compute_resources"."id" = 1 ORDER BY compute_resources.name LIMIT 1
2015-09-11 22:03:55 [sql] [I] Successfully decrypted field for Foreman::Model::Ovirt ovirt
2015-09-11 22:03:55 [app] [D] Starting VNC Proxy: /usr/share/foreman/extras/noVNC/websockify.py --daemon --idle-timeout=120 --timeout=120 5914 10.12.17.195:5903 --ssl-target --cert /var/lib/puppet/ssl/certs/foreman-master1.lab.practicefusion.com.pem --key /var/lib/puppet/ssl/private_keys/foreman-master1.lab.practicefusion.com.pem
2015-09-11 22:03:55 [app] [D] VNCProxy Error: WebSocket server settings:
 | 
2015-09-11 22:03:55 [app] [D] VNCProxy Error:   - Listen on :5914
 | 
2015-09-11 22:03:55 [app] [D] VNCProxy Error:   - Flash security policy server
 | 
2015-09-11 22:03:55 [app] [D] VNCProxy Error:   - SSL/TLS support
 | 
2015-09-11 22:03:55 [app] [D] VNCProxy Error:   - Backgrounding (daemon)
 | 
2015-09-11 22:03:55 [app] [I]   Rendered hosts/console/spice.html.erb within layouts/application (3.8ms)
2015-09-11 22:03:55 [app] [I]   Rendered home/_user_dropdown.html.erb (1.4ms)
2015-09-11 22:03:55 [app] [I] Read fragment views/tabs_and_title_records-3 (0.1ms)
2015-09-11 22:03:55 [app] [I]   Rendered home/_topbar.html.erb (2.5ms)
2015-09-11 22:03:55 [app] [I]   Rendered layouts/base.html.erb (4.0ms)
2015-09-11 22:03:55 [app] [I] Completed 200 OK in 366ms (Views: 9.7ms | ActiveRecord: 1.5ms)

--- snip ---

It starts two of them, which i don't quite understand.

[root@foreman-master1 ~]# ps aux | grep websock
foreman   3032  0.0  0.7 168660 14288 ?        S    22:03   0:00 /usr/bin/python /usr/share/foreman/extras/noVNC/websockify.py --daemon --idle-timeout=120 --timeout=120 5913 10.12.17.195:5903 --ssl-target --cert /var/lib/puppet/ssl/certs/foreman-master1.lab.practicefusion.com.pem --key /var/lib/puppet/ssl/private_keys/foreman-master1.lab.practicefusion.com.pem
foreman   3038  0.0  0.7 168660 14288 ?        S    22:03   0:00 /usr/bin/python /usr/share/foreman/extras/noVNC/websockify.py --daemon --idle-timeout=120 --timeout=120 5914 10.12.17.195:5903 --ssl-target --cert /var/lib/puppet/ssl/certs/foreman-master1.lab.practicefusion.com.pem --key /var/lib/puppet/ssl/private_keys/foreman-master1.lab.practicefusion.com.pem
Actions #1

Updated by Brian Musson over 8 years ago

Attempted to start a console on a node in vcenter, and get a similar reaction:

2015-09-11 22:09:44 [app] [I] | | Started GET "/compute_resources/2-hqvcs/vms/502d8c91-2180-828d-228f-868175c77478/console" for 10.12.99.134 at 2015-09-11 22:09:44 -0400
2015-09-11 22:09:44 [app] [I] Processing by ComputeResourcesVmsController#console as HTML
2015-09-11 22:09:44 [app] [I] Parameters: {"compute_resource_id"=>"2-hqvcs", "id"=>"502d8c91-2180-828d-228f-868175c77478"}
2015-09-11 22:09:44 [sql] [D] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 "id", 3
2015-09-11 22:09:44 [app] [D] Setting current user thread-local variable to admin
2015-09-11 22:09:44 [sql] [D] AuthSource Load (0.4ms) SELECT "auth_sources".* FROM "auth_sources" WHERE "auth_sources"."id" = 1 LIMIT 1
2015-09-11 22:09:44 [sql] [D] ComputeResource Load (0.2ms) SELECT "compute_resources".* FROM "compute_resources" WHERE "compute_resources"."id" = $1 ORDER BY compute_resources.name LIMIT 1 "id", "2-hqvcs"
2015-09-11 22:09:44 [sql] [I] Successfully decrypted field for Foreman::Model::Vmware hqvcs
2015-09-11 22:09:47 [app] [D] Starting VNC Proxy: /usr/share/foreman/extras/noVNC/websockify.py --daemon --idle-timeout=120 --timeout=120 5919 hqesx3.hq.practicefusion.com:5908 --cert /var/lib/puppet/ssl/certs/foreman-master1.lab.practicefusion.com.pem --key /var/lib/puppet/ssl/private_keys/foreman-master1.lab.practicefusion.com.pem
2015-09-11 22:09:47 [app] [D] VNCProxy Error: WebSocket server settings: |
2015-09-11 22:09:47 [app] [D] VNCProxy Error: - Listen on :5919 |
2015-09-11 22:09:47 [app] [D] VNCProxy Error: - Flash security policy server |
2015-09-11 22:09:47 [app] [D] VNCProxy Error: - SSL/TLS support |
2015-09-11 22:09:47 [app] [D] VNCProxy Error: - Backgrounding (daemon) |
2015-09-11 22:09:47 [app] [I] Rendered hosts/console/vnc.html.erb within layouts/application (4.6ms)
2015-09-11 22:09:47 [app] [I] Rendered home/_user_dropdown.html.erb (1.5ms)
2015-09-11 22:09:47 [app] [I] Read fragment views/tabs_and_title_records-3 (0.1ms)
2015-09-11 22:09:47 [app] [I] Rendered home/_topbar.html.erb (3.2ms)
2015-09-11 22:09:47 [app] [I] Rendered layouts/base.html.erb (4.6ms)
2015-09-11 22:09:47 [app] [I] Completed 200 OK in 2507ms (Views: 11.0ms | ActiveRecord: 0.9ms)

and simliar to the other, the process starts:

foreman 3391 0.0 0.7 168660 14284 ? S 22:12 0:00 /usr/bin/python /usr/share/foreman/extras/noVNC/websockify.py --daemon --idle-timeout=120 --timeout=120 5929 hqesx3.corp.practicefusion.com:5950 --cert /var/lib/puppet/ssl/certs/foreman-master1.lab.practicefusion.com.pem --key /var/lib/puppet/ssl/private_keys/foreman-master1.lab.practicefusion.com.pem

This time, however, there is a banner which appears at the top of the console window that says, "WebSock error: [object Event]", in red.

Actions #2

Updated by Brian Musson over 8 years ago

sorry for the double update, but the last "hqesx3.corp.practicefusion.com" should read "hqesx3.hq.practicefusion.com" - it was a typeo on my part

- Brian

Actions #3

Updated by Dominic Cleal over 8 years ago

  • Category set to Compute resources - oVirt
Actions #4

Updated by Lukas Zapletal over 8 years ago

From the logs it seems everything is working correctly. Foreman can occasionally spawn extra process if the port was already in use. Make sure the certificate is the one that your Foreman application use. Also verify if the target responds correctly (e.g. 10.12.17.195:5903). Try to telnet there from the Foreman server.

Actions #5

Updated by Shira Maximov almost 6 years ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF