cloudflared access tcp: ERR failed to connect to origin error="websocket: bad handshake"
I'm attempting to connect to an connect to an access app via the cli, but, for some reason it fails.
> cloudflared access tcp --hostname https://nomad.example.org --listener localhost:8080 --log-level debug
> curl localhost:8080
curl: (56) Recv failure: Connection reset by peer
2021-08-10T13:43:10Z INF Start Websocket listener host=localhost:8080
2021-08-10T13:43:11Z DBG Websocket request: GET / HTTP/1.1
Host: nomad.example.org
2021-08-10T13:43:13Z DBG Access Websocket request: GET / HTTP/1.1
Host: nomad.example.org
Cf-Access-Token: my-token
2021-08-10T13:43:13Z DBG Websocket response: "HTTP/1.1 307 Temporary Redirect\r\nTransfer-Encoding: chunked\r\nCf-Cache-Status: DYNAMIC\r\nCf-Ray: 67c9a6e45dff34c6-DUB\r\nConnection: keep-alive\r\nContent-Type: text/html; charset=utf-8\r\nDate: Tue, 10 Aug 2021 13:43:13 GMT\r\nExpect-Ct: max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"\r\nLocation: /ui/\r\nServer: cloudflare\r\nVary: Accept-Encoding\r\n\r\n28\r\n<a href=\"/ui/\">Temporary Redirect</a>.\n\n\r\n0\r\n\r\n"
2021-08-10T13:43:13Z ERR failed to connect to origin error="websocket: bad handshake" originURL=https://nomad.example.org
It's getting the expected response from the origin server, but cloudflared is not returning it.
cloudflared access curl https://nomad.example.org works as expected.
version
> cloudflared version
cloudflared version 2021.8.2 (built 2021-08-09-1729 UTC)
Have you checked to ensure the requests are not getting blocked by Bot Fight Mode or the Firewall?
@chris-martinelli yep, nothing blocked there.
Me waiting fr this to resolve 🥲
Cmon man resolve this its 2 much l8
@MOOGAA This error can surface when a few conditions exist. Have you gone through this troubleshooting guide to ensure client side cloudflared is properly configured?