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

Spigot 1.18 (built from source) won't launch #1140

Closed C0Nd3Mnd closed 2 years ago

C0Nd3Mnd commented 2 years ago

Describe the problem

Running Spigot 1.18 currently doesn't work. I tried using a 1.18 version I built myself (using BuildTools.jar) and I also tried the BUILD_FROM_SOURCE option (downloads from https://getbukkit.org/ are not available as of now). The .jar builds fine, but it doesn't launch properly.

It stays at [17:21:28] [Worker-Main-13/INFO]: Loaded 7 recipes for a while (during which all CPU threads get fully utilized) and then exits with 2021-11-30T17:22:56.337Z INFO mc-server-runner Done.

I tried running without any plugins but to no avail. I'm running the latest container version. Launching the server outside of the container works as expected. Any idea what could be causing this?

Container definition

version: '3.8'
services:
  minecraft-test:
    image: 'itzg/minecraft-server:java17'
    container_name: minecraft-test
    restart: unless-stopped
    networks:
      mariadb_default:
      kuma_default:
      npm_default:
      default:
      internal_bungeecord:
        ipv4_address: 172.13.37.102
    environment:
      TYPE: 'SPIGOT'
      EULA: 'TRUE'
      MEMORY: '3G'
      VERSION: '1.18'
      PLUGINS_SYNC_UPDATE: 'true'
      REMOVE_OLD_MODS: 'true'
      REMOVE_OLD_MODS_INCLUDE: '*.jar'
      REMOVE_OLD_MODS_DEPTH: 1
      UID: 4009
      GID: 4009
      COPY_CONFIG_DEST: '/data'
      REPLACE_ENV_VARIABLES: 'true'
      SYNC_SKIP_NEWER_IN_DESTINATION: 'false'
      USE_AIKAR_FLAGS: 'true'
      ENABLE_ROLLING_LOGS: 'true'
      BUILD_FROM_SOURCE: 'true'
      CFG_ONLINE_MODE: 'false'
      CFG_GAMEMODE: 'creative'
      CFG_LEVELNAME: 'test'
      CFG_PVP: 'false'
      CFG_COMMAND_BLOCK: 'false'
    volumes:
      - ./minecraft-test:/data
      - ./install-plugins/main-118:/plugins
      - ./shared-config:/config

Container logs

Starting server
Loading libraries, please wait...
[17:21:26] [ServerMain/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[17:21:27] [ServerMain/INFO]: Reloading ResourceManager: Default, bukkit
[17:21:28] [Worker-Main-13/INFO]: Loaded 7 recipes
2021-11-30T17:22:56.337Z        INFO    mc-server-runner        Done
C0Nd3Mnd commented 2 years ago

I just realized that Spigot won't run regardless of version (I was running Paper before). Paper works just fine. I'm looking into it...

EDIT: So Spigot 1.17.1 launches and plays just fine, however after the Loaded 7 recipes no more log output is produced.

C0Nd3Mnd commented 2 years ago

I figured it out 😅

ENABLE_ROLLING_LOGS doesn't seem to work nicely with Spigot and docker logs. It works just fine with Paper, but Spigot just doesn't show any logs then. If I disable it, Spigot logs just fine.

Since it wasn't logging anything I was under the impression the server wasn't running, however it was running just fine (well, certain plugins are causing problems but it's early days and that obviously has nothing to do with this docker image).

I'll close this issue as it's probably irrelevant now.