标题: linux 下hermes开启gateway自启动报:Failed to connect to bus: No medium found [打印本页] 作者: 郑全 时间: 6 天前 标题: linux 下hermes开启gateway自启动报:Failed to connect to bus: No medium found 问题:
zq@hermes:~$ loginctl enable-linger $(whoami)
zq@hermes:~$ systemctl --user enable hermes-gateway
Failed to connect to bus: No medium found
zq@hermes:~$ systemctl --user enable hermes-gateway
Created symlink /home/zq/.config/systemd/user/default.target.wants/hermes-gateway.service → /home/zq/.config/systemd/user/hermes-gateway.service.
验证:
zq@hermes:~$ hermes gateway status
Warning: OPENROUTER_API_KEY contained 7 non-ASCII characters (U+66FF ('替'), U+6362 ('换'), U+6210 ('成')) — stripped so the key can be sent as an HTTP header.
This usually means the key was copy-pasted from a PDF, rich-text editor, or web page that substituted lookalike
Unicode glyphs for ASCII letters. If authentication fails (e.g. "API key not valid"), re-copy the key from the
provider's dashboard and run `hermes setup` (or edit the .env file in a plain-text editor).
● hermes-gateway.service - Hermes Agent Gateway - Messaging Platform Integration
Loaded: loaded (/home/zq/.config/systemd/user/hermes-gateway.service; enabled; preset: enabled)
Active: active (running) since Fri 2026-05-01 10:09:46 UTC; 24min ago
Main PID: 3732 (python)
Tasks: 11 (limit: 9374)
Memory: 487.6M (peak: 493.9M)
CPU: 18.418s
CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/hermes-gateway.service
└─3732 /home/zq/.hermes/hermes-agent/venv/bin/python -m hermes_cli.main gateway run --replace
May 01 10:34:16 hermes python[3732]: File "/home/zq/.local/share/uv/python/cpython-3.11.15-linux-x86_64-gnu/lib/python3.11/asyncio/base_events.py", line 1936, in _run_once
May 01 10:34:16 hermes python[3732]: handle._run()
May 01 10:34:16 hermes python[3732]: File "/home/zq/.local/share/uv/python/cpython-3.11.15-linux-x86_64-gnu/lib/python3.11/asyncio/events.py", line 84, in _run
May 01 10:34:16 hermes python[3732]: self._context.run(self._callback, *self._args)
May 01 10:34:16 hermes python[3732]: File "/home/zq/.hermes/hermes-agent/gateway/platforms/dingtalk.py", line 279, in _run_stream
May 01 10:34:16 hermes python[3732]: await self._stream_client.start()
May 01 10:34:16 hermes python[3732]: File "/home/zq/.hermes/hermes-agent/venv/lib/python3.11/site-packages/dingtalk_stream/stream.py", line 89, in start
May 01 10:34:16 hermes python[3732]: self.logger.exception('unknown exception', e)
May 01 10:34:16 hermes python[3732]: Message: 'unknown exception'
May 01 10:34:16 hermes python[3732]: Arguments: (TypeError("'coroutine' object does not support the asynchronous context manager protocol"),)
✓ User gateway service is running
✓ Systemd linger is enabled (service survives logout)