Troubleshooting

Check a Single-Instance Service

Bashsudo systemctl status rtmn --no-pager
sudo journalctl -u rtmn -n 100 --no-pager

Check an Account-Isolated Service

Bashsudo systemctl status "rtmn-$INSTANCE.service" --no-pager
sudo journalctl -u "rtmn-$INSTANCE.service" -n 100 --no-pager

Common Causes

SymptomPossible Cause
Service exits immediatelyEnvironment file error, shell path error, token error
No Telegram responseWrong chat ID, wrong token, outbound HTTPS blocked
Message goes to another serverThe same token is active in another instance
Audit log write failureAudit log directory permission error
ExecStart failureWrong binary path or missing execute permission
Exit status 78Configuration error with restart-loop prevention

Checks

Bot Token

A wrong or revoked token fails Telegram API validation.

Check these points:

  • The token is the one issued by BotFather.
  • No extra spaces or newlines were included.
  • The same token is not active in another instance.

Chat ID

If the allowed chat ID is wrong, messages will not execute commands.

Check these points:

  • Personal chat IDs and group chat IDs were not mixed up.
  • A supergroup ID did not lose its -100 prefix.
  • RTMN_ALLOWED_CHAT_IDS is comma-separated only.

Environment File Permissions

Bashsudo stat -c '%n %U %G %a' /etc/rtmn/env
sudo stat -c '%n %U %G %a' "/etc/rtmn/env-$INSTANCE"

Recommended values:

owner: root
group: root
mode:  600

Audit Log Permissions

For account-isolated installations, the service account must be able to write to the audit log directory.

Bashsudo stat -c '%n %U %G %a' "/var/log/rtmn/$INSTANCE"

systemd Unit Syntax

Bashsudo systemd-analyze verify "/etc/systemd/system/rtmn-$INSTANCE.service"

Binary Executability

Bashsudo -u "$ACCOUNT" "/home/$ACCOUNT/.rtmn-$INSTANCE/rtmn-$INSTANCE" --help

Exit Status 78

If the service exits with status 78, treat it as a configuration error.

Recommended handling order:

  1. Check journal logs.
  2. Verify environment file values.
  3. Verify the EnvironmentFile and ExecStart paths in the service file.
  4. Verify audit log directory permissions.
  5. Restart the service after fixing the issue.
Bashsudo systemctl restart "rtmn-$INSTANCE.service"

Was this page helpful?

Last update