Repository navigation
fix(install): check ports 8080 and 18789 are free before starting gateway - #357
Closed
webdevpraveen wants to merge 1 commit into
Closed
webdevpraveen wants to merge 1 commit into
webdevpraveen wants to merge 1 commit into
Conversation
…eway Fixes NVIDIA#51 install.sh starts the OpenShell gateway on port 8080 and the OpenClaw dashboard on port 18789 without checking whether those ports are already in use. Users with existing Docker containers, web servers, or other services on those ports get a cryptic startup failure: Error: listen tcp 0.0.0.0:8080: bind: address already in use This change adds a check_required_ports() preflight function that runs before any gateway or sandbox setup: - Detects conflicts using ss (iproute2) with netstat fallback - Prints a clear, named error identifying the conflicting port - Suggests NEMOCLAW_GATEWAY_PORT / NEMOCLAW_DASHBOARD_PORT env vars so users can override without stopping existing services - Degrades gracefully when neither ss nor netstat is available Signed-off-by: webdevpraveen <[email protected]>
mafueee
pushed a commit
to mafueee/NemoClaw
that referenced
this pull request
Mar 28, 2026
4 tasks
cv
added a commit
that referenced
this pull request
Apr 13, 2026
…1645) ## Summary - Add `bin/lib/ports.js` as central port configuration module - All hardcoded service ports can now be overridden via environment variables - Defaults are unchanged — zero regression for existing setups | Env var | Default | Service | |---------|---------|---------| | `NEMOCLAW_GATEWAY_PORT` | 8080 | OpenShell gateway | | `NEMOCLAW_DASHBOARD_PORT` | 18789 | Dashboard UI | | `NEMOCLAW_VLLM_PORT` | 8000 | vLLM/NIM inference | | `NEMOCLAW_OLLAMA_PORT` | 11434 | Ollama inference | Ports are validated to be non-privileged (1024–65535). ### Usage ```bash export NEMOCLAW_DASHBOARD_PORT=19000 nemoclaw onboard ``` ## Related Issue Closes #684 Based on the approach from PR #683 by @jnun — thank you for the original design. Supersedes #683 (rebased on latest main with correct defaults). Consider closing #703, #357 (subsumed by this). ## Test plan - [ ] `npm test` passes (135 tests in cli + onboard) - [ ] `nemoclaw onboard` works with default ports (no regression) - [ ] Set `NEMOCLAW_DASHBOARD_PORT=19000`, verify dashboard uses port 19000 - [ ] Set invalid port (e.g., `NEMOCLAW_GATEWAY_PORT=abc`), verify startup fails with clear error Signed-off-by: Prekshi Vyas <[email protected]> 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Centralized, configurable ports for dashboard, gateway, vLLM and Ollama via environment variables with validated defaults. * **Improvements** * Startup, health checks, diagnostics, uninstall and helper flows now honor configured ports and enforce numeric/range validation with fail-fast errors. * **Tests** * Added unit and end-to-end tests covering port parsing, boundaries and override scenarios; CI job added to run E2E port-override tests. * **Chore** * Added compatibility shim to surface built artifacts and documented the default dashboard port in the container build. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Prekshi Vyas <[email protected]> Signed-off-by: Aaron Erickson <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: jnun <[email protected]> Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]> Co-authored-by: Carlos Villela <[email protected]> Co-authored-by: Aaron Erickson <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Collaborator
|
Closing — the port-free checks and configurable overrides are now covered by #1645. The preflight step validates port availability with actionable error messages, and all four service ports can be overridden via environment variables. Thank you for the contribution! |
ericksoa
added a commit
to cheese-head/NemoClaw
that referenced
this pull request
Apr 14, 2026
…VIDIA#1645) ## Summary - Add `bin/lib/ports.js` as central port configuration module - All hardcoded service ports can now be overridden via environment variables - Defaults are unchanged — zero regression for existing setups | Env var | Default | Service | |---------|---------|---------| | `NEMOCLAW_GATEWAY_PORT` | 8080 | OpenShell gateway | | `NEMOCLAW_DASHBOARD_PORT` | 18789 | Dashboard UI | | `NEMOCLAW_VLLM_PORT` | 8000 | vLLM/NIM inference | | `NEMOCLAW_OLLAMA_PORT` | 11434 | Ollama inference | Ports are validated to be non-privileged (1024–65535). ### Usage ```bash export NEMOCLAW_DASHBOARD_PORT=19000 nemoclaw onboard ``` ## Related Issue Closes NVIDIA#684 Based on the approach from PR NVIDIA#683 by @jnun — thank you for the original design. Supersedes NVIDIA#683 (rebased on latest main with correct defaults). Consider closing NVIDIA#703, NVIDIA#357 (subsumed by this). ## Test plan - [ ] `npm test` passes (135 tests in cli + onboard) - [ ] `nemoclaw onboard` works with default ports (no regression) - [ ] Set `NEMOCLAW_DASHBOARD_PORT=19000`, verify dashboard uses port 19000 - [ ] Set invalid port (e.g., `NEMOCLAW_GATEWAY_PORT=abc`), verify startup fails with clear error Signed-off-by: Prekshi Vyas <[email protected]> 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Centralized, configurable ports for dashboard, gateway, vLLM and Ollama via environment variables with validated defaults. * **Improvements** * Startup, health checks, diagnostics, uninstall and helper flows now honor configured ports and enforce numeric/range validation with fail-fast errors. * **Tests** * Added unit and end-to-end tests covering port parsing, boundaries and override scenarios; CI job added to run E2E port-override tests. * **Chore** * Added compatibility shim to surface built artifacts and documented the default dashboard port in the container build. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Prekshi Vyas <[email protected]> Signed-off-by: Aaron Erickson <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: jnun <[email protected]> Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]> Co-authored-by: Carlos Villela <[email protected]> Co-authored-by: Aaron Erickson <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
ColinM-sys
pushed a commit
to ColinM-sys/NemoClaw
that referenced
this pull request
Apr 14, 2026
…VIDIA#1645) ## Summary - Add `bin/lib/ports.js` as central port configuration module - All hardcoded service ports can now be overridden via environment variables - Defaults are unchanged — zero regression for existing setups | Env var | Default | Service | |---------|---------|---------| | `NEMOCLAW_GATEWAY_PORT` | 8080 | OpenShell gateway | | `NEMOCLAW_DASHBOARD_PORT` | 18789 | Dashboard UI | | `NEMOCLAW_VLLM_PORT` | 8000 | vLLM/NIM inference | | `NEMOCLAW_OLLAMA_PORT` | 11434 | Ollama inference | Ports are validated to be non-privileged (1024–65535). ### Usage ```bash export NEMOCLAW_DASHBOARD_PORT=19000 nemoclaw onboard ``` ## Related Issue Closes NVIDIA#684 Based on the approach from PR NVIDIA#683 by @jnun — thank you for the original design. Supersedes NVIDIA#683 (rebased on latest main with correct defaults). Consider closing NVIDIA#703, NVIDIA#357 (subsumed by this). ## Test plan - [ ] `npm test` passes (135 tests in cli + onboard) - [ ] `nemoclaw onboard` works with default ports (no regression) - [ ] Set `NEMOCLAW_DASHBOARD_PORT=19000`, verify dashboard uses port 19000 - [ ] Set invalid port (e.g., `NEMOCLAW_GATEWAY_PORT=abc`), verify startup fails with clear error Signed-off-by: Prekshi Vyas <[email protected]> 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Centralized, configurable ports for dashboard, gateway, vLLM and Ollama via environment variables with validated defaults. * **Improvements** * Startup, health checks, diagnostics, uninstall and helper flows now honor configured ports and enforce numeric/range validation with fail-fast errors. * **Tests** * Added unit and end-to-end tests covering port parsing, boundaries and override scenarios; CI job added to run E2E port-override tests. * **Chore** * Added compatibility shim to surface built artifacts and documented the default dashboard port in the container build. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Prekshi Vyas <[email protected]> Signed-off-by: Aaron Erickson <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: jnun <[email protected]> Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]> Co-authored-by: Carlos Villela <[email protected]> Co-authored-by: Aaron Erickson <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: ColinM-sys <[email protected]>
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #51
install.shstarts the OpenShell gateway on port8080and the OpenClaw dashboard on port18789without checking whether those ports are already in use. Users with existing Docker containers or other services on those ports get a cryptic startup failure with no actionable guidance.Problem
When a port is occupied, the installer fails deep in gateway startup with no clear message:
There is no named error, no suggestion to check ports, and no way to override without editing the script.
Fix
Adds
check_required_ports()to the[1/7] Preflight checksstep, before any gateway or sandbox setup begins:ss(iproute2) withnetstatas fallbackNEMOCLAW_GATEWAY_PORTandNEMOCLAW_DASHBOARD_PORTenv-var overrides so users can switch ports without stopping existing servicesssnornetstatis availableExample output when a port is occupied