hermes - 💡(How to fix) Fix [Bug]: Gateway restart hangs indefinitely — D-Bus race with systemd user unit

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

hermes gateway restart (which calls systemctl --user restart hermes-gateway) hangs indefinitely due to a D-Bus race condition. The gateway process never restarts. The only reliable workaround is kill -9 <PID> and letting systemd's Restart=always bring it back.

Root Cause

hermes gateway restart (which calls systemctl --user restart hermes-gateway) hangs indefinitely due to a D-Bus race condition. The gateway process never restarts. The only reliable workaround is kill -9 <PID> and letting systemd's Restart=always bring it back.

Fix Action

Workaround

kill -9 $(systemctl --user show -p MainPID hermes-gateway | cut -d= -f2)
# systemd auto-restarts via Restart=always after RestartSec

Code Example

kill -9 $(systemctl --user show -p MainPID hermes-gateway | cut -d= -f2)
# systemd auto-restarts via Restart=always after RestartSec

---

Main process exited, code=killed, status=9/KILL
<new PID spawned after RestartSec>
RAW_BUFFERClick to expand / collapse

Platform: Linux (Ubuntu 24.04, ARM64, systemd user unit) Hermes version: 2026.5.16

Summary

hermes gateway restart (which calls systemctl --user restart hermes-gateway) hangs indefinitely due to a D-Bus race condition. The gateway process never restarts. The only reliable workaround is kill -9 <PID> and letting systemd's Restart=always bring it back.

Steps to reproduce

  1. Start gateway as systemd user service
  2. Change any config that requires restart
  3. Run systemctl --user restart hermes-gateway
  4. Command hangs forever, gateway does not restart

Workaround

kill -9 $(systemctl --user show -p MainPID hermes-gateway | cut -d= -f2)
# systemd auto-restarts via Restart=always after RestartSec

Logs after kill -9

Main process exited, code=killed, status=9/KILL
<new PID spawned after RestartSec>

Additional context

Occurs on Linuxbrew-installed Hermes. Unit file: ~/.config/systemd/user/hermes-gateway.service. Restart parameters: Restart=always, RestartSec=60, RestartMaxDelaySec=300, RestartSteps=20. The D-Bus session bus seems to lose the connection during the restart handoff, causing the systemctl command to block indefinitely.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING