Turtle Kayak
Turtle Kayak
CCoder.com
Created by Turtle Kayak on 11/21/2022 in #help
TF_LOG verbose Terraform output?
Okay turns out you can just set TF_LOG=1 in the Coder server's environment and it will enable verbose Terraform output
3 replies
CCoder.com
Created by Turtle Kayak on 11/19/2022 in #help
Failed to accept WebSocket connection WebSocket protocol violation
Looks like only 1.0 and 1.1 are supported values for that option http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_http_version
54 replies
CCoder.com
Created by Turtle Kayak on 11/19/2022 in #help
Failed to accept WebSocket connection WebSocket protocol violation
I'll try 2.0 and edit the above config if it works
54 replies
CCoder.com
Created by Turtle Kayak on 11/19/2022 in #help
Failed to accept WebSocket connection WebSocket protocol violation
Here is the full working Nginx conf for reference
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}

server {
listen 80;
server_name coder-server.dev.mainstay;

location / {
proxy_pass http://localhost:3000;

# Required to make server communication work correctly: https://discord.com/channels/747933592273027093/1007075267119947807/1007314775493070978
proxy_pass_request_headers on;

proxy_http_version 1.1;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Accept-Encoding gzip;
}
}
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}

server {
listen 80;
server_name coder-server.dev.mainstay;

location / {
proxy_pass http://localhost:3000;

# Required to make server communication work correctly: https://discord.com/channels/747933592273027093/1007075267119947807/1007314775493070978
proxy_pass_request_headers on;

proxy_http_version 1.1;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Accept-Encoding gzip;
}
}
54 replies
CCoder.com
Created by Turtle Kayak on 11/19/2022 in #help
Failed to accept WebSocket connection WebSocket protocol violation
1.1
54 replies
CCoder.com
Created by Turtle Kayak on 11/19/2022 in #help
Failed to accept WebSocket connection WebSocket protocol violation
So I guess it's good to know that setting the http version is also a key to the puzzle
54 replies
CCoder.com
Created by Turtle Kayak on 11/19/2022 in #help
Failed to accept WebSocket connection WebSocket protocol violation
Been a while since that happened 😅
54 replies
CCoder.com
Created by Turtle Kayak on 11/19/2022 in #help
Failed to accept WebSocket connection WebSocket protocol violation
Whoa did a slash cmd just work in mobile 👀👀👀
54 replies
CCoder.com
Created by Turtle Kayak on 11/19/2022 in #help
Failed to accept WebSocket connection WebSocket protocol violation
Thank you so much @Phorcys and @colin (rust enthusiast) !
54 replies
CCoder.com
Created by Turtle Kayak on 11/19/2022 in #help
Failed to accept WebSocket connection WebSocket protocol violation
:poggers: :poggers: :poggers: :poggers:
54 replies
CCoder.com
Created by Turtle Kayak on 11/19/2022 in #help
Failed to accept WebSocket connection WebSocket protocol violation
Setting the http version did it
54 replies
CCoder.com
Created by Turtle Kayak on 11/19/2022 in #help
Failed to accept WebSocket connection WebSocket protocol violation
Um
54 replies
CCoder.com
Created by Turtle Kayak on 11/19/2022 in #help
Failed to accept WebSocket connection WebSocket protocol violation
....
54 replies
CCoder.com
Created by Turtle Kayak on 11/19/2022 in #help
Failed to accept WebSocket connection WebSocket protocol violation
I mean good to at least see if the server is functioning. I logged in w the CLI on the server, but not through the reverse proxy and directly through the local port. The template create cmd worked
54 replies
CCoder.com
Created by Turtle Kayak on 11/19/2022 in #help
Failed to accept WebSocket connection WebSocket protocol violation
I saw in the help thread linked above that there were two different versions of the Nginx config. You version and then someone else posted a screenshot of theirs. In theirs they set the Connection header to lowercase upgrade while yours had uppercase. They also set the http version manually. Could that make a difference?
54 replies
CCoder.com
Created by Turtle Kayak on 11/19/2022 in #help
Failed to accept WebSocket connection WebSocket protocol violation
And it seems like some normal cmds like listing workspaces and listing templates works
54 replies
CCoder.com
Created by Turtle Kayak on 11/19/2022 in #help
Failed to accept WebSocket connection WebSocket protocol violation
Yea
54 replies
CCoder.com
Created by Turtle Kayak on 11/19/2022 in #help
Failed to accept WebSocket connection WebSocket protocol violation
54 replies
CCoder.com
Created by Turtle Kayak on 11/19/2022 in #help
Failed to accept WebSocket connection WebSocket protocol violation
It's all in there
54 replies
CCoder.com
Created by Turtle Kayak on 11/19/2022 in #help
Failed to accept WebSocket connection WebSocket protocol violation
It looks like AWS client VPN does work w WebSockets so I think I'm configuring something wrong or idk but it should be possible
54 replies