hermes - 💡(How to fix) Fix hermes update fails to restart gateway on Linux systemd (exit code 75 handoff broken)

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…

Error Message

{"tag": "asyncio.run.SystemExit", "pid": 87094, "code": 75, "traceback": "...gateway/run.py:18159 in start_gateway\nSystemExit: 75"}

Root Cause

The exit code 75 is intentional (#28341) — it signals the service manager to relaunch. But the handoff between the old gateway (exiting 75) and the new gateway (started with --replace) fails: the replacement also exits 75 immediately.

This is separate from #29421 (D-Bus hang on hermes gateway restart) and #30297 (fix for that via --no-block). The update flow does not use systemd_restart() — it goes through the gateway's internal self-restart mechanism, which is a different code path.

Fix Action

Workaround

Wait for systemd's Restart=always to recover (~5 minutes), or manually run:

systemctl --user reset-failed hermes-gateway
systemctl --user start hermes-gateway

Code Example

23:45:27  hermes update started (116 commits pulled)
23:46:58  Gateway received stop signal
23:47:03  Gateway shut down cleanly (4.81s teardown)
23:47:03  Replacement gateway starts (--replace flag)
23:47:05  Replacement exits with code 75
          Update log ends — NO restart confirmation
23:52:05  systemd auto-restarts after RestartSec=300s
23:52:12  Telegram reconnects

---

{"tag": "asyncio.run.SystemExit", "pid": 87094, "code": 75,
 "traceback": "...gateway/run.py:18159 in start_gateway\nSystemExit: 75"}

---

systemctl --user reset-failed hermes-gateway
systemctl --user start hermes-gateway
RAW_BUFFERClick to expand / collapse

Bug Description

After hermes update completes on Linux (systemd user unit), the gateway is not restarted. The update log shows "draining..." but never prints the expected "✓ Restarted hermes-gateway" line. The gateway process exits with code 75 (TEMPFAIL) during the restart handoff and systemd's Restart=always + RestartSec=300s is the only thing that brings it back — after a 5-minute gap.

This is the Linux/systemd equivalent of #28135 ("hermes update via gateway leaves launchd service unrestarted on macOS"), which was fixed by #28341 (exit code 75 for launchd). But the Linux path is still broken.

Environment

  • OS: Linux (Ubuntu 24.04, x86_64)
  • Hermes: v0.14.0 (2026.5.16), installed as systemd user unit
  • Update: from 116 commits behind to current main

Steps to Reproduce

  1. Have Hermes gateway running as a systemd user service
  2. Run hermes update (either from CLI or via gateway Telegram command)
  3. Observe the update log — it shows "draining..." but never "✓ Restarted"
  4. hermes gateway status shows gateway is not running
  5. After ~5 minutes, systemd auto-restarts the gateway

Actual Behavior

Update log ends with no restart confirmation. Gateway is down for ~5 minutes.

Expected Behavior

Gateway should restart within seconds of the update completing.

Timeline from Logs (2026-05-23, UTC+7)

23:45:27  hermes update started (116 commits pulled)
23:46:58  Gateway received stop signal
23:47:03  Gateway shut down cleanly (4.81s teardown)
23:47:03  Replacement gateway starts (--replace flag)
23:47:05  Replacement exits with code 75
          Update log ends — NO restart confirmation
23:52:05  systemd auto-restarts after RestartSec=300s
23:52:12  Telegram reconnects

Exit Diagnostic

From gateway-exit-diag.log:

{"tag": "asyncio.run.SystemExit", "pid": 87094, "code": 75,
 "traceback": "...gateway/run.py:18159 in start_gateway\nSystemExit: 75"}

Analysis

The exit code 75 is intentional (#28341) — it signals the service manager to relaunch. But the handoff between the old gateway (exiting 75) and the new gateway (started with --replace) fails: the replacement also exits 75 immediately.

This is separate from #29421 (D-Bus hang on hermes gateway restart) and #30297 (fix for that via --no-block). The update flow does not use systemd_restart() — it goes through the gateway's internal self-restart mechanism, which is a different code path.

Workaround

Wait for systemd's Restart=always to recover (~5 minutes), or manually run:

systemctl --user reset-failed hermes-gateway
systemctl --user start hermes-gateway

Related

  • #28135 — macOS equivalent (fixed by #28341)
  • #29421 — D-Bus hang on restart command (fix pending: #30297)
  • #8260 — restart returns before completion

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

hermes - 💡(How to fix) Fix hermes update fails to restart gateway on Linux systemd (exit code 75 handoff broken)