-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
When using workspace port sharing (CODER_WILDCARD_ACCESS_URL) in workspaces with multiple agents, accessing ports outside the 4-digit range (1000-9999) fails with the error:
port specified with no agent, but multiple agents exist in the workspace
This affects common ports like:
- Low ports: 80, 443, 22 etc. (1-999)
- High ports: 10000+, including 12000, 30000, etc. (10000-65535)
Steps to Reproduce
- Create a workspace with multiple agents (e.g., devcontainer setup)
- Start a service on a port outside 1000-9999 range:
python -m http.server 12000
- Access the port via subdomain URL (e.g.,
https://12000--agent--workspace--user.coder.example.com)
Expected: Port forwards successfully to the specified agent
Actual: Error - "500 - Internal Server Error"
Coderd Logs
coderd.workspaceapps: workspace app auth server error: get app details from database
request_id=8eea5ccd-c355-43de-ba1c-91d1c726bcd8
username_or_id=username
workspace_and_agent=""
workspace_name_or_id=mx
agent_name_or_id=""
app_name_or_port=12000
hostname_prefix="" ...
error= port specified with no agent, but multiple agents exist in the workspace:
github.com/coder/coder/v2/coderd/workspaceapps.Request.getDatabase
/home/runner/work/coder/coder/coderd/workspaceapps/request.go:327
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels