itzg / itzg/docker-mc-backup

Failed to connect to RCON serverrcon: authentication failed

Open
#215 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
538
Forks
69
Avg merge
3h 28m
Merged PRs (30d)
2

Description

Tried to add minecraft backups to mc service that is running a modpack. after service starts up, logs will say
```
[02:32:37] [Server thread/INFO] [minecraft/DedicatedServer]: Starting remote control listener
[02:32:37] [Server thread/INFO] [minecraft/GenericThread]: Thread RCON Listener started
[02:32:37] [Server thread/INFO] [minecraft/RconThread]: RCON running on 0.0.0.0:25575
...
[02:32:49] [RCON Listener #1/INFO] [minecraft/GenericThread]: Thread RCON Client /xxx.xx.0.3 started
[02:32:49] [RCON Client /172.18.0.3 #2/INFO] [minecraft/RconClient]: Thread RCON Client /xxx.xx.0.3 shutting down
[02:32:59] [RCON Listener #1/INFO] [minecraft/GenericThread]: Thread RCON Client /xxx.xx.0.3 started
[02:32:59] [RCON Client /172.18.0.3 #3/INFO] [minecraft/RconClient]: Thread RCON Client /xxx.xx.0.3 shutting down
[02:33:09] [RCON Listener #1/INFO] [minecraft/GenericThread]: Thread RCON Client /xxx.xx.0.3 started
[02:33:09] [RCON Client /172.18.0.3 #4/INFO] [minecraft/RconClient]: Thread RCON Client /xxx.xx.0.3 shutting down
[02:33:19] [RCON Listener #1/INFO] [minecraft/GenericThread]: Thread RCON Client /xxx.xx.0.3 started
[02:33:19] [RCON Client /172.18.0.3 #5/INFO] [minecraft/RconClient]: Thread RCON Client /xxx.xx.0.3 shutting down
[02:33:29] [RCON Listener #1/INFO] [minecraft/GenericThread]: Thread RCON Client /xxx.xx.0.3 started
[02:33:29] [RCON Client /172.18.0.3 #6/INFO] [minecraft/RconClient]: Thread RCON Client /xxx.xx.0.3 shutting down
[02:33:39] [RCON Listener #1/INFO] [minecraft/GenericThread]: Thread RCON Client /xxx.xx.0.3 started
[02:33:39] [RCON Client /172.18.0.3 #7/INFO] [minecraft/RconClient]: Thread RCON Client /xxx.xx.0.3 shutting down
```

Checking the logs for the minecraft-backups container has
```
2025-04-09T02:32:49+0000 ERROR Unable to execute rcon-cli save-on - try 0/5. Retrying in 10s
2025-04-09T02:32:49+0000 ERROR Failure reason: 2025/04/09 02:32:49 Failed to connect to RCON serverrcon: authentication failed
...
2025-04-09T02:33:39+0000 ERROR Unable to execute rcon-cli save-on - try 5/5. Retrying in 10s
2025-04-09T02:33:39+0000 ERROR Failure reason: 2025/04/09 02:33:39 Failed to connect to RCON serverrcon: authentication failed
```

compose file:
```services:
mc:
image: itzg/minecraft-server
tty: true
stdin_open: true
ports:
- "25565:25565"
environment:
EULA: true
MOD_PLATFORM: AUTO_CURSEFORGE
CF_API_KEY: ${CF_API_KEY}
CF_SLUG: all-the-mods-10
VERSION: 1.21.1
MEMORY: 16G
CF_OVERRIDES_EXCLUSIONS: |
shaderpacks/**
ENABLE_RCON: "true"
volumes:
- ./data:/data
backups:
image: itzg/mc-backup
user: "1000"
depends_on:
mc:
condition: service_healthy
environment:
BACKUP_INTERVAL: "4h"
RCON_HOST: mc
INITIAL_DELAY: 0
PRUNE_BACKUPS_DAYS: 3
volumes:
- ./mc-data:/data:ro
- ./mc-backup1s:/backups
```

Any ideas?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the provided compose configuration and the Minecraft and minecraft-backups RCON logs, then inspect how RCON is enabled and how the backups service connects. Reproduce the failed save-on attempts; the issue is resolved when the backup container authenticates and the command succeeds.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose
Domain
devops, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.