hermes-gateway-troubleshooting

Diagnose Hermes gateway lock conflicts, stale PIDs, and Telegram token collisions.

Updated Sep 1, 2021
One-click install
npx skills add https://github.com/unclehowell/unclehowell --skill hermes-gateway-troubleshooting
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hermes-gateway-troubleshooting
Source: https://github.com/unclehowell/unclehowell/tree/main/skills/devops/hermes-gateway-troubleshooting
Command: npx skills add https://github.com/unclehowell/unclehowell --skill hermes-gateway-troubleshooting

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a systematic checklist and remediation steps to diagnose and fix Hermes gateway issues such as scoped lock conflicts, stale PIDs, Telegram 401 polling errors caused by token collisions, configuration overrides, and multi-instance gateway coexistence problems.

Core Features & Use Cases

  • Lock conflict diagnosis: Identify stale or conflicting gateway lock files and determine which processes hold them.
  • Environment and systemd resolution: Detect and remove TELEGRAM_BOT_TOKEN overrides coming from systemd Environment entries or agent env files.
  • Safe recovery actions: Guidance to stop conflicting gateways, remove stale state and lock files, verify unique tokens per agent, and restart systemd-managed gateways to restore normal polling.
  • Use Case: Recover a production Hermes deployment where multiple agent instances accidentally share a Telegram token and cause polling failures and messaging spam.

Quick Start

Use the hermes-gateway-troubleshooting skill to detect which agent holds the Telegram lock, remove stale lock files and environment overrides, and restart the correct systemd-managed gateway to restore service.

Frequently Asked Questions about hermes-gateway-troubleshooting

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix Telegram 401 polling errors caused by bot token collisions on Linux?

Telegram 401 polling errors from bot token collisions are resolved by inspecting systemd Environment entries and agent env files to remove duplicate TELEGRAM_BOT_TOKEN overrides. You must verify unique bot tokens per agent instance and restart the correct systemd-managed gateway to restore normal polling.

What is the best way to resolve Hermes gateway lock conflicts and stale process IDs?

Gateway lock conflicts and stale PIDs are resolved by checking gateway_state.json and lock files to identify which processes hold them. You then perform controlled process restarts and remove stale state and lock files to safely recover the deployment.

Why does my multi-instance Hermes gateway deployment fail when agents share a Telegram token?

Multi-instance Hermes gateway deployments fail when multiple agents share a Telegram token because it causes polling failures and messaging spam. Systematically detecting and removing environment overrides ensures each agent uses a unique token, restoring proper service coexistence.

How do I clean up stale lock files and configuration overrides for a systemd-managed gateway?

Cleaning up stale lock files and configuration overrides requires stopping conflicting gateways, inspecting systemd Environment entries, and removing stale state files. Controlled restarts of the correct systemd-managed gateway then restore normal polling operations.

When do I need to inspect gateway_state.json and systemd Environment entries for Hermes agents?

You need to inspect gateway_state.json and systemd Environment entries when multiple agent instances, per-session gateway runs, or systemd services create token and lock contention. This inspection identifies scoped lock conflicts and environment overrides causing polling errors.

Does hermes-gateway-troubleshooting support deployments with per-session gateway runs?

Yes, hermes-gateway-troubleshooting supports Linux deployments where per-session gateway runs, multiple agent instances, and systemd services create token and lock contention. It systematically diagnoses and repairs these multi-instance coexistence problems to restore service.