dashboard icon indicating copy to clipboard operation
dashboard copied to clipboard

Exec-ing into pod not working - "Server lost session"

Open dagobertdocker opened this issue 1 year ago • 6 comments

What happened?

When trying to initiate new terminal session in pod from dashboard, the terminal screen stays black, and a message is displayed "Server lost session". In the logs, I see

[kubernetes-dashboard-api] 2024/03/11 13:59:01 handleTerminalSession: can't Recv: sockjs: session not in open state

What did you expect to happen?

Interactive terminal session established and shell prompt visible.

How can we reproduce it (as minimally and precisely as possible)?

  1. Deploy Kubernetes Dashboard via helm chart
  2. Navigate to a pod details page
  3. Click "Exec into pod"
  4. Observe "Server lost session" error message

Anything else we need to know?

No response

What browsers are you seeing the problem on?

Firefox

Kubernetes Dashboard version

7.1.2

Kubernetes version

1.26.9

Dev environment

No response

dagobertdocker avatar Mar 11 '24 14:03 dagobertdocker

I could not reproduce it based on the provided steps. Tested on Firefox/Chrome and exec works just fine.

floreks avatar Mar 12 '24 16:03 floreks

I upgraded to k8s 1.28.7, and since then, the problem is gone.

dagobertdocker avatar Mar 13 '24 05:03 dagobertdocker

For future reference:

I am using a setup with HAProxy -> NGINX Inc's Ingress -> gogatekeeper (OAuth2 proxy) -> Kong service of Dashboard. In the end, I had to whitelist the /api/sockjs path in gogatekeeper (it seems to remove auth headers) to get it to work consistently..

dagobertdocker avatar Mar 19 '24 14:03 dagobertdocker

I have this issue on 1.28.5 EKS as well

shnigam2 avatar Mar 26 '24 10:03 shnigam2

Correction, it does not work consistently, but randomly. So, this issue is open and being tracked in #8838 I assume..

dagobertdocker avatar Apr 03 '24 09:04 dagobertdocker

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Jul 02 '24 10:07 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Aug 01 '24 11:08 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

k8s-triage-robot avatar Aug 31 '24 11:08 k8s-triage-robot

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

k8s-ci-robot avatar Aug 31 '24 11:08 k8s-ci-robot