itzg / docker-minecraft-server

Docker image that provides a Minecraft Server that will automatically download selected version at startup
https://docker-minecraft-server.readthedocs.io/
Apache License 2.0
9.23k stars 1.52k forks source link

Server crashes if the OPS env contains a username that doesn't exist #1271

Closed Pao-Lumu closed 2 years ago

Pao-Lumu commented 2 years ago

Describe the problem

One of my server moderators changed their name a few days ago. Last night, when I did my weekly docker-compose restart, it crashlooped. I didn't notice until waking up this morning.

Solution was, obviously, to set it to the correct name, but perhaps it could either just warn in console.

Container definition

Slightly changed to remove semi-sensitive information

version: "3"

services:
  minecraft:
    image: itzg/minecraft-server:java17
    ports:
      # CHANGE ME!!!! pattern is host:container
      - 22222:25565/tcp  # server/query port
      - 22222:25565/udp
      - 22232:25575  # rcon port
      - 22223:8100   # bluemap support

    environment:
      version: "latest"  # 1.18.1

      # Server Type
      # TYPE: "PAPER"
      TYPE: "FABRIC"

      # Launch/Runtime options
      MAX_MEMORY: "8G"
      USE_AIKAR_FLAGS: "true"
      REPLACE_ENV_IN_PLACE: "true"
      CONSOLE: "FALSE" 
      ENABLE_ROLLING_LOGS: "true"
      TZ: "America/Chicago"

      # Server Configuration options
      SEED: "banana pancake"
      EULA: "true"
      MOTD: "Vibing"
      MAX_PLAYERS: "10"
      SPAWN_PROTECTION: "0"
      PVP: "false"
      ENABLE_RCON: "true"
      RCON_PASSWORD: ****REDACTED****
      ENABLE_QUERY: "true"
      SNOOPER_ENABLED: "false"
      ALLOW_FLIGHT: "true"
      OPS: "MrWinABagel" # changed their name, causing the error

    tty: true
    stdin_open: true
    restart: unless-stopped
    volumes:
      - ./fabric:/data
    deploy:
      resources:
        limits:
          cpus: "3.0"
          memory: 8192M

Container logs

No response

jcv8-dev commented 2 years ago

Can you set DEBUG: "TRUE" in the environment and provide the output of docker logs _containername_?

Pao-Lumu commented 2 years ago

This was (apparently) fixed in commit #1306, as it's no longer reproducible and does not crash the server. Console now warns of a 500 error from playerdb.co then continues.