Skip to content

[Bug]: Sandbox probe fails with localhost health connection refused even when Docker doctor is healthy #762

@benjaminshafii

Description

@benjaminshafii

User report

A user report diagnostic bundle shows sandbox probe failure despite Docker preflight success.

Repro evidence (sanitized)

  • App: v0.11.134 (d1658182f0ca)
  • Orchestrator: 0.11.133
  • OpenWork server: 0.11.132
  • sandbox_doctor: ready=true
    • docker --version status 0
    • docker info status 0
  • Probe duration: ~90s (startedAt -> finishedAt)
  • Final error:
    • Sandbox probe failed to start: http://127.0.0.1:<port>/health: Connection refused (os error 61)

Why this matters

This is a distinct failure mode from Docker-preflight-not-ready. The system passes Docker checks but fails to bring up or reach the probe health endpoint.

Expected behavior

If Docker doctor is healthy, sandbox probe should either:

  • reach healthy endpoint within bounded time, or
  • fail fast with clear stage-level diagnostics indicating whether process start, bind, or readiness failed.

Suggested investigation

  1. Add structured stage logs around detached orchestrator startup (spawned pid, selected host/port, first bind success, first health attempt).
  2. Verify health endpoint bind/address assumptions (127.0.0.1 vs host mode/network namespace edge cases).
  3. Ensure probe timeout path emits final reason with last known orchestrator stderr/stdout snippet.
  4. Check version skew effects (app 0.11.134 + orchestrator 0.11.133 + server 0.11.132) on probe contract.

Acceptance criteria

  • Repro scenario no longer ends in opaque connection refused after successful doctor.
  • Failure output includes deterministic stage and actionable remediation.
  • Probe reliability validated on macOS with OrbStack/Docker Desktop variants.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions