itzg / itzg/mc-router

Router Sleep Issues w/ Multiple Compose Files

Open
#516 2 comments 0 reactions 0 assignees View on GitHub
discussion
Dominant language
Go
Stars
926
Forks
72
Avg merge
20h 14m
Merged PRs (30d)
15

Description

Hope all is well!

Recently tried to set up `itzg/mc-router` as a separate container alongside a minecraft server I host for friends. While I'm able to successfully get routes in *assuming* the initial server container is up and running, it is unable to be woken up when it goes to sleep, unless I directly bypass the router and connect to the container itself.

Here's a minimally reproducible config (please note the domain name ``). Domain & SRV records work fine, and I'm able to reach the router itself. Additionally, I can reach the server *from* the router assuming the server is awake. However, the server itself cannot be woken up by the router.

# Server Compose File
```yaml
networks:
mc-router-network:
external: "true"

services:
mc:
image: itzg/minecraft-server
container_name: mc-test
tty: true
stdin_open: true
ports:
- "21070:25565" #bypass port in the event the router doesn't wake this up
networks:
- mc-router-network
labels:
mc-router.host: "mc..com"
mc-router.network: "mc-router-network"
environment:
VERSION: "1.21.11"
EULA: "TRUE"
TYPE: "FABRIC"
SNOOPER_ENABLED: false # disable data collection

# Server Info Settings
MAX_PLAYERS: 32

# Memory Settings
INIT_MEMORY: 1G
MAX_MEMORY: 3G

# Auto Pause Settings
ENABLE_AUTOPAUSE: "TRUE"
MAX_TICK_TIME: "-1"
AUTOPAUSE_TIMEOUT_INIT: "600" # the time between server start and the pausing
AUTOPAUSE_TIMEOUT_EST: "3600" # the time between the last client disconnect and the pausing

# Logging Params
LOG_TIMESTAMP: "true"

healthcheck:
test: mc-health
start_period: 1m
interval: 30s
retries: 5
volumes:
- ./data:/data
restart: unless-stopped
```

# Router Compose File
```yaml
services:
router:
image: itzg/mc-router
container_name: mc-router
ports:
- "25565:25565"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
EULA: true
IN_DOCKER: true
AUTO_SCALE_UP: true
DEBUG: true
networks:
- mc-router-network
restart: unless-stopped

networks:
mc-router-network:
name: mc-router-network
```

Is this an issue with the Docker container connections themselves, or is it potentially the autosleep on the server itself preventing it from working properly? Running a docker network inspect command shows both of the containers are on the network itself, but waking it from sleep remains an issue.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Server Compose File and Router Compose File, then inspect the shared mc-router-network with docker network inspect. Reproduce the case where the Minecraft server is asleep and the router is reached through the configured domain, comparing the router/server container connection behavior with direct access; done means identifying whether Docker networking or the server's autosleep prevents wake-up and documenting the cause.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose
Domain
infrastructure, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.