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 exec on some containers throws error "websocket: unexpected reserved bits 0x60" #9425

Closed
3 tasks done
n888 opened this issue May 16, 2022 · 3 comments
Closed
3 tasks done
Labels
bug Something isn't working component:web-terminal

Comments

@n888
Copy link

n888 commented May 16, 2022

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 am using the 'latest' image tag v2.4.0+c29651d from 2022-05-16 to test this feature.

Some pods only display the shell prompt, and I am not able to input anything via keyboard.

ArgoCD logs an error when trying to launch a terminal in for the problematic containers:
websocket: unexpected reserved bits 0x60

The one thing common thing about the containers with issues is they are using alpine based images.
I have confirmed the issue with the following images so far:

  • alpine:3.15.4
  • alpine:3.14.6
  • alpine:3.13.10
  • alpine:3.12.12
  • argocd-redis (redis:6.2.6-alpine)

I have tested on EKS and k3s and both display the same behaviour.

Logs:

To Reproduce

Deploy a Pod with an alpine based image and open terminal in ArgoCD UI.

Expected behavior

Should be able to enter keystrokes into the terminal.

Screenshots

Version

argocd: v2.4.0+c29651d
  BuildDate: 2022-05-16T15:41:21Z
  GitCommit: c29651de917ff5ecdf91648ea9281b9bb0352e21
  GitTreeState: clean
  GoVersion: go1.18.2
  Compiler: gc
  Platform: linux/arm64

Logs

server time="2022-05-16T22:13:38Z" level=info msg="received unary call /cluster.SettingsService/Get" grpc.method=Get grpc.request.claims="{\"at_hash\":\"Ulm5SphVcflrtzyB31C9lA\",\"aud\":\"qm5l3mk26hd16
m56hqi4o0k14\",\"auth_time\":1652739025,\"cognito:groups\":[\"admin\"],\"cognito:username\":\"user\",\"email\":\"user@user.com\",\"email_verified\":true,\"event_id\":\"7787e204-1918-4afb-8398-94e45
dc7c1b5\",\"exp\":1652742625,\"iat\":1652739025,\"iss\":\"https://IDP.com/us-west-2_xxx\",\"phone_number\":\"+1\",\"phone_number_verified\":true,\"sub\":\"b5
7c61e5-ef73-4cfe-b683-0077465c1f24\",\"token_use\":\"id\"}" grpc.request.content= grpc.service=cluster.SettingsService grpc.start_time="2022-05-16T22:13:38Z" span.kind=server system=grpc               
server time="2022-05-16T22:13:38Z" level=info msg="Ignore status for CustomResourceDefinitions"                                                                                                          
server time="2022-05-16T22:13:38Z" level=info msg="Ignore '/spec/preserveUnknownFields' for CustomResourceDefinitions"                                                                                   
server time="2022-05-16T22:13:38Z" level=info msg="finished unary call with code OK" grpc.code=OK grpc.method=Get grpc.service=cluster.SettingsService grpc.start_time="2022-05-16T22:13:38Z" grpc.time_m
s=10.738 span.kind=server system=grpc                                                                                                                                                                    
server E0516 22:13:38.699432       1 v2.go:105] EOF                                                                                                                                                      
server time="2022-05-16T22:13:39Z" level=error msg="read message err: websocket: unexpected reserved bits 0x60"                                                                                          
server E0516 22:13:39.828053       1 v2.go:105] websocket: unexpected reserved bits 0x60                                                                                                                 
server time="2022-05-16T22:14:25Z" level=info msg="finished streaming call with code OK" grpc.code=OK grpc.method=WatchResourceTree grpc.service=application.ApplicationService grpc.start_time="2022-05-
16T22:13:25Z" grpc.time_ms=60000.566 span.kind=server system=grpc         

Please let me know if I can provide or test anything further, Thank you.

@n888 n888 added the bug Something isn't working label May 16, 2022
@n888
Copy link
Author

n888 commented May 18, 2022

Looks like ArgoCD is having issues spawning a terminal with the alpine ash shell.

It works after adding bash package:

apk add bash

@djfinnoy
Copy link
Contributor

Encountered this problem, and discovered something important:

When you get the RBAC settings correct, you are only able to use UI exec on containers where bash is installed. Containers with sh will give you weird issues with websockets, and terminals where you are not allowed to type any input.

@crenshaw-dev
Copy link
Member

I'm gonna close this as a duplicate to consolidate discussion on #9641. If these turn out to be distinct, I'll reopen. :-)

@crenshaw-dev crenshaw-dev closed this as not planned Won't fix, can't repro, duplicate, stale Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component:web-terminal
Projects
None yet
Development

No branches or pull requests

3 participants