From 1908136071057e211e7eec0924c829c412656ca9 Mon Sep 17 00:00:00 2001 From: openhands Date: Mon, 13 Jul 2026 22:16:20 +0200 Subject: [PATCH] ci: kill lingering next-server before restarting service to avoid EADDRINUSE --- .gitea/workflows/deploy.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index c02fa051..79673e44 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -48,7 +48,10 @@ jobs: # 8. Hard restart of the Systemd service to clear memory cache echo "Hard resetting systemd service..." - sudo systemctl stop atom-nexst.service + sudo systemctl stop atom-nexst.service || true + # Kill any lingering next-server processes holding port 3000 so the + # new instance can bind cleanly (systemctl stop may leave orphans). + pkill -f 'next-server' || true sudo systemctl start atom-nexst.service # Extra health check: Ensure the service is actually running