# Troubleshooting

- Link: https://ubient.dscloud.biz/docs/ubient-software/rtmn/troubleshooting/
- Published: 2026-10-13T01:40:53+09:00
- Author: Ubient

## Check a Single-Instance Service

    ```ubient-docs-code
    Bashsudo systemctl status rtmn --no-pager
    sudo journalctl -u rtmn -n 100 --no-pager
    ```

## Check an Account-Isolated Service

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

## Common Causes

| Symptom | Possible Cause | 
| Service exits immediately | Environment file error, shell path error, token error | 
| No Telegram response | Wrong chat ID, wrong token, outbound HTTPS blocked | 
| Message goes to another server | The same token is active in another instance | 
| Audit log write failure | Audit log directory permission error | 
| `ExecStart` failure | Wrong binary path or missing execute permission | 
| Exit status `78` | Configuration 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

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

Recommended values:

    ```ubient-docs-code
    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.

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

### systemd Unit Syntax

    ```ubient-docs-code
    Bashsudo systemd-analyze verify "/etc/systemd/system/rtmn-$INSTANCE.service"
    ```

### Binary Executability

    ```ubient-docs-code
    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.

    ```ubient-docs-code
    Bashsudo systemctl restart "rtmn-$INSTANCE.service"
    ```
