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.4k stars 1.55k forks source link

No existing world data, creating new world #2667

Closed br4yd closed 7 months ago

br4yd commented 8 months ago

Describe the problem

When I start up the server it always generates a new world even though the folder structure is being mapped to the host and the world folder is created on the host correctly and mounted to the container. This causes to loose all progress every time the server is restarting due to the world being generated again.

Container definition

version: "3"
services:
    coreprotect-db:
        image: lscr.io/linuxserver/mariadb:latest
        container_name: coreprotect-db
        environment:
            PUID: 1000
            PGID: 1000
            TZ: "Europe/Berlin"
            MYSQL_ROOT_PASSWORD: "REDACTED"
            MYSQL_USER: coreprotect
            MYSQL_PASSWORD: "REDACTED"
            MYSQL_DATABASE: coreprotect
        volumes:
            - ./coreprotectdb-data:/config
        restart: unless-stopped
        networks:
            - arbuinia_network

    dynmap-db:
        image: lscr.io/linuxserver/mariadb:latest
        container_name: dynmap-db
        environment:
            PUID: 1000
            PGID: 1000
            TZ: "Europe/Berlin"
            MYSQL_ROOT_PASSWORD: "REDACTED"
            MYSQL_USER: dynmap
            MYSQL_PASSWORD: "REDACTED"
            MYSQL_DATABASE: dynmap
        volumes:
            - ./dynmapdb-data:/config
        restart: unless-stopped
        networks:
            - arbuinia_network  

    mcserver:
        image: itzg/minecraft-server
        ports:
            - 25565:25565
            - 9000:9000
            - 24454:24454/udp
        environment:
            EULA: "TRUE"
            PUID: 1000
            PGID: 1000
            MEMORY: "16G"
            MOTD: "§6Arbuinia §a§l§k| §cVanilla"
            DIFFICULTY: "hard"
            ENABLE_WHITELIST: "true"
            MAX_PLAYERS: 10
            ANNOUNCE_PLAYER_ACHIEVEMENTS: "true"
            PVP: "true"
            TZ: "Europe/Berlin"
            LOG_TIMESTAMP: "true"
            MAX_TICK_TIME: -1
            ENABLE_AUTOPAUSE: "TRUE"
            OVERRIDE_SERVER_PROPERTIES: "true"
            ENABLE_COMMAND_BLOCK: "false"
            TYPE: PAPER
            VERSION: 1.20.4
        tty: true
        stdin_open: true
        restart: unless-stopped
        volumes:
            - ./minecraft-data:/data
        networks:
            - arbuinia_network

networks:
    arbuinia_network:
            driver: bridge

Container logs

[init] 2024-02-17 10:17:53+01:00 Running as uid=1000 gid=1000 with /data as 'drwxr-xr-x 12 1000 1000 4096 Feb 17 10:13 /data'
[init] 2024-02-17 10:17:53+01:00 Autopause functionality enabled
[init] 2024-02-17 10:17:53+01:00 Resolving type given PAPER
[mc-image-helper] 10:17:55.438 INFO  : Resolved paper to version 1.20.4 build 426
[init] 2024-02-17 10:17:56+01:00 Enabling whitelist functionality
[mc-image-helper] 10:17:58.665 INFO  : Created/updated 2 properties in /data/server.properties
[init] 2024-02-17 10:18:02+01:00 Setting initial memory to 16G and max to 16G
[init] 2024-02-17 10:18:03+01:00 Starting the Minecraft server...
Starting org.bukkit.craftbukkit.Main
System Info: Java 17 (OpenJDK 64-Bit Server VM 17.0.10+7) Host: Linux 5.10.0-26-amd64 (amd64)
Loading libraries, please wait...
[10:18:08 INFO]: Environment: Environment[sessionHost=https://sessionserver.mojang.com, servicesHost=https://api.minecraftservices.com, name=PROD]
[10:18:09 INFO]: Found new data pack file/bukkit, loading it automatically
[10:18:09 INFO]: No existing world data, creating new world
[10:18:10 INFO]: Loaded 1174 recipes
[10:18:10 INFO]: Loaded 1271 advancements
[10:18:10 INFO]: Starting minecraft server version 1.20.4
[10:18:10 INFO]: Loading properties
[10:18:10 INFO]: This server is running Paper version git-Paper-426 (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: 7ccefdc)
[10:18:11 INFO]: Server Ping Player Sample Count: 12
[10:18:11 INFO]: Using 4 threads for Netty based IO
[10:18:11 WARN]: [!] The timings profiler has been enabled but has been scheduled for removal from Paper in the future.
    We recommend installing the spark profiler as a replacement: https://spark.lucko.me/
    For more information please visit: https://github.com/PaperMC/Paper/issues/8948
[10:18:11 INFO]: [ChunkTaskScheduler] Chunk system is using 1 I/O threads, 2 worker threads, and gen parallelism of 2 threads
[10:18:11 INFO]: Default game type: SURVIVAL
[10:18:11 INFO]: Generating keypair
[10:18:11 INFO]: Starting Minecraft server on *:25565
[10:18:11 INFO]: Using epoll channel type
[10:18:11 INFO]: Paper: Using libdeflate (Linux x86_64) compression from Velocity.
[10:18:11 INFO]: Paper: Using OpenSSL 1.1.x (Linux x86_64) cipher from Velocity.
[10:18:12 INFO]: [com.dfsek.terra.AbstractPlatform] Initializing Terra...
[10:18:12 INFO]: [com.dfsek.terra.AbstractPlatform] Loading config.yml
[10:18:12 INFO]: [com.dfsek.terra.config.PluginConfigImpl] Loading config values from config.yml
[10:18:12 INFO]: [com.dfsek.terra.AbstractPlatform] Loading 37 Terra addons:
        - biome-provider-extrusion@1.0.0-BETA+ab60f14ff
        - biome-provider-image@1.0.1-BETA+ab60f14ff
        - biome-provider-image-v2@1.0.1-BETA+ab60f14ff
        - biome-provider-pipeline@1.0.2-BETA+ab60f14ff
        - biome-provider-pipeline-v2@1.0.1-BETA+ab60f14ff
        - biome-provider-single@1.0.0-BETA+ab60f14ff
        - biome-query-api@1.0.0-BETA+ab60f14ff
        - chunk-generator-noise-3d@1.2.1-BETA+ab60f14ff
        - command-addons@1.0.0-BETA+ab60f14ff
        - command-packs@1.0.0-BETA+ab60f14ff
        - command-profiler@1.0.0-BETA+ab60f14ff
        - command-structures@1.0.0-BETA+ab60f14ff
        - config-biome@1.0.0-BETA+ab60f14ff
        - config-distributors@1.0.1-BETA+ab60f14ff
        - config-feature@1.0.0-BETA+ab60f14ff
        - config-flora@1.0.1-BETA+ab60f14ff
        - config-locators@1.1.1-BETA+ab60f14ff
        - config-noise-function@1.1.0-BETA+ab60f14ff
        - config-number-predicate@1.0.0-BETA+ab60f14ff
        - config-ore@1.1.1-BETA+ab60f14ff
        - config-palette@1.0.0-BETA+ab60f14ff
        - config-structure@1.0.1-BETA+ab60f14ff
        - generation-stage-feature@1.1.0-BETA+ab60f14ff
        - generation-stage-structure@1.0.0-BETA+ab60f14ff
        - language-yaml@1.0.0-BETA+ab60f14ff
        - library-image@1.1.0-BETA+ab60f14ff
        - locator-slant-noise-3d@1.0.0-BETA+ab60f14ff
        - palette-block-shortcut@1.0.0-BETA+ab60f14ff
        - pipeline-image@1.0.0-BETA+ab60f14ff
        - structure-block-shortcut@1.0.0-BETA+ab60f14ff
        - structure-function-check-noise-3d@1.0.1-BETA+ab60f14ff
        - structure-mutator@0.1.0-BETA+ab60f14ff
        - structure-sponge-loader@1.0.0-BETA+ab60f14ff
        - structure-terrascript-loader@1.2.0-BETA+ab60f14ff
        - terra@1.0.0
        - terra-bukkit@1.0.0
        - terrascript-function-sampler@1.0.0-BETA+ab60f14ff
[10:18:12 INFO]: [com.dfsek.terra.AbstractPlatform] Terra addons successfully loaded.
[10:18:12 INFO]: [com.dfsek.terra.AbstractPlatform] Finished initialization.
[10:18:12 INFO]: [LuckPerms] Loading server plugin LuckPerms v5.4.117
[10:18:12 INFO]: [Terra] Loading server plugin Terra v6.4.3-BETA+ab60f14ff
[10:18:12 INFO]: [dynmap] Loading server plugin dynmap v3.7-beta-4-935
[10:18:12 INFO]: [dynmap] version=git-Paper-426 (MC: 1.20.4)
[10:18:12 INFO]: [dynmap] Mod Support API available
[10:18:12 INFO]: [CoreProtect] Loading server plugin CoreProtect v22.2
[10:18:12 INFO]: [voicechat] Loading server plugin voicechat v2.5.0
[10:18:12 INFO]: Server permissions file permissions.yml is empty, ignoring it
[10:18:12 INFO]: [LuckPerms] Enabling LuckPerms v5.4.117
[10:18:13 INFO]:         __    
[10:18:13 INFO]:   |    |__)   LuckPerms v5.4.117
[10:18:13 INFO]:   |___ |      Running on Bukkit - Paper
[10:18:13 INFO]: 
[10:18:13 INFO]: [LuckPerms] Loading configuration...
[10:18:13 INFO]: [LuckPerms] Loading storage provider... [H2]
[10:18:13 INFO]: [LuckPerms] Loading internal permission managers...
[10:18:13 INFO]: [LuckPerms] Performing initial data load...
[10:18:13 INFO]: [LuckPerms] Successfully enabled. (took 920ms)
[10:18:13 INFO]: [Terra] Enabling Terra v6.4.3-BETA+ab60f14ff
[10:18:13 INFO]: [com.dfsek.terra.bukkit.TerraBukkitPlugin] Running on Minecraft version v1.20.3 with server implementation Paper.
[10:18:13 INFO]: [com.dfsek.terra.AbstractPlatform] Loading config packs...
[10:18:13 INFO]: [com.dfsek.terra.registry.master.ConfigRegistry] Loading ZIP archive: default.zip
[10:18:14 INFO]: [com.dfsek.terra.config.pack.ConfigPackImpl] Loading config pack "OVERWORLD:OVERWORLD"
[10:18:15 INFO]: [com.dfsek.terra.config.pack.ConfigPackImpl] Loaded config pack "OVERWORLD:OVERWORLD" v1.3.4 by Astrash, Sancires, Aureus in 1999.647621ms.
[10:18:15 INFO]: [com.dfsek.terra.AbstractPlatform] Loaded packs.
[10:18:15 INFO]: [com.dfsek.terra.bukkit.nms.v1_20_R3.AwfulBukkitHacks] Hacking biome registry...
[10:18:16 INFO]: [com.dfsek.terra.bukkit.nms.v1_20_R3.AwfulBukkitHacks] Doing tag garbage....
[10:18:16 INFO]: Preparing level "world"

Edited: Formatting

itzg commented 8 months ago

That does seem strange. Your volume definition is indeed correct, so it must be a problem unrelated to docker. I'd suggest watching the minecraft-data directory and see at what point during startup or runtime the content goes away or changes.

github-actions[bot] commented 7 months ago

This issue is stale because it has been open 30 days with no activity. Please add a comment describing the reason to keep this issue open.