Skip to content

When CLI connections fail, show human readable diagnostics #12297

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

Closed
spikecurtis opened this issue Feb 26, 2024 · 0 comments
Closed

When CLI connections fail, show human readable diagnostics #12297

spikecurtis opened this issue Feb 26, 2024 · 0 comments
Labels
cli Area: CLI networking Area: networking stale This issue is like stale bread.

Comments

@spikecurtis
Copy link
Contributor

Problem

Right now, when CLI connections to workspaces fail (ssh, port-forward, ping, speedtest, etc) we often don't surface any human readable diagnostics that could help customers self-troubleshoot.

Proposal

When we fail to connect, we could present a brief checklist of what requirements succeeded or failed:

  1. Could we connect to Coder server?
  2. Is the agent connected to Coder server?
  3. Did we connect to DERP?
  4. Did we Coordinate?
    1. Did we send our node?
    2. Did we get the Agent node?
  5. Did Disco succeed?
  6. Did Wireguard handshake?
@spikecurtis spikecurtis added feature networking Area: networking labels Feb 26, 2024
@matifali matifali added the cli Area: CLI label Feb 26, 2024
spikecurtis added a commit that referenced this issue Feb 27, 2024
Beginnings of a solution to #12297 

Doesn't cover disco or definitively display whether we successfully connected to DERP, but shows some checklist diagnostics for connecting to an agent.

For this first PR, I just added it to `coder ping` to see how we like it, but could be incorporated into `coder ssh` _et al._ after a timeout.

```
$ coder ping dogfood2
p2p connection established in 147ms
pong from dogfood2 p2p via  95.217.xxx.yyy:42631  in 147ms
pong from dogfood2 p2p via  95.217.xxx.yyy:42631  in 140ms
pong from dogfood2 p2p via  95.217.xxx.yyy:42631  in 140ms
✔ preferred DERP region 999 (Council Bluffs, Iowa)
✔ sent local data to Coder networking coodinator
✔ received remote agent data from Coder networking coordinator
    preferred DERP 10013 (Europe Fly.io (Paris))
    endpoints: 95.217.xxx.yyy:42631, 95.217.xxx.yyy:37576, 172.17.0.1:37576, 172.20.0.10:37576
✔ Wireguard handshake 11s ago
```
@github-actions github-actions bot added the stale This issue is like stale bread. label Aug 25, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Area: CLI networking Area: networking stale This issue is like stale bread.
Projects
None yet
Development

No branches or pull requests

2 participants