From 2ab642666abb7b57b64220929246f908539620d6 Mon Sep 17 00:00:00 2001 From: latenighthackathon Date: Sun, 29 Mar 2026 15:26:34 -0500 Subject: [PATCH 1/2] fix(onboard): add sudo prefix to lsof port-conflict suggestions On Linux, lsof requires root privileges to see processes owned by other users. Without sudo, the suggested command returns empty output, leaving users unable to identify the conflicting process. Closes #726 --- bin/lib/onboard.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/lib/onboard.js b/bin/lib/onboard.js index 1480f435d..366579507 100644 --- a/bin/lib/onboard.js +++ b/bin/lib/onboard.js @@ -1555,13 +1555,13 @@ async function preflight() { if (portCheck.pid) { console.error(` sudo kill ${portCheck.pid}`); } else { - console.error(` lsof -i :${port} -sTCP:LISTEN -P -n`); + console.error(` sudo lsof -i :${port} -sTCP:LISTEN -P -n`); } console.error(" # or, if it's a systemd service:"); console.error(" systemctl --user stop openclaw-gateway.service"); } else { console.error(` Could not identify the process using port ${port}.`); - console.error(` Run: lsof -i :${port} -sTCP:LISTEN`); + console.error(` Run: sudo lsof -i :${port} -sTCP:LISTEN`); } console.error(""); console.error(` Detail: ${portCheck.reason}`); From b82c1fb3d625955c9fde62fdadcfc9c64a730fc8 Mon Sep 17 00:00:00 2001 From: latenighthackathon Date: Mon, 30 Mar 2026 11:34:15 -0500 Subject: [PATCH 2/2] fix(docs): add sudo prefix to lsof in troubleshooting guides Update the two remaining doc copies that still showed lsof without sudo: docs/reference/troubleshooting.md and the agent skill reference. Signed-off-by: latenighthackathon --- .agents/skills/nemoclaw-reference/references/troubleshooting.md | 2 +- docs/reference/troubleshooting.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.agents/skills/nemoclaw-reference/references/troubleshooting.md b/.agents/skills/nemoclaw-reference/references/troubleshooting.md index 8174ea589..1d7ed6586 100644 --- a/.agents/skills/nemoclaw-reference/references/troubleshooting.md +++ b/.agents/skills/nemoclaw-reference/references/troubleshooting.md @@ -69,7 +69,7 @@ If another process is already bound to this port, onboarding fails. Identify the conflicting process, verify it is safe to stop, and terminate it: ```console -$ lsof -i :18789 +$ sudo lsof -i :18789 $ kill ``` diff --git a/docs/reference/troubleshooting.md b/docs/reference/troubleshooting.md index 1a0ba5d7e..af9a1e63a 100644 --- a/docs/reference/troubleshooting.md +++ b/docs/reference/troubleshooting.md @@ -95,7 +95,7 @@ If another process is already bound to this port, onboarding fails. Identify the conflicting process, verify it is safe to stop, and terminate it: ```console -$ lsof -i :18789 +$ sudo lsof -i :18789 $ kill ```