itzg / docker-mc-backup

Provides a side-car container to backup itzg/minecraft-server world data
https://hub.docker.com/r/itzg/mc-backup
MIT License
334 stars 52 forks source link

mc-backup fails to connect to RCON and terminates the container #151

Closed WojciechRynczuk closed 1 year ago

WojciechRynczuk commented 1 year ago

I have two sets of the itzg minecraft server+backup services. Each of them is very similar and they differ by port mapping.

I create the containers with the following command: docker-compose up -d --force-recreate

When I set up the first pair everything works and the backup files are uploaded by rclone to the remote.

When I set up the second pair I get such errors (mc-backup container) and finally the second backup container (for the second server) is destroyed: 2023-10-05T20:13:44+0000 ERROR Failure reason: 2023/10/05 20:13:44 Failed to connect to RCON serverdial tcp: lookup mc on 127.0.0.11:53: server misbehaving 2023-10-05T20:13:54+0000 ERROR Unable to execute rcon-cli save-on - try 5/5. Retrying in 10s

I attach the compose file. docker-compose.txt

itzg commented 1 year ago

Can you provide the other compose file too?

WojciechRynczuk commented 1 year ago

Here comes the other. I usually run it first and it runs OK. docker-compose.txt

itzg commented 1 year ago

Since your service is named mc-public, that will be the hostname that needs to be specified in RCON_HOST. The other compose project worked since its service is named mc.

WojciechRynczuk commented 1 year ago

Thank you for checking that. Yes, it works now fine. I'm sorry for bothering you but I haven't spotted this. Another pair of eyes was useful.