Skip to content

fix(gateway): skip systemd check when systemctl is absent - #7771

Closed
nocelery-ai wants to merge 1 commit into
NousResearch:mainfrom
nocelery-ai:fix/gateway-setup-docker-systemd
Closed

fix(gateway): skip systemd check when systemctl is absent#7771
nocelery-ai wants to merge 1 commit into
NousResearch:mainfrom
nocelery-ai:fix/gateway-setup-docker-systemd

Conversation

@nocelery-ai

Copy link
Copy Markdown

Summary

  • hermes gateway setup crashes with FileNotFoundError in Docker containers because supports_systemd_services() returns True on all Linux, but Docker lacks systemctl
  • Added a shutil.which("systemctl") guard before assuming systemd support

Test plan

  • Verified hermes gateway setup completes successfully inside Docker container
  • Verified Weixin QR login flow works end-to-end after fix
  • Existing systemd-based Linux installs should be unaffected (guard only triggers when systemctl binary is missing)

`supports_systemd_services()` unconditionally returns `True` on Linux,
but Docker containers typically lack systemd/systemctl. This causes
`hermes gateway setup` to crash with a `FileNotFoundError` when it
tries to invoke `systemctl is-active`.

Guard with `shutil.which("systemctl")` before assuming systemd support.
@teknium1

Copy link
Copy Markdown
Contributor

Closing as duplicate — this issue is fixed in #8614 (salvaged from @alt-glitch's comprehensive #8573). Thanks for the contribution!

@teknium1 teknium1 closed this Apr 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants