joesturge / lazymc-docker-proxy

Put your Minecraft containers to rest when idle.
GNU General Public License v3.0
27 stars 4 forks source link

"Incompatible vanilla server" seen in client when running Forge server #135

Open sonium-labs opened 4 weeks ago

sonium-labs commented 4 weeks ago

Hello!

I have the following Docker compose:

networks:
    minecraft-network:
      driver: bridge
      ipam:
        config:
          - subnet: 172.18.0.0/16

services:
    lazymc:
        container_name: lazymc
        image: ghcr.io/joesturge/lazymc-docker-proxy:latest
        networks:
            minecraft-network:
                ipv4_address: 172.18.0.2
        environment:
            # Point to the service name of the Minecraft server
            SERVER_ADDRESS: minecraft:25565
            # Required to find the container to manage it
            LAZYMC_GROUP: minecraft
        restart: unless-stopped
        volumes:
            # you should mount the minecraft server dir under /server, using read only.
            - /home/user/minecraft-server/data:/server:ro
            # you need to supply the docker socket, so that the container can run docker command
            - /var/run/docker.sock:/var/run/docker.sock:ro
        ports:
            # lazymc-docker-proxy acts as a proxy, so there is
            # no need to expose the server port on the Minecraft container
            - "25565:25565"

    minecraft:
        container_name: minecraft
        image: itzg/minecraft-server:latest
        networks:
            minecraft-network:
                ipv4_address: 172.18.0.3
        labels:
            # Set lazymc.enabled to true to enable lazymc on this container
            - lazymc.enabled=true
            # Required to find the container to manage it
            - lazymc.group=minecraft
            # Point to the service name of the Minecraft server
            - lazymc.server.address=minecraft:25565
            # The minecraft client version of the forge server
            - lazymc.public.version=1.20.1
            # The minecraft protocol version of the forge server
            - lazymc.public.protocol=763
            # Set to true on a forge server
            - lazymc.server.forge=true
        hostname: minecraft
        tty: true
        stdin_open: true
        restart: no
        # ports:
        # - "25565:25565"
        environment:
            EULA: TRUE
            REMOVE_OLD_MODS: true
            TYPE: FORGE
            MAX_PLAYERS: 12
            DIFFICULTY: normal
            OVERRIDE_ICON: TRUE
            VERSION: 1.20.1
            INIT_MEMORY: 20G
            MAX_MEMORY: 20G
            # When using dynamic-view, distance settings are not needed
            VIEW_DISTANCE: 16
            SIMULATION_DISTANCE: 10
            SNOOPER_ENABLED: false
            CF_API_KEY: ${CF_API_KEY}
            CURSEFORGE_FILES: |
                <modlist_here>

        volumes:
        - /home/user/minecraft-server/data:/data

Starting up the proxy, I see the following in Minecraft [Forge] image

Still works, but wanted to log this bug, or otherwise discover where I went wrong in my config!

joesturge commented 3 weeks ago

Hi thanks for logging this issue! your configuration looks correct from what I can see, what version of minecraft client are you using?

sonium-labs commented 3 weeks ago

Hi Joe,

Thanks for the response and for making such a useful tool! Been great to save on some compute resources.

I'm rocking the following Forge client: image

FurkanVG commented 3 weeks ago

Simliar issue on Vanilla, aka on latest Paper Version 1.21.1. My MC Server without proxy has no incompatible issue and it looks like this: image

But if i use this lazymc docker proxy, its showing an "error" that the version is incompatible:

image

This is ONLY the case if the minecraft server is offline. Once its online this error doesnt exist anymore.

joesturge commented 3 weeks ago

I think it may have something to do with this property: https://github.com/timvisee/lazymc/blob/master/res/lazymc.toml#L48 I think i disable that by default, enabling it may sort this out but it might also force the server to wake_on_start which could cause other issues, only one way to find out...

sonium-labs commented 2 weeks ago

Reporting back--no difference when I enable!