Failed to accept WebSocket connection WebSocket protocol violation

I am overhauling our Coder server deployment. It is in a private AWS subnet with an AWS client VPN endpoint allowing my laptop to connect to the subnet. I can use the HTTP API (via simple commands like workspaces list in the CLI) and access the web dashboard.

However when I run the template create command I get a weird networking error. This new deployment of Coder is much more locked down and only allows traffic on the port in the access URL. Additionally now the Coder server is behind an Nginx reverse proxy.

Here is the full terminal output:

$ coder template create aws-linux --directory ./aws-linux/terraform --verbose
> Create and upload "aws-linux/terraform"? (yes/no) yes
⧗  Queued 
WebSocket protocol violation: handshake request must be at least HTTP/1.1: "HTTP/1.0"                                                                                              
{"message":"Failed to accept websocket.","detail":"failed to accept WebSocket connection: WebSocket protocol violation: handshake request must be at least HTTP/1.1: \"HTTP/1.0\""}
.                                                                                                                                                                                  
logs: unexpected status code 426: WebSocket protocol violation: handshake request must be at least HTTP/1.1: "HTTP/1.0"                                                            
{"message":"Failed to accept websocket.","detail":"failed to accept WebSocket connection: WebSocket protocol violation: handshake request must be at least HTTP/1.1: \"HTTP/1.0\""}
                                                                                                                                                                                   
Run 'coder templates create --help' for usage.
Was this page helpful?