itzg / itzg/docker-mc-backup

Failing to connect to RCON serverdial

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

Description

I'm using the following compose file:
```
version: '3.9'

services:
minecraft:
container_name: minecraft-atm7
image: itzg/minecraft-server:java17
ports:
- "25565:25565"
restart: unless-stopped
stdin_open: true
tty: true
environment:
EULA: "TRUE"
WORLD: /worlds/world
MEMORY: 16G
JVM_XX_OPTS: "-XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=40 -XX:G1MaxNewSizePercent=50 -XX:G1HeapRegionSize=32M -XX:G1ReservePercent=15 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -X>
TYPE: FORGE
VERSION: 1.18.2
STOP_SERVER_ANNOUNCE_DELAY: 300
# Need to manually rev these (place downloaded pack in ./modpacks). This will be pulled in unless SKIP_GENERIC_PACK_UPDATE_CHECK: false is set here.
FORGEVERSION: 40.1.68
GENERIC_PACK: /modpacks/Server-Files-0.4.24.zip
# UUID ops here
OPS: 9d5101ef-4f07-431e-b86c-cc734e8a5952
# Server listing info
# config options
DIFFICULTY: normal
volumes:
# maps from host:container for data persistence
- ./data:/data
- ./modpacks:/modpacks:ro
- ./worlds:/worlds:ro
# Docker reservations
mem_limit: 25g
mem_reservation: 18g
# cpus: 0.5
backups:
container_name: backup-atm7
image: itzg/mc-backup
environment:
SERVER_PORT: 25565
# timing
BACKUP_INTERVAL: "1h"
INITIAL_DELAY: "2m"
# online player
PAUSE_IF_NO_PLAYERS: "true"
PLAYERS_ONLINE_CHECK_INTERVAL: "2m"
PRUNE_BACKUPS_DAYS: 2
# method info
BACKUP_METHOD: tar
DEST_DIR: /backups
TAR_COMPRESS_METHOD: zstd
ZSTD_PARAMETERS: "-11 --long --single-thread"
volumes:
# IMPORTANT: Must mount to same location as server data volume above
- ./data:/data:ro
# Where the backups will be saved to
- /media/HDD/game_backups/mc/ATM7/0.4.24:/backups
# share network namespace with server to simplify rcon access
network_mode: "service:minecraft"
```
And receiving the following error:
```
Unable to execute rcon-cli save-on - try 0/5. Retrying in 10s
Failure reason: 2022/08/06 Failed to RCON serverdial tcp 127.0.0.1:25575: connect: connection refused
```
Running on headless Ubuntu. I've tried looking at some of the other bug reports here with similar issues, but I can't seem to figure this one out. Is this expected since I'm specifying `tar` mode?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the minecraft and backups service definitions in the provided compose file, focusing on network_mode, SERVER_PORT, and the RCON connection error. Check the relevant container logs and RCON configuration to determine why 127.0.0.1:25575 refuses the connection. Done means the backup service can run its RCON command successfully in tar mode.

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
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.