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

Error with k8sPortForwardDialer dial: Upgrade request required #3419

Open
mausch opened this issue Nov 7, 2023 · 4 comments
Open

Error with k8sPortForwardDialer dial: Upgrade request required #3419

mausch opened this issue Nov 7, 2023 · 4 comments
Labels
feature New feature or enhancement request

Comments

@mausch
Copy link

mausch commented Nov 7, 2023

Describe the bug

$ telepresence connect

Launching Telepresence Root Daemon
Launching Telepresence User Daemon
telepresence connect: error: connector.Connect: the port-forward connection to the traffic manager timed out.  The current timeout 1m0s can be configured as "timeouts.trafficManagerConnect" in "/home/mauricio/.config/telepresence/config.yml"

$ telepresence loglevel debug
telepresence loglevel: error: connector.Connect: the port-forward connection to the traffic manager timed out.  The current timeout 1m0s can be configured as "timeouts.trafficManagerConnect" in "/home/mauricio/.config/telepresence/config.yml"

$ telepresence gather-logs
error getting logs from kubernetes components: rpc error: code = Unavailable desc = no active session

These are all the logs I have:

connector.log:

2023-11-07 09:21:24.0528 info    ---
2023-11-07 09:21:24.0528 info    Telepresence Connector v2.10.4 (api v3) starting...
2023-11-07 09:21:24.0528 info    PID is 3617605
2023-11-07 09:21:24.0528 info    
2023-11-07 09:21:24.0537 info    connector/server-grpc : gRPC server started
2023-11-07 09:21:24.2810 info    connector/session : -- Starting new session
2023-11-07 09:21:24.2811 info    connector/session : Connecting to k8s cluster...
2023-11-07 09:21:24.4800 info    connector/session : Server version v1.28.2+k3s1
2023-11-07 09:21:24.4801 info    connector/session : Context: loft-test-user
2023-11-07 09:21:24.4801 info    connector/session : Server: https://vcluster.elevate.direct/kubernetes/project/default/virtualcluster/vcluster-test-user
2023-11-07 09:21:24.4802 info    connector/session : Connected to context loft-test-user (https://vcluster.elevate.direct/kubernetes/project/default/virtualcluster/vcluster-test-user)
2023-11-07 09:21:24.6941 info    connector/session : Connecting to traffic manager...
2023-11-07 09:21:25.1745 error   connector/session : Error with k8sPortForwardDialer dial: Upgrade request required
2023-11-07 09:21:26.5251 error   connector/session : Error with k8sPortForwardDialer dial: Upgrade request required
2023-11-07 09:21:28.1803 error   connector/session : Error with k8sPortForwardDialer dial: Upgrade request required
2023-11-07 09:21:30.7111 error   connector/session : Error with k8sPortForwardDialer dial: Upgrade request required
2023-11-07 09:21:34.3111 error   connector/session : Error with k8sPortForwardDialer dial: Upgrade request required
2023-11-07 09:21:41.8341 error   connector/session : Error with k8sPortForwardDialer dial: Upgrade request required
2023-11-07 09:21:54.6083 error   connector/session : Error with k8sPortForwardDialer dial: Upgrade request required
2023-11-07 09:22:09.9002 error   connector/session : Error with k8sPortForwardDialer dial: Upgrade request required
2023-11-07 09:22:24.6948 error   connector/session : Unable to connect to session: the port-forward connection to the traffic manager timed out.  The current timeout 1m0s can be configured as "timeouts.trafficManagerConnect" in "/home/mauricio/.config/telepresence/config.yml"

daemon.log:

2023-11-07 09:21:23.8039 info    ---
2023-11-07 09:21:23.8040 info    Telepresence daemon v2.10.4 (api v3) starting...
2023-11-07 09:21:23.8040 info    PID is 3617592
2023-11-07 09:21:23.8040 info    
2023-11-07 09:21:23.8045 info    daemon/server-grpc : gRPC server started

Versions (please complete the following information):

  • Output of telepresence version
OSS Client     : v2.10.4
OSS Root Daemon: v2.10.4
OSS User Daemon: v2.10.4
Traffic Manager: not connected
  • Operating system of workstation running telepresence commands: Ubuntu 22.04.03
  • Kubernetes environment and Version [e.g. Minikube, bare metal, Google Kubernetes Engine]: v1.28.2+k3s1
@mausch
Copy link
Author

mausch commented Nov 7, 2023

This was caused by a AWS ELB that was configured on HTTP instead of TCP.
i.e. set "service.beta.kubernetes.io/aws-load-balancer-backend-protocol": "tcp" in the nginx ingress controller config.

Telepresence should catch this "Upgrade request required" error and show a more specific message e.g. at least "Could not establish a websocket connection"

@thallgren
Copy link
Member

Yeah, maybe. Then again, a google search for "Upgrade request required" very quickly reveals what the problem is. A search for "Could not establish a websocket connection", not so much. This is why we, in general, try to convey the errors that the Kubernetes tooling gives us.

@mausch
Copy link
Author

mausch commented Nov 8, 2023

Telepresence could wrap the error message. This would make the error both googlable and more immediately actionable.

@cindymullins-dw cindymullins-dw added the feature New feature or enhancement request label Nov 13, 2023
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment, or this will be closed in 7 days.

@github-actions github-actions bot added the stale Issue is stale and will be closed label Aug 16, 2024
@thallgren thallgren removed the stale Issue is stale and will be closed label Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or enhancement request
Projects
None yet
Development

No branches or pull requests

3 participants