latest coder server + wgtunnel currently giving 404 errors

I created an https://github.com/coder/coder/issues/9480 with the full configuration details, as it may be that I'm missing something obvious to others: rm -rf ~/Library/Application\ Support/coderv2/{url,devtunnel,postgres/data} coder server --wg-tunnel-host try.sharing.io Coder v0.25.0+d843735 - Your Self-Hosted Remote Development Platform Started HTTP listener at http://127.0.0.1:3000 Using built-in PostgreSQL (/Users/hh/Library/Application Support/coderv2/postgres) Opening tunnel so workspaces can connect to your deployment. For production scenarios, specify an external access URL Using tunnel in Unknown with latency 51.205ms . Stopping built-in PostgreSQL... Stopped built-in PostgreSQL running command "coder server": create tunnel:
github.com/coder/coder/cli.(RootCmd).Server.func1
/home/runner/actions-runner/_work/coder/coder/cli/server.go:339
- initial client registration:
github.com/coder/wgtunnel/tunnelsdk.(
Client).LaunchTunnel
/home/runner/go/pkg/mod/github.com/coder/wgtunnel@v0.1.5/tunnelsdk/tunnel.go:191 - POST https://try.sharing.io/api/v2/clients: unexpected status code 404: Not found.
GitHub
coder server --wg-tunnel-host causes tunneld to return 404 · Issue ...
TLDR: tunneld and coder server most recent versions don't seem to work together (OR I'm missing something obvious to others in the configuration of them) code server attempt to use try.shar...
Solution:
As well as having all the usual annotations for websockets: ```yaml --- apiVersion: networking.k8s.io/v1 kind: Ingress...
Jump to solution
9 Replies
Codercord
Codercord13mo ago
<#1147124978429481021>
Category
Bug report
Product
Coder OSS (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
hippiehacker
hippiehacker13mo ago
It doesn't seem to matter what url I hit on the tunneld api, I get: {"message":"Not found."}
hippiehacker
hippiehacker13mo ago
GitHub
coder server --wg-tunnel-host causes tunneld to return 404 · Issue ...
TLDR: tunneld and coder server most recent versions don't seem to work together (OR I'm missing something obvious to others in the configuration of them) code server attempt to use try.shar...
hippiehacker
hippiehacker13mo ago
I think I tracked it down to the kubernetes ingress. In particular the spec.rules.http.paths.pathType must be ImplementationSpecific.
Solution
hippiehacker
hippiehacker13mo ago
As well as having all the usual annotations for websockets:
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: try
namespace: coder
annotations:
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
nginx.ingress.kubernetes.io/server-snippets: |
location / {
proxy_set_header Upgrade $http_upgrade;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_set_header Connection "upgrade";
proxy_cache_bypass $http_upgrade;
}
spec:
ingressClassName: nginx
rules:
- host: "try.sharing.io"
http:
paths:
- backend:
service:
name: tunneld-api
port:
name: http
path: /
pathType: ImplementationSpecific
- host: "*.try.sharing.io"
http:
paths:
- backend:
service:
name: tunneld-api
port:
name: http
path: /
pathType: ImplementationSpecific
tls:
- hosts:
- "try.sharing.io"
- "*.try.sharing.io"
secretName: try-tls
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: try
namespace: coder
annotations:
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
nginx.ingress.kubernetes.io/server-snippets: |
location / {
proxy_set_header Upgrade $http_upgrade;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_set_header Connection "upgrade";
proxy_cache_bypass $http_upgrade;
}
spec:
ingressClassName: nginx
rules:
- host: "try.sharing.io"
http:
paths:
- backend:
service:
name: tunneld-api
port:
name: http
path: /
pathType: ImplementationSpecific
- host: "*.try.sharing.io"
http:
paths:
- backend:
service:
name: tunneld-api
port:
name: http
path: /
pathType: ImplementationSpecific
tls:
- hosts:
- "try.sharing.io"
- "*.try.sharing.io"
secretName: try-tls
hippiehacker
hippiehacker13mo ago
tldr: Ensure you have PathType: ImplementationSpecific
spec:
rules:
- host: "*.try.sharing.io"
http:
paths:
- backend:
service:
name: tunneld-api
port:
name: http
path: /
pathType: ImplementationSpecific
spec:
rules:
- host: "*.try.sharing.io"
http:
paths:
- backend:
service:
name: tunneld-api
port:
name: http
path: /
pathType: ImplementationSpecific
Phorcys
Phorcys13mo ago
@hippiehacker can I close this ?
hippiehacker
hippiehacker13mo ago
Yes
Codercord
Codercord13mo ago
@Phorcys closed the thread.
Want results from more Discord servers?
Add your server