-
Notifications
You must be signed in to change notification settings - Fork 249
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
cannot execute shell or view logs of pods that run on rancher cluster #2970
Comments
Hi, thanks for opening an issue! Could you provide logs from the console to see if there are any errors? |
I have this same issue (hence in WSL2 with Ubuntu 24.04), logs like this: `server process stderr: 2025/03/07 19:21:18 http: proxy error: context canceled server process stderr: 2025/03/07 19:21:18 http: proxy error: context canceled server process stderr: 2025/03/07 19:21:19 http: proxy error: context canceled server process stderr: {"level":"error","source":"/home/runner/work/headlamp/headlamp/backend/cmd/multiplexer.go","line":341,"error":"websocket: bad handshake","time":"2025-03-07T19:21:34+02:00","message":"dialing WebSocket"} server process stderr: {"level":"error","source":"/home/runner/work/headlamp/headlamp/backend/cmd/multiplexer.go","line":341,"error":"websocket: bad handshake","time":"2025-03-07T19:21:34+02:00","message":"dialing WebSocket"} server process stderr: {"level":"error","source":"/home/runner/work/headlamp/headlamp/backend/cmd/multiplexer.go","line":341,"error":"websocket: bad handshake","time":"2025-03-07T19:21:34+02:00","message":"dialing WebSocket"} |
Hi, Headlamp is amazing! I have this same issue on rancher cluster to load terminal: Failed to connect… Press the enter key to reconnect. And for and for show logs of pod too. Displays RECONNECT message. Thanks for all! |
We will disable the multiplexer for the upcoming version so it shall work in cases like this, and then re-enable in the main branch so we debug and fix it. Thanks. |
Hello @joaquimrocha, I have the same kind of issue: headlamp respond
which I can't find in the source code (probably external lib). I'm using the in-cluster installation with multi-cluster kubeconfig. My clusters are EKS but I'm not sure it really matters. Interesting clue: everything is working well with the |
Still same issue with headlamp 0.30.0, neither checking logs of pods or opening shell to pod are working.. |
I've looked into this and it seems that there's an issue with the way we connect to websockets that's only affecting rancher clusters. There's an old issue in the rancher repository that seems to align with this theory rancher/rancher#20153 Logs from my testsWith protocol authorization
but with a Authorization header it seems to work
kubectl works because it uses Authorization header so I'm not sure what's the fix for this yet but I'll look more into this |
Okay I found a possible solution, we need to use Authorization header and also replace user agent header because rancher has CORS-like check for websocket connections. This is specific to rancher clusters and ideally of course protocol auth should be added on rancher side, and cors should be configurable, but since kubectl works we should also make headlamp work with this |
Describe the bug
cannot execute shell or view logs of pods that run on rancher cluster
To Reproduce
Steps to reproduce the bug:
Environment (please provide info about your environment):
The text was updated successfully, but these errors were encountered: