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

Terminal does not work with windows containers #9951

Closed
3 tasks done
EugeneLugovtsov opened this issue Jul 12, 2022 · 18 comments
Closed
3 tasks done

Terminal does not work with windows containers #9951

EugeneLugovtsov opened this issue Jul 12, 2022 · 18 comments
Labels
answered bug/status:cannot-reproduce Cannot reproduce issue yet bug Something isn't working cherry-pick/2.4 Candidate for cherry picking into the 2.4 release branch

Comments

@EugeneLugovtsov
Copy link

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

I can open the terminal tab and it successfully connects to the pod, but I cannot type anything in the terminal window.

image

To Reproduce

  1. Try to type some commands in the windows container with PowerShell.

Expected behavior

The Terminal feature works for Linux and Windows based containers

Screenshots

Version

argocd: v2.2.3+987f665
  BuildDate: 2022-01-18T17:58:47Z
  GitCommit: 987f6659b88e656a8f6f8feef87f4dd467d53c44
  GitTreeState: clean
  GoVersion: go1.16.11
  Compiler: gc
  Platform: windows/amd64
argocd-server: v2.4.4+fe80bdc
  BuildDate: 2022-07-07T07:11:00Z
  GitCommit: fe80bdcfdc847372f268f5d711d3112c7d1e39bf
  GitTreeState: clean
  GoVersion: go1.18.3
  Compiler: gc
  Platform: linux/amd64
  Kustomize Version: v4.4.1 2021-11-11T23:36:27Z
  Helm Version: v3.8.1+g5cb9af4
  Kubectl Version: v0.23.1
  Jsonnet Version: v0.18.0
@EugeneLugovtsov EugeneLugovtsov added the bug Something isn't working label Jul 12, 2022
@notfromstatefarm
Copy link
Contributor

I believe this is fixed in #9895, which will be released in 2.4.6.

@todaywasawesome todaywasawesome added cherry-pick/2.4 Candidate for cherry picking into the 2.4 release branch answered labels Jul 13, 2022
@todaywasawesome
Copy link
Contributor

@EugeneLugovtsov I'm going to close the issue for now since it should be taken care of in #9895 if the bug persists, please reopen!

@todaywasawesome
Copy link
Contributor

@EugeneLugovtsov 2.4.6 was just released which includes #9895 , do you want to give it a try?

@EugeneLugovtsov
Copy link
Author

@todaywasawesome yes, I have already given it a shot. I have the ability to type commands in ArgoCD v2.4.6. However, I can see that the terminal freezes sometimes, and the cursor is jumping around the terminal window
image

@crenshaw-dev
Copy link
Collaborator

I wonder if this is a race condition on the WriteMessage call. @EugeneLugovtsov if I wrote a patch, would you be able to build the image and test it?

@crenshaw-dev crenshaw-dev reopened this Jul 14, 2022
@EugeneLugovtsov
Copy link
Author

@crenshaw-dev yes, I can test it

@crenshaw-dev
Copy link
Collaborator

Can you give this a try? #9994

I'm sharing the read and write lock. It's possible we could get away with write having its own lock.

@crenshaw-dev
Copy link
Collaborator

(My suspicion is that this might solve the hanging issue but not the intermingled text issue.)

@EugeneLugovtsov
Copy link
Author

EugeneLugovtsov commented Jul 15, 2022

@crenshaw-dev I have built the ArgoCD image from your branch. However, the terminal tab is missing now :(
To make the image I followed this wiki https://argo-cd.readthedocs.io/en/stable/developer-guide/running-locally/#run-your-own-argocd-images-on-your-cluster

@crenshaw-dev
Copy link
Collaborator

My bad @EugeneLugovtsov, I based that PR on master instead of release-2.4. Can you give this one a try? #10005

@EugeneLugovtsov
Copy link
Author

The terminal window just freezes (only once after ~1 minute it turned on, but the commands appeared on the screen very slowly)
image

@crenshaw-dev
Copy link
Collaborator

Gotcha, so shared read/write lock probably hurts performance and doesn't solve the problem.

Are there any error logs in the browser (dev tools console or network traffic) or in the argocd-server?

@EugeneLugovtsov
Copy link
Author

Nothing from the browser dev console, but I see a lot of errors in argo-server logs
image

@crenshaw-dev
Copy link
Collaborator

crenshaw-dev commented Jul 15, 2022

You mentioned it fails after ~1m. Is it possible there's a timeout on a reverse proxy? https://stackoverflow.com/a/57706152/684776

Maybe we should send the server a heartbeat: https://stackoverflow.com/a/57531353/684776

@EugeneLugovtsov
Copy link
Author

@crenshaw-dev sorry for the confusion, what I want to say: 10 times I tried to enable the terminal tab and 9 times the terminal did not work, and only once it started after ~ 1 min.

@crenshaw-dev
Copy link
Collaborator

Ah, okay. This is seeming environment-specific as @notfromstatefarm was not able to reproduce such consistently-broken behavior on a Windows container.

@crenshaw-dev crenshaw-dev added the bug/status:cannot-reproduce Cannot reproduce issue yet label Jul 18, 2022
@jgwest
Copy link
Member

jgwest commented Feb 13, 2024

Based on comments, appears individual environment specific.

@jgwest jgwest closed this as completed Feb 13, 2024
@dankellett
Copy link

@todaywasawesome yes, I have already given it a shot. I have the ability to type commands in ArgoCD v2.4.6. However, I can see that the terminal freezes sometimes, and the cursor is jumping around the terminal window image

Did you find a resolution to the output glitch you describe? We have an environment with the same symptoms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered bug/status:cannot-reproduce Cannot reproduce issue yet bug Something isn't working cherry-pick/2.4 Candidate for cherry picking into the 2.4 release branch
Projects
None yet
Development

No branches or pull requests

6 participants