Summary
On Windows, openclaw gateway restart fails on my setup because the currently running gateway process is not stopped before restart launches a new process.
Steps to reproduce
- Start gateway (e.g.,
openclaw gateway start).
- Confirm gateway is running in its terminal window.
- Run
openclaw gateway restart.
- Observe original gateway terminal/process remains running.
- Restart opens a new gateway process, which then fails because port 18789 is already in use.
Expected behavior
openclaw gateway restart should stop the existing gateway process, wait for confirmed exit, then start exactly one new gateway process.
Actual behavior
Original gateway process/terminal stays alive after restart command. A new process is launched and fails due to port conflict with the still-running original process.
Important additional note
This is not only a restart problem. On my setup, openclaw gateway stop also fails to stop the running gateway process (without workaround), which contributes to restart failures.
OpenClaw version
2026.2.25-beta.1
Operating system
Windows 11
Install method
npm global install
Logs, screenshots, and evidence
2026-02-26T12:37:00.412-05:00 error Gateway failed to start: gateway already running (pid 42812); lock timeout after 5000ms
If the gateway is supervised, stop it with: openclaw gateway stop
2026-02-26T12:37:00.540-05:00 error Port 18789 is already in use.
2026-02-26T12:37:00.542-05:00 error - pid 42812: "C:\Program Files\nodejs\node.exe" C:\Users\marcm\AppData\Roaming\npm\node_modules\openclaw\dist\index.js gateway --port 18789 (127.0.0.1:18789)
2026-02-26T12:37:00.543-05:00 error - Gateway already running locally. Stop it (openclaw gateway stop) or use a different port.
2026-02-26T12:37:00.777-05:00 error Gateway service appears registered. Stop it first.
2026-02-26T12:37:00.779-05:00 error Tip: openclaw gateway stop
2026-02-26T12:37:00.780-05:00 error Or: schtasks /End /TN "OpenClaw Gateway"
Impact and severity
Frequency: 100% reproducible without workaround (always).
Additional information
Workaround commands currently used:
for /f "tokens=5" %%P in ('netstat -ano ^| findstr /R /C:":%OPENCLAW_GATEWAY_PORT% .*LISTENING"') do (
taskkill /PID %%P /F >nul 2>nul
)
timeout /t 1 /nobreak >nul
Then launch gateway normally:
"C:\Program Files\nodejs\node.exe" C:\Users\marcm\AppData\Roaming\npm\node_modules\openclaw\dist\index.js gateway --port %OPENCLAW_GATEWAY_PORT%
Summary
On Windows,
openclaw gateway restartfails on my setup because the currently running gateway process is not stopped before restart launches a new process.Steps to reproduce
openclaw gateway start).openclaw gateway restart.Expected behavior
openclaw gateway restartshould stop the existing gateway process, wait for confirmed exit, then start exactly one new gateway process.Actual behavior
Original gateway process/terminal stays alive after restart command. A new process is launched and fails due to port conflict with the still-running original process.
Important additional note
This is not only a
restartproblem. On my setup,openclaw gateway stopalso fails to stop the running gateway process (without workaround), which contributes to restart failures.OpenClaw version
2026.2.25-beta.1
Operating system
Windows 11
Install method
npm global install
Logs, screenshots, and evidence
Impact and severity
Frequency: 100% reproducible without workaround (always).
Additional information
Workaround commands currently used:
Then launch gateway normally: