Repository navigation
Description
Investigation Summary
- A first OpenClaw onboarding completes and starts the dashboard on the registered port
18789. - Re-running onboarding for the same Ready sandbox correctly selects sandbox reuse, then fails during finalization because that same port is already bound.
- The failure is deterministic in the current implementation:
ensureDashboardForwardrejects any bound persisted port before it can reconcile the already-running direct ForwardTcp service. - The regression follows the direct ForwardTcp migration in refactor(forward): adopt OpenShell service forwarding #10695 and conflicts with the same-sandbox re-onboarding contract previously fixed by [Ubuntu 22.04/26.04][Onboard] v0.0.108 regression: re-onboard probes stale dashboard port and exits 1 #8970.
- This currently blocks the required re-onboarding evidence for fix(onboard): preserve messaging egress on reuse #10782.
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
-
Onboard an OpenClaw sandbox named
tmand let onboarding complete successfully. -
Confirm the dashboard is registered on
http://127.0.0.1:18789/. -
Without stopping or recreating the sandbox, run:
nemoclaw onboard --name tm --agent openclaw --yes-i-accept-third-party-software
-
Select and apply a valid inference provider configuration.
-
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:
- Read the preferred and registry-persisted dashboard port.
- Observe that the host port is bound.
- Throw
Registered dashboard port ... is already occupiedbefore 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 --resumeonboard --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
- Related accepted ForwardTcp migration: Adopt OpenShell ForwardTcp for NemoClaw-managed host forwards #10691
- Introducing implementation: refactor(forward): adopt OpenShell service forwarding #10695
- Previously fixed same-sandbox re-onboarding contract: [Ubuntu 22.04/26.04][Onboard] v0.0.108 regression: re-onboard probes stale dashboard port and exits 1 #8970
- Evidence workflow currently blocked: fix(onboard): preserve messaging egress on reuse #10782
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
sandl99 commentedon Sep 6, 2026
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.
sandl99 commentedon Sep 7, 2026
Exact-candidate E2E evidence is complete for PR #11128.
46d405bded32f53f6e4c4c18f46ba333a27dba00(signed; GitHub verificationvalid)814772eedd4c1f2fd7a8769a33c3032b30076811814772eedd4c1f2fd7a8769a33c3032b3007681140d9ac40-600c-47c6-9efc-c6afccca91bdtargets=double-onboard,onboard-resume,token-rotation,brave-search;jobs=;inference_mode=mock; staging, Jetson, and DGX Spark opt-ins disabledThe 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
46d405bdremoves only that separately owned assertion fromdouble-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.
sandl99 commentedon Sep 7, 2026
Evidence for #11074
Commit under test:
46d405bded32f53f6e4c4c18f46ba333a27dba00Focused GitHub E2E
The required targets passed in one manual PR E2E workflow:
Local manual evidence
A maintainer repeated onboarding for the existing
tmsandbox and observed:tmsandbox.18789unchanged.Registered dashboard port 18789 is already occupiederror 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.
fix(openshell): preserve selected config for forwarding (#11157)
fix(onboard): reuse existing OpenClaw dashboard forward (#11128)