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

Intercept spec requires connection: bug? error messaging unclear? #3538

Open
RobertFischer opened this issue Mar 4, 2024 · 2 comments
Open

Comments

@RobertFischer
Copy link

RobertFischer commented Mar 4, 2024

This looks like a UI messaging issue, although maybe there's something more to it than that.

When using an intercept spec file, you need to have a connection established first before running the intercept file. If the daemon is running but disconnected, you get a decipherable (although somewhat cryptic) message about "rpc" and "No active session". If the daemon is not running, however, the error message is about not being able to reach the cluster.

If the intercept spec file is supposed to be able to run without a connection, then we have a bug and I'm happy to give more information to debug it.

If the intercept spec file is supposed to require a connection, then it'd be nice if the error message in these cases said something about needing to connect before running the intercept file.

I don't see anything in the documentation that specifies whether or not a connection is required, although it's entirely possible that I missed it.

robert@dev-robert:~$ telepresence intercept run ./tp-spec.yaml
Intercept spec "test-spec" started successfully, use ctrl-c to cancel.
robert@dev-robert:~$ telepresence quit
Disconnected
robert@dev-robert:~$ telepresence intercept run ./tp-spec.yaml
telepresence intercept run: error: rpc error: code = Unavailable desc = no active session

See logs for details (2 errors found): "/home/robert/.cache/telepresence/logs/daemon.log"
See logs for details (3 errors found): "/home/robert/.cache/telepresence/logs/connector.log"
If you think you have encountered a bug, please run `telepresence gather-logs` and attach the telepresence_logs.zip to your github issue or create a new one: https://github.com/telepresenceio/telepresence/issues/new?template=Bug_report.md .
robert@dev-robert:~$ telepresence quit -s
Telepresence Daemons quitting...done
robert@dev-robert:~$ telepresence intercept run ./tp-spec.yaml
Launching Telepresence User Daemon
telepresence intercept run: error: connector.Connect: initial cluster check failed: Get "https://127.0.0.1:6443/version": dial tcp 127.0.0.1:6443: connect: connection refused

Logs:
telepresence_logs.zip

Versions:

robert@dev-robert:~$ uname -a
Linux dev-robert 6.5.0-1014-gcp #14~22.04.1-Ubuntu SMP Sat Feb 10 04:57:00 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
robert@dev-robert:~$ telepresence version
Client         : v2.19.0
Root Daemon    : v2.19.0
User Daemon    : v2.19.0
Traffic Manager: v2.19.0
Traffic Agent  : docker.io/datawire/ambassador-telepresence-agent:1.14.4
robert@dev-robert:~$ k3s --version
k3s version v1.28.6+k3s2 (c9f49a3b)
go version go1.20.13
@cindymullins-dw
Copy link
Collaborator

Hi @RobertFischer , generally you do need to run telepresence connect before starting an intercept (either global or personal), so that's probably also required with the Intercept Specification. For example, with a global intercept you do need to start by running telepresence connect to your cluster.

@cindymullins-dw
Copy link
Collaborator

Before running your intercept spec, are you able to connect to your cluster and get your pods?
Can you run kubectl get pods to check that?
Perhaps your kubeconfig is not configured such that Telepresence can connect to it.

If that checks out, you could share with us your Intercept Spec for confirmation.
Actually the intercept spec can also take care of your connect, provided it’s properly configured.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants