itzg / mc-router

Routes Minecraft client connections to backend servers based upon the requested server address

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[ERROR] - Server Misbehaving

Marc-Harony opened this issue Β· comments

Hi there! πŸ‘‹πŸ»
I'm running multiple of your Minecraft containers behind your router image.
I currently have a modded on and a vanilla one.
I don't have any connection problem using the vanilla one, the router is working perfectly well.
The connection problem comes with the modded one.

When I try to connect to the modded server without using the router, I have no issues (tested with mcsrvstat.us. But when the router is in front of my modded server, I can't join anymore.

Here are the logs of the router container:

time="2024-04-16T09:24:27+02:00" level=info msg="Got connection" client="<someIP>:47668"
time="2024-04-16T09:24:27+02:00" level=info msg="Connecting to backend" backendHostPort="aged:25565" client="<someIP>:47668" server=aged.domain.com
time="2024-04-16T09:24:27+02:00" level=warning msg="Unable to connect to backend" backend="aged:25565" client="<someIP>:47668" error="dial tcp: lookup aged on 127.0.0.11:53: server misbehaving" serverAddress=aged.domain.com

Here is my compose file:

---
services:
  aged:
    image: itzg/minecraft-server
    container_name: aged
    tty: true
    stdin_open: true
    environment:
      EULA: "TRUE"
      MOD_PLATFORM: MODRINTH
      MODRINTH_MODPACK: https://modrinth.com/modpack/aged
      INIT_MEMORY: 4G
      MAX_MEMORY: 10G
#    ports:
#      - "25565:25565"
    volumes:
      - ./aged:/data
      - /etc/localtime:/etc/localtime:ro                                      #To have the same time as the host
      - /etc/localtime:/etc/timezone:ro                                       #To have the same time as the host

  mc_router:
    image: itzg/mc-router
    container_name: mc_router
    hostname: mc_router
    volumes:
      - /etc/localtime:/etc/localtime:ro                                      #To have the same time as the host
      - /etc/localtime:/etc/timezone:ro                                       #To have the same time as the host
    networks:
      - minecraft_net
    ports:
      - "25565:25565"
    environment:
      MAPPING: |
        potato.domain.com=potato:25565
        aged.domain.com=aged:25565

networks:
  minecraft_net:
    driver: bridge
    ipam:
      driver: default
      config:
        - subnet: 172.69.0.0/24
          gateway: 172.69.0.1

Thanks in advance for your help! πŸ™πŸ»

Nevermind, I'm just dumb.
(I did not declares the aged container as a part of the minecraft_net network 🀦🏻)