Skip to content

[Bug][Windows/Docker Desktop] "Timeout waiting for Temporal" - gRPC health check fails on Windows/WSL2 #331

@nlgbao1340

Description

@nlgbao1340

Environment

  • OS: Windows 11 with Docker Desktop (WSL2 backend)
  • Shannon version: 1.2.0 (npx @keygraph/shannon)
  • Docker Desktop version: [your version]

What happens

Running npx @keygraph/shannon start always ends with:
Waiting for Temporal to be ready...
Timeout waiting for Temporal

Image

The shannon-temporal container starts and is running, but Shannon times out waiting for it.

Root cause

Shannon's readiness check (isTemporalReady() in index.mjs) runs:

docker exec shannon-temporal temporal operator cluster health --address localhost:7233

On Windows/Docker Desktop, this command always fails with: Error: failed reaching server: context deadline exceeded

This is a known issue with Temporal on Windows/WSL2 - the server binds to the container's internal IP, not 127.0.0.1, so the gRPC health check cannot connect via localhost inside the container.

Reference: temporalio/docker-compose#225

Verification

The Temporal HTTP interface (port 8233) works correctly:
curl http://localhost:8233/ → HTTP 200
Only the gRPC health check fails.

Suggested fix

Fall back to an HTTP check when the gRPC check fails:

  function isTemporalReady() {
    const grpc = runOutput("docker", [
      "exec", "shannon-temporal",
      "temporal", "operator", "cluster", "health", "--address", "localhost:7233"
    ]);
    if (grpc.includes("SERVING")) return true;

    // Fallback for Windows/Docker Desktop where gRPC health check fails
    const http = runOutput("docker", [
      "exec", "shannon-temporal",
      "sh", "-c", "wget -q -O /dev/null http://localhost:8233/ && echo SERVING"
    ]);
    return http.includes("SERVING");
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions