Skip to content

Coder CLI needs a clearer error when it connects to an incompatible server #13478

@spikecurtis

Description

@spikecurtis

If you connect with v2.12 CLI to an earlier Coder Server, with any command that connects to the agent (coder ssh, coder speedtest, coder port-forward, etc.), you'll see

2024-06-05 11:31:59.362 [erro]  failed to dial tailnet v2+ API  error="failed to WebSocket dial: expected handshake response status code 101 but got 400"
2024-06-05 11:31:59.572 [debu]  net.wgengine: ping(fd7a:115c:a1e0:405d:acae:5d4e:7d41:a808): no matching peer
2024-06-05 11:31:59.706 [debu]  dialing Coder tailnet v2+ API
2024-06-05 11:31:59.760 [erro]  failed to dial tailnet v2+ API  error="failed to WebSocket dial: expected handshake response status code 101 but got 400"
2024-06-05 11:31:59.872 [debu]  net.wgengine: ping(fd7a:115c:a1e0:405d:acae:5d4e:7d41:a808): no matching peer
2024-06-05 11:32:00.316 [debu]  dialing Coder tailnet v2+ API
2024-06-05 11:32:00.368 [erro]  failed to dial tailnet v2+ API  error="failed to WebSocket dial: expected handshake response status code 101 but got 400"
2024-06-05 11:32:00.512 [debu]  net.wgengine: ping(fd7a:115c:a1e0:405d:acae:5d4e:7d41:a808): no matching peer
2024-06-05 11:32:01.200 [debu]  net.wgengine: ping(fd7a:115c:a1e0:405d:acae:5d4e:7d41:a808): no matching peer
2024-06-05 11:32:01.266 [debu]  dialing Coder tailnet v2+ API
2024-06-05 11:32:01.318 [erro]  failed to dial tailnet v2+ API  error="failed to WebSocket dial: expected handshake response status code 101 but got 400"

I'm pretty sure the server is writing a reasonably helpful HTTP response with an error in the body, but here we only log the status code and it's not helpful.

Metadata

Metadata

Assignees

Labels

cliArea: CLInetworkingArea: networkings3Bugs that confuse, annoy, or are purely cosmetic

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy