Skip to content

[Onboard] Re-onboarding a Ready sandbox rejects its existing ForwardTcp dashboard listener #11074

Closed

Description

@sandl99

Investigation Summary

Description

Re-onboarding an existing Ready OpenClaw sandbox reuses the healthy OpenShell gateway and sandbox, but exits during step 7 with:

Error: Registered dashboard port 18789 is already occupied; it cannot be reallocated or adopted.

The listener is expected to remain live from the first successful onboarding. Sandbox reuse therefore reaches a dashboard-forward launch boundary that cannot distinguish the expected existing direct ForwardTcp service from a foreign listener.

The safety rule from #10691 remains required: NemoClaw must not adopt or signal an arbitrary listener. The missing behavior is an idempotent re-onboarding path that retains or verifies the already-healthy dashboard forward without recreating the sandbox.

Reproduction Steps

  1. Onboard an OpenClaw sandbox named tm and let onboarding complete successfully.

  2. Confirm the dashboard is registered on http://127.0.0.1:18789/.

  3. Without stopping or recreating the sandbox, run:

    nemoclaw onboard --name tm --agent openclaw --yes-i-accept-third-party-software
  4. Select and apply a valid inference provider configuration.

  5. Observe [reuse] Skipping sandbox (tm) followed by the dashboard-port error during step 7.

Environment

  • NemoClaw: v0.0.117-161-gd99d1dc579
  • OpenShell: 0.0.106
  • Docker server: 29.6.1
  • OpenClaw: 2026.7.1
  • Runtime: Docker, x86_64, CPU-only host
  • Resources: 12 vCPU / 23.4 GiB RAM
  • Host OS: not captured in the reproduction output

Debug Output

A debug bundle was not collected. The exact CLI versions, successful first-onboard output, failing second-onboard transition, and source-level trigger are recorded here.

Source inspection at commit d99d1dc579 shows this sequence in src/lib/onboard/dashboard.ts:

  1. Read the preferred and registry-persisted dashboard port.
  2. Observe that the host port is bound.
  3. Throw Registered dashboard port ... is already occupied before launching or reconciling the forward.

The guard and its lower-level unit test were introduced by #10695. The accepted migration issue #10691 intentionally requires occupied foreign listeners to fail closed, but it also requires normal recovery to retain or relaunch dashboard forwarding.

Logs

[6/8] Creating sandbox
──────────────────────────────────────────────────
[reuse] Skipping sandbox (tm)
✓ Active gateway set to 'nemoclaw'

[7/8] Setting up OpenClaw inside sandbox
──────────────────────────────────────────────────
✓ OpenClaw gateway launched inside sandbox
Error: Registered dashboard port 18789 is already occupied; it cannot be reallocated or adopted.

Onboarding did not finish. Resume from the step that failed with:
  nemoclaw onboard --resume

onboard --resume is not expected to make progress while the existing listener remains bound, because it reaches the same persisted-port guard.

Expected Result

  • Re-onboarding the same Ready sandbox retains its sandbox identity and registered dashboard port.
  • A healthy existing dashboard forward is retained or verified through the accepted ForwardTcp lifecycle without launching a duplicate process.
  • Onboarding completes deployment verification and exits 0.
  • A genuinely foreign listener on the registered port still fails closed and is never adopted or signaled.
  • No sandbox deletion or recreation occurs solely to reconcile a healthy dashboard forward.

Actual Result

The sandbox is reused, but onboarding treats its expected live dashboard listener as an unadoptable port conflict and exits before policy finalization.

Regression and Scope

This is a bug fix to an existing supported lifecycle, not a request to adopt unknown listeners or add a new product surface.

Acceptance Evidence

  • Add regression coverage for two consecutive successful onboarding runs against the same Ready OpenClaw sandbox using a direct ForwardTcp dashboard service.
  • Prove the second run retains the same sandbox identity and dashboard port, performs no duplicate forward launch, completes verification, and exits 0.
  • Preserve a negative test showing that an unrelated listener on the persisted port remains fail-closed and is not signaled.
  • Verify the printed resume path does not loop on the same healthy existing listener.

Checklist

  • I confirmed this bug is reproducible
  • I searched existing issues and this is not a duplicate

Exact-candidate E2E impact

The same occupied-listener failure blocks four jobs in run 33915961523, candidate 0ddc3ea52:

These jobs fail on their second onboarding or resume pass with the expected registered dashboard port already bound. This makes #11074 a high-fanout epic blocker.

Activity

  1. added
    integration: openclaw
    area: onboarding
    area: sandbox
    on Sep 4, 2026
  2. added theissue type on Sep 4, 2026
  3. self-assigned this
    on Sep 6, 2026
  4. sandl99 commented on Sep 6, 2026

    @sandl99
    CollaboratorAuthor

    I am classifying the three failures from run 34038042279 and coordinating the fix through draft PR #11097. I will preserve its existing reconciliation work, verify the shared ForwardTcp boundary, and avoid a competing PR.

  5. sandl99 commented on Sep 7, 2026

    @sandl99
    CollaboratorAuthor

    Exact-candidate E2E evidence is complete for PR #11128.

    • Candidate: 46d405bded32f53f6e4c4c18f46ba333a27dba00 (signed; GitHub verification valid)
    • Base: 814772eedd4c1f2fd7a8769a33c3032b30076811
    • Trusted workflow: 814772eedd4c1f2fd7a8769a33c3032b30076811
    • Correlation ID: 40d9ac40-600c-47c6-9efc-c6afccca91bd
    • Selectors: targets=double-onboard,onboard-resume,token-rotation,brave-search; jobs=; inference_mode=mock; staging, Jetson, and DGX Spark opt-ins disabled
    • Exact candidate managed-image publication: passed
    • Focused workflow: passed

    The PR head, source repository/owner, and base SHA were re-read unchanged after workflow completion.

    The earlier candidate run reached and passed the repeated-onboarding reuse phases, then failed in the target's unrelated stopped-sandbox restart assertion with the known base failure tracked by #10681. Commit 46d405bd removes only that separately owned assertion from double-onboard; the target still proves exact listener identity and stability across the second onboarding, unchanged sandbox identity and dashboard port, sibling isolation, and selected-forward cleanup.

    The security-negative case remains deterministic local regression coverage: foreign, ambiguous, changing, spoofed, and over-budget listener evidence fails closed. There is no separate live selector for that case.

  6. sandl99 commented on Sep 7, 2026

    @sandl99
    CollaboratorAuthor

    Evidence for #11074

    Commit under test: 46d405bded32f53f6e4c4c18f46ba333a27dba00

    Focused GitHub E2E

    The required targets passed in one manual PR E2E workflow:

    • double-onboard passed. Re-onboarding reused the Ready sandbox and existing dashboard listener without a port conflict.
    • onboard-resume passed. Resume did not loop on the existing dashboard listener.
    • token-rotation passed its messaging assertion.
    • brave-search passed its re-onboarding phase with the existing dashboard forward.

    Local manual evidence

    A maintainer repeated onboarding for the existing tm sandbox and observed:

    • NemoClaw reused the healthy OpenShell gateway.
    • NemoClaw reused the Ready tm sandbox.
    • OpenClaw setup completed with dashboard port 18789 unchanged.
    • Policy selection and deployment verification completed.
    • The former Registered dashboard port 18789 is already occupied error did not occur.

    The terminal transcript does not print a Git commit. This manual result supports the observed behavior; the GitHub workflow above provides commit-bound evidence.

    Security-negative evidence

    The local regression suite passed cases for foreign, ambiguous, changing, spoofed, and over-budget listener evidence. These listeners still fail closed.

    This evidence satisfies the focused acceptance requirement for #11074. A full E2E run is not required for this issue.

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

Metadata

Metadata

Assignees

Labels

area: onboardingarea: sandboxintegration: openclaw

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions