Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Unify /websockify path used for vnc connections #2781

Closed
7 tasks
kvaps opened this issue Jan 6, 2019 · 5 comments
Closed
7 tasks

Unify /websockify path used for vnc connections #2781

kvaps opened this issue Jan 6, 2019 · 5 comments

Comments

@kvaps
Copy link
Contributor

kvaps commented Jan 6, 2019

Description
In continue to #878

Sunstone uses two different addresses for establish websocket connections with novnc.

If you call vnc console from the vm page, sunstone will call:

https://example.org:<port>/?token=jkkg7cdyc7...

Unlike, if you click image, sunsone will call:

https://example.org:<port>/websockify/?token=jkkg7cdyc7...

To Reproduce

  1. Configure sunstone:

    :vnc_proxy_port: 29876
    :vnc_client_port: 443
    :vnc_proxy_support_wss: no
    
  2. Configure nginx reverse-proxy, use config file from Enable path based NoVNC #878

  3. Login to sunstone, and try to connect via vnc

    vnc server disconnected (code: 1006)
    
  4. Click image, and sunstone will successful establish vnc connection

Expected behavior

All connections will use /websockify path.

Details

  • Affected Component: Sunstone
  • Hypervisor: KVM
  • Version: 5.6.1

Additional context

I found working workaround, just specify missing path in vnc_client_port variable:

:vnc_client_port: 443/websockify

Progress Status

  • Branch created
  • Code committed to development branch
  • Testing - QA
  • Documentation
  • Release notes - resolved issues, compatibility, known issues
  • Code committed to upstream release/hotfix branches
  • Documentation committed to upstream release/hotfix branches
@baby-gnu
Copy link
Contributor

Many thanks @kvaps for the :vnc_client_port: 443/websockify trick.

It's working like a charm.

In #878, I proposed to define a new configuration option to set the URL path, based on the existing ones, maybe vnc_client_path? For example:

:vnc_client_port: 443
:vnc_client_path: /websockify

Regards.

@baby-gnu
Copy link
Contributor

Since it's working, I figure out that I needed to tweak a little the nginx timeouts.

When you keep a fixed image (like a login screen), no packet pass and the noVNC client do not seems to send ping to maintain the connection, so nginx close the connection after a time (60s by default).

I increase that to 15 minutes:

        location /websockify {
                proxy_pass http://websocketproxy;
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
		proxy_send_timeout 15m;
		proxy_read_timeout 15m;
        }

@tinova
Copy link
Member

tinova commented Oct 17, 2019

Evaluate in the context of the Sunstone revamp

baby-gnu added a commit to baby-gnu/one-sunstone-rest-client that referenced this issue Nov 27, 2019
As proposed in OpenNebula/one#2781

* README.md: describe the new “--ws-port” and “--ws-path” options

* osc: add 2 options “--ws-port” and “--ws-path” to configure where is
  the NoVNC end point.
@tinova tinova modified the milestones: Release 5.12, Release 5.14 Apr 8, 2020
@tinova
Copy link
Member

tinova commented Nov 19, 2020

More context: #1034 (comment)

@tinova
Copy link
Member

tinova commented Jul 27, 2021

noVNC to be fully deprecated in #5422

@tinova tinova closed this as completed Jul 27, 2021
rsmontero pushed a commit that referenced this issue Nov 8, 2023
Modifies the way labels are displayed on vm templates
rsmontero pushed a commit that referenced this issue Mar 11, 2024
Modifies the way labels are displayed on vm templates

(cherry picked from commit 5ca0180)
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

4 participants