Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Inactive NoVNC session disconnected by network appliance #23

Closed
patlachance opened this issue Mar 10, 2022 · 5 comments · Fixed by #24
Closed

Inactive NoVNC session disconnected by network appliance #23

patlachance opened this issue Mar 10, 2022 · 5 comments · Fixed by #24
Assignees
Labels
enhancement New feature or request

Comments

@patlachance
Copy link
Contributor

As a user of this image behind network appliance (load-balancer, reverse proxy, ...)
I should have an option to enable websocket ping/pong
In order to avoid being disconnected by the network appliance dropping the inactive TCP session.

Network appliance (load-balancers, reverse proxy) are configured to drop inactive sessions. For example, nginx default configuration is 60 seconds. Same for AWS ELB Classic load balancer, which can be increased up to 3600 seconds.

Websocket provide a configurable ping/pong mechanism to maintain tcp sessions opened on each network hops using heartbeat packet. And there is novnc_proxy parameter to enable it.

@accetto accetto added the enhancement New feature or request label Mar 12, 2022
@accetto accetto self-assigned this Mar 12, 2022
@accetto
Copy link
Owner

accetto commented Mar 12, 2022

@patlachance Thanks for the idea. I'll look at it.

accetto added a commit that referenced this issue Mar 20, 2022
@accetto
Copy link
Owner

accetto commented Mar 20, 2022

Hello @patlachance

would you please test the new image with the hearbeat? I do not have an appropriate environment at the moment.

You can find the updated image accetto/ubuntu-vnc-xfce-g3:dev-heartbeat on Docker Hub.

I've also published a temporary branch next-release on Git Hub. The CHANGELOG describes the changes. Note that the README files are not completely updated yet.

You should set the new environment variable NOVNC_HEARTBEAT by creating the container, like

docker run -e NOVNC_HEARTBEAT=30 --rm -P accetto/ubuntu-vnc-xfce-g3:dev-heartbeat --debug

If starting with the parameter --debug, then there should be lines similar to these in the output:

Starting noVNC
/usr/libexec/noVNCdim/utils/novnc_proxy --vnc localhost:5901 --listen 6901 --heartbeat 30 &> /dockerstartup/novnc.log
noVNC started on TCP port '6901' with heartbeat 30 seconds

Please let me know, if it really helps. Thanks.

Regards
accetto

@accetto
Copy link
Owner

accetto commented Mar 20, 2022

That's really funny. I've just found, that I've completely missed you PR! So much about doing too many things at once. I'll check your PR now and you can test my changes in a meantime. :)

@accetto
Copy link
Owner

accetto commented Mar 31, 2022

@patlachance Can you confirm that it's really helping? Have you tested it?

@patlachance
Copy link
Contributor Author

@accetto sorry for the delay. Yes the image works as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants