Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Workspace agent remains stuck at "connecting" after restart #28759

Description

@zlncl

Version: v2.36.3+7e0ff4c

Problem

A workspace is shown as Running, but its main workspace agent remains stuck at:

Workspace agent is connecting

The agent never reaches the connected state.

As a result, Web Terminal, code-server, SSH, and other workspace applications are unavailable.

Restarting the workspace does not resolve the issue.

Environment

  • Coder version: v2.36.3+7e0ff4c
  • Coder URL: https://coder.fiblab.net
  • Workspace backend: Kubernetes
  • Client OS: Windows
  • Browser access to the Coder deployment works normally

Client-side network checks

DNS resolution works:

  • coder.fiblab.net -> edge.fiblab.net
  • The load balancer resolves to:
    • 123.57.172.228
    • 8.140.223.163
    • 60.205.195.182

TCP connectivity to port 443 succeeds:

TcpTestSucceeded : True

HTTPS access also succeeds:

HTTP/1.1 200 OK
X-Coder-Build-Version: v2.36.3+7e0ff4c

I also tested all three load-balancer IP addresses individually using curl --resolve, and all returned HTTP 200.

Disabling the local VPN did not change the behavior.

Steps to reproduce
Start a workspace.
The workspace resource reaches Running.
The main workspace agent stays at Workspace agent is connecting.
Wait for an extended period.
Restart the workspace.
The workspace starts again, but the agent remains stuck in the connecting state.
Expected behavior

The workspace agent should connect after the workspace starts, allowing Terminal, SSH, VS Code, and workspace applications to become available.

Actual behavior

The workspace resource is running, but the workspace agent never connects.

Additional information

The issue appears to be between the workspace agent and the Coder deployment rather than between the client machine and the Coder server, because client-side DNS, TCP 443, TLS, and HTTPS connectivity are all working.

What additional server-side or workspace-agent logs would be useful for diagnosing this?

In particular, should we inspect:

/tmp/coder-agent.log
/tmp/coder-startup-script.log
workspace Pod outbound HTTPS/WSS connectivity
Kubernetes NetworkPolicy
Ingress/WebSocket configuration

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    onboarding-improvementOnboarding and first-time installation experience.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions