Coder.comC
Coder.com9mo ago
80 replies
yuji.fushiguro

failed to WebSocket dial: failed to send handshake request on private EKS

I have a private EKS cluster with cert-manager and DNS installed on the cluster. Attached are my test files. I exec inside the pod with a kubectl exec command. Once I'm inside the pod I log into coder with the coder login command. From there I pull, modify, and push my template. When I run the coder template push command I get the following error:

coder template push -y
=== ✔ Queued [0ms]
==> ⧗ Running
==> ⧗ Running
Encountered an error running "coder templates push", see "coder templates push --help" for more information
error: API request error to "GET:http://coder.example.com/api/v2/templateversions/90463ed1-d72f-46bf-a4eb-e9f8f8d3d139/logs?follow". Status code 426
Trace=[begin streaming logs: ]
unexpected non-JSON response "text/plain; charset=utf-8"
WebSocket protocol violation: Connection header "close" does not contain Upgrade
{"message":"Failed to accept websocket.","detail":"failed to accept WebSocket connection: WebSocket protocol violation: Connection header "close" does not contain Upgrade"}

```

This error also occurs when I'm not inside a pod. When I login to coder via CLI from outside the cluster, I get the same error.
Solution
Hey @Phorcys

I fixed the websocket error. Within my ingress annotations I had there following

nginx.ingress.kubernetes.io/websocket-service: “coder

I just updated

nginx.org/websocket-service: “coder

And everything started working. Now I just gotta figure out how to get coder web browser to use IPv4 instead of IPv6. I’m getting a 502 error and I try to open code-server in the browser. But I’m able to use VS Code Desktop just fine.
Was this page helpful?