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

WebSocket connection for terminal is closed due to lack of keepalives #14191

Closed
3 tasks done
erhudy opened this issue Jun 23, 2023 · 1 comment
Closed
3 tasks done

WebSocket connection for terminal is closed due to lack of keepalives #14191

erhudy opened this issue Jun 23, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@erhudy
Copy link
Contributor

erhudy commented Jun 23, 2023

Checklist:

  • I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
  • I've included steps to reproduce the bug.
  • I've pasted the output of argocd version.

Describe the bug

The WebSocket functionality used for the interactive terminal does not currently include any sort of keepalive. Because of this, if Argo is behind a load balancer that times out idle connections, the terminal will eventually stop working after being idle for long enough and need to be restarted.

I have a patch ready already that I have tested in my environment and found that it solves the problem - this issue is for bookkeeping purposes.

To Reproduce

In my case I have Argo running behind an ALB in AWS, where the default timeout is 60 seconds. If I open a terminal to a pod and leave it alone for 60+ seconds, it will silently stop working and the Argo CD server logs a WebSocket error on the other side. Doing something to keep activity going (e.g. printing something in a loop) prevents it from being closed.

Expected behavior

Terminal should remain open and functional until closed by the user.

Screenshots

Version

2.7.6 (exists in all prior versions with the terminal functionality as well)

Logs

Paste any relevant application logs here.
@erhudy erhudy added the bug Something isn't working label Jun 23, 2023
erhudy added a commit to erhudy/argo-cd that referenced this issue Jun 23, 2023
This adds a WebSocket ping message on a 5-second interval, sent
from the server to the client. This ensures that the interactive
terminal will remain open and won't be closed by load balancers
that are reaping idle connections.

Signed-off-by: Edmund Rhudy <erhudy@users.noreply.github.com>
crenshaw-dev pushed a commit that referenced this issue Jul 7, 2023
This adds a WebSocket ping message on a 5-second interval, sent
from the server to the client. This ensures that the interactive
terminal will remain open and won't be closed by load balancers
that are reaping idle connections.

Signed-off-by: Edmund Rhudy <erhudy@users.noreply.github.com>
gcp-cherry-pick-bot bot pushed a commit that referenced this issue Jul 7, 2023
This adds a WebSocket ping message on a 5-second interval, sent
from the server to the client. This ensures that the interactive
terminal will remain open and won't be closed by load balancers
that are reaping idle connections.

Signed-off-by: Edmund Rhudy <erhudy@users.noreply.github.com>
gcp-cherry-pick-bot bot pushed a commit that referenced this issue Jul 7, 2023
This adds a WebSocket ping message on a 5-second interval, sent
from the server to the client. This ensures that the interactive
terminal will remain open and won't be closed by load balancers
that are reaping idle connections.

Signed-off-by: Edmund Rhudy <erhudy@users.noreply.github.com>
crenshaw-dev pushed a commit that referenced this issue Jul 7, 2023
…#14192) (#14399)

* fix: adds WebSocket ping to interactive terminal (#14191) (#14192)

This adds a WebSocket ping message on a 5-second interval, sent
from the server to the client. This ensures that the interactive
terminal will remain open and won't be closed by load balancers
that are reaping idle connections.

Signed-off-by: Edmund Rhudy <erhudy@users.noreply.github.com>

* fix: adds WebSocket ping to interactive terminal (#14191) (#14192)

This adds a WebSocket ping message on a 5-second interval, sent
from the server to the client. This ensures that the interactive
terminal will remain open and won't be closed by load balancers
that are reaping idle connections.

Signed-off-by: Edmund Rhudy <erhudy@users.noreply.github.com>

---------

Signed-off-by: Edmund Rhudy <erhudy@users.noreply.github.com>
Co-authored-by: Edmund Rhudy <erhudy@users.noreply.github.com>
@crenshaw-dev
Copy link
Collaborator

Fixed with #14192

yyzxw pushed a commit to yyzxw/argo-cd that referenced this issue Aug 9, 2023
…goproj#14192)

This adds a WebSocket ping message on a 5-second interval, sent
from the server to the client. This ensures that the interactive
terminal will remain open and won't be closed by load balancers
that are reaping idle connections.

Signed-off-by: Edmund Rhudy <erhudy@users.noreply.github.com>
tesla59 pushed a commit to tesla59/argo-cd that referenced this issue Dec 16, 2023
…goproj#14192)

This adds a WebSocket ping message on a 5-second interval, sent
from the server to the client. This ensures that the interactive
terminal will remain open and won't be closed by load balancers
that are reaping idle connections.

Signed-off-by: Edmund Rhudy <erhudy@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants