itzg / itzg/docker-mc-backup

container keeps restarting after img update

Open
#296 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

discussion
Dominant language
Shell
Stars
538
Forks
69
Avg merge
3h 28m
Merged PRs (30d)
2

Description

Hi i have the main server and backup container compose in the same stack, and every time after the img update, the backup container would keeps restarting with below error message. feels like the docker docker is trying to connect the 127.0.0.11:53 which is not defined in any configuration... not sure how to resolve it in my environment? Thanks!

```
minecraftserver-backups-1
date,stream,content
2026/06/01 10:42:27,stderr,2026-06-01T14:42:27+0000 ERROR Failure reason: 2026/06/01 14:42:27 Failed to connect to RCON serverdial tcp: lookup mc on 127.0.0.11:53: no such host

2026/06/01 10:42:27,stderr,2026-06-01T14:42:27+0000 ERROR Unable to execute rcon-cli save-on - try 1/5. Retrying in 10s

2026/06/01 10:42:17,stderr,2026-06-01T14:42:17+0000 ERROR Failure reason: 2026/06/01 14:42:17 Failed to connect to RCON serverdial tcp: lookup mc on 127.0.0.11:53: no such host

2026/06/01 10:42:17,stderr,2026-06-01T14:42:17+0000 ERROR Unable to execute rcon-cli save-on - try 0/5. Retrying in 10s

2026/06/01 10:42:17,stderr,2026-06-01T14:42:17+0000 INFO waiting for rcon readiness...

2026/06/01 10:42:12,stderr,2026-06-01T14:42:12+0000 INFO waiting initial delay of 5...

2026/06/01 10:42:12,stderr,time="2026-06-01T14:42:12Z" level=info msg="Skipping uid/gid change since current user is not root"

2026/06/01 10:42:01,stderr,2026-06-01T14:42:01+0000 ERROR Failure reason: 2026/06/01 14:42:01 Failed to connect to RCON serverdial tcp: lookup mc on 127.0.0.11:53: no such host

2026/06/01 10:42:01,stderr,2026-06-01T14:42:01+0000 ERROR Unable to execute rcon-cli save-on - try 5/5. Retrying in 10s

2026/06/01 10:41:51,stderr,2026-06-01T14:41:51+0000 ERROR Failure reason: 2026/06/01 14:41:51 Failed to connect to RCON serverdial tcp: lookup mc on 127.0.0.11:53: no such host

2026/06/01 10:41:51,stderr,2026-06-01T14:41:51+0000 ERROR Unable to execute rcon-cli save-on - try 4/5. Retrying in 10s

2026/06/01 10:41:41,stderr,2026-06-01T14:41:41+0000 ERROR Failure reason: 2026/06/01 14:41:41 Failed to connect to RCON serverdial tcp: lookup mc on 127.0.0.11:53: no such host

2026/06/01 10:41:41,stderr,2026-06-01T14:41:41+0000 ERROR Unable to execute rcon-cli save-on - try 3/5. Retrying in 10s

2026/06/01 10:41:31,stderr,2026-06-01T14:41:31+0000 ERROR Failure reason: 2026/06/01 14:41:31 Failed to connect to RCON serverdial tcp: lookup mc on 127.0.0.11:53: no such host

2026/06/01 10:41:31,stderr,2026-06-01T14:41:31+0000 ERROR Unable to execute rcon-cli save-on - try 2/5. Retrying in 10s

2026/06/01 10:41:21,stderr,2026-06-01T14:41:21+0000 ERROR Failure reason: 2026/06/01 14:41:21 Failed to connect to RCON serverdial tcp: lookup mc on 127.0.0.11:53: no such host

2026/06/01 10:41:21,stderr,2026-06-01T14:41:21+0000 ERROR Unable to execute rcon-cli save-on - try 1/5. Retrying in 10s

2026/06/01 10:41:11,stderr,2026-06-01T14:41:11+0000 ERROR Failure reason: 2026/06/01 14:41:11 Failed to connect to RCON serverdial tcp: lookup mc on 127.0.0.11:53: no such host

2026/06/01 10:41:11,stderr,2026-06-01T14:41:11+0000 ERROR Unable to execute rcon-cli save-on - try 0/5. Retrying in 10s

2026/06/01 10:41:11,stderr,2026-06-01T14:41:11+0000 INFO waiting for rcon readiness...

2026/06/01 10:41:06,stderr,2026-06-01T14:41:06+0000 INFO waiting initial delay of 5...

2026/06/01 10:41:06,stderr,time="2026-06-01T14:41:06Z" level=info msg="Skipping uid/gid change since current user is not root"

2026/06/01 10:40:56,stderr,2026-06-01T14:40:56+0000 ERROR Failure reason: 2026/06/01 14:40:56 Failed to connect to RCON serverdial tcp: lookup mc on 127.0.0.11:53: no such host

2026/06/01 10:40:56,stderr,2026-06-01T14:40:56+0000 ERROR Unable to execute rcon-cli save-on - try 5/5. Retrying in 10s

2026/06/01 10:40:46,stderr,2026-06-01T14:40:46+0000 ERROR Failure reason: 2026/06/01 14:40:46 Failed to connect to RCON serverdial tcp: lookup mc on 127.0.0.11:53: no such host

2026/06/01 10:40:46,stderr,2026-06-01T14:40:46+0000 ERROR Unable to execute rcon-cli save-on - try 4/5. Retrying in 10s

2026/06/01 10:40:36,stderr,2026-06-01T14:40:36+0000 ERROR Failure reason: 2026/06/01 14:40:36 Failed to connect to RCON serverdial tcp: lookup mc on 127.0.0.11:53: no such host

2026/06/01 10:40:36,stderr,2026-06-01T14:40:36+0000 ERROR Unable to execute rcon-cli save-on - try 3/5. Retrying in 10s

2026/06/01 10:40:26,stderr,2026-06-01T14:40:26+0000 ERROR Failure reason: 2026/06/01 14:40:26 Failed to connect to RCON serverdial tcp: lookup mc on 127.0.0.11:53: no such host

2026/06/01 10:40:26,stderr,2026-06-01T14:40:26+0000 ERROR Unable to execute rcon-cli save-on - try 2/5. Retrying in 10s

2026/06/01 10:40:16,stderr,2026-06-01T14:40:16+0000 ERROR Failure reason: 2026/06/01 14:40:16 Failed to connect to RCON serverdial tcp: lookup mc on 127.0.0.11:53: no such host

2026/06/01 10:40:16,stderr,2026-06-01T14:40:16+0000 ERROR Unable to execute rcon-cli save-on - try 1/5. Retrying in 10s

2026/06/01 10:40:06,stderr,2026-06-01T14:40:06+0000 ERROR Failure reason: 2026/06/01 14:40:06 Failed to connect to RCON serverdial tcp: lookup mc on 127.0.0.11:53: no such host

2026/06/01 10:40:06,stderr,2026-06-01T14:40:06+0000 ERROR Unable to execute rcon-cli save-on - try 0/5. Retrying in 10s

2026/06/01 10:40:06,stderr,2026-06-01T14:40:06+0000 INFO waiting for rcon readiness...

2026/06/01 10:40:01,stderr,2026-06-01T14:40:01+0000 INFO waiting initial delay of 5...

2026/06/01 10:40:01,stderr,time="2026-06-01T14:40:01Z" level=info msg="Skipping uid/gid change since current user is not root"

```

The docker compose file is like below

```
services:
mc:
image: itzg/minecraft-server
container_name: minecraftserver
environment:
EULA: "true"
#TYPE: PAPER
UID: 1026
GID: 100
TZ: America/Toronto
ports:
- "25565:25565"
# depends_on:
# restore-backup:
# condition: service_completed_successfully
volumes:
- /volume4/docker_data/minecraft-server/data:/data:rw
stdin_open: true
tty: true
restart: always
# "init" container for mc to restore the data volume when empty
# restore-backup:
# Same image as mc, but any base image with bash and tar will work
# image: itzg/mc-backup
# user: "1026"
# restart: no
# entrypoint: restore-tar-backup
# volumes:
# Must be same mount as mc service, needs to be writable
# - /volume4/docker_data/minecraft-server/data:/data
# Must be same mount as backups service, but can be read-only
# - /volume4/docker_data/mc-backups:/backups:ro
backups:
image: itzg/mc-backup
user: "1026"
depends_on:
mc:
condition: service_healthy
restart: always
environment:
BACKUP_INTERVAL: "24h"
PRUNE_BACKUPS_DAYS: 30
RCON_HOST: mc
# since this service waits for mc to be healthy, no initial delay is needed
INITIAL_DELAY: 5
# As an example, to backup only the world data:
# INCLUDES: world,world_nether,world_the_end
volumes:
- /volume4/docker_data/minecraft-server/data:/data:ro
- /volume4/docker_data/mc-backups:/backups
volumes:
data: {}
```

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the provided Docker Compose service definitions and the backup container logs, focusing on the RCON_HOST value of mc and the mc service's health dependency. Determine why the backup container cannot resolve mc after the image update; done means the backup container resolves the RCON server and no longer restarts.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.