Replies: 1 comment
-
|
Hi @spiffaz, I work on Teleport app access. I ran into the same two symptoms IIUC what you are hitting is two separate problems, and each needs its own fix. 1. Browser WebSocket upgrades returning Teleport HTMLCoder validates the app_service:
apps:
- name: coder
uri: http://coder.coder.svc.cluster.local
public_addr: coder.org.teleport.sh
rewrite:
headers:
- "Host: coder.org.teleport.sh"
- "Origin: https://coder.org.teleport.sh"This is the same pattern the Teleport docs recommend for Grafana and 2. DERP and agent traffic being redirected to
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Environment
http://coder.coder.svc.cluster.localhttps://coder.org.teleport.shProblem Description
We're experiencing two connectivity issues with Coder when accessed through Teleport:
WebSocket Connection Failures:
/health/websockethealth check endpoint failsDERP Relay Connection Failures:
/health/derphealth check endpoint failsThese issues only occur when Coder is accessed through Teleport. The basic UI loads correctly, but workspace connections and other WebSocket/DERP dependent functionality fail.
Error Details
WebSocket Error
HTML Response Received (instead of WebSocket upgrade)
DERP Connection Error
DERP Connection Logs
Health Check Failures
Current Coder Configuration
We haven't made any special configuration changes to Coder besides deploying it in Kubernetes. We're investigating whether we need specific environment variables or configuration for proxy deployments.
URL Configuration Challenge
A key challenge we're facing is related to the CODER_ACCESS_URL configuration. We're specifically concerned about how Coder handles internal communication between components.
Current Limitation:
We're currently using a single CODER_ACCESS_URL which points to our Teleport-proxied external URL (https://coder.org.teleport.sh). This creates a problem because:
When users access Coder, they go through this URL and authenticate with Teleport, which works fine for basic UI access.
However, Coder's internal components (including WebSocket connections and DERP relay) also attempt to use this same URL for their communication.
Our Teleport proxy requires authentication for all requests, which creates a conflict for these internal communications that aren't designed to handle Teleport's authentication.
We've researched CODER_DERP_SERVER_RELAY_URL but understand this is specifically for inter-node communication in high-availability setups, not for separating user access from internal component communication.
Troubleshooting Steps Taken
CODER_FORCE_WEBSOCKET_RELAY=true, but this alone didn't resolve the issueQuestions
CODER_DERP_SERVER_ENABLED=false) resolve the DERP issue? What functionality would be impacted if we disable it?CODER_ACCESS_URLneed to be set to our external Teleport URL?Requested Assistance
We need guidance on the correct configuration to make Coder work properly when accessed through a proxy like Teleport. Specifically:
We're very limited by the single CODER_ACCESS_URL configuration because our Teleport proxy needs authentication for all requests, which Coder's internal components can't provide. Any solution that allows components to communicate directly while still allowing user access through our proxy would resolve our issues.
Thank you for your assistance.
Beta Was this translation helpful? Give feedback.
All reactions