Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REMOVE_OLD_MODS deletes all mods downloaded by MODRINTH_MODPACK #2530

Closed
xdinterface opened this issue Dec 5, 2023 · 5 comments · Fixed by #2648
Closed

REMOVE_OLD_MODS deletes all mods downloaded by MODRINTH_MODPACK #2530

xdinterface opened this issue Dec 5, 2023 · 5 comments · Fixed by #2648
Labels

Comments

@xdinterface
Copy link

Describe the problem

When REMOVE_OLD_MODS is set to true and the Option MODRINTH_MODPACK is used to download mods, the mods are getting deleted before the server starts resulting in the server starting without mods.

Container definition

version: "1.0"

services:
  cb:
    container_name: cb
    image: itzg/minecraft-server:latest
    restart: unless-stopped
    tty: true
    stdin_open: true
    environment:
      VERSION: 1.20.1
      MOD_PLATFORM: MODRINTH
      MODRINTH_MODPACK: https://modrinth.com/modpack/cobblemon-fabric/version/1.4.0.1
      MODRINTH_EXCLUDE_FILES: |
        betterpingdisplay
      UID: 1000
      GID: 1000
      EULA: "TRUE"
      TZ: "Europe/Berlin"
      INIT_MEMORY: 4G
      MAX_MEMORY: 8G
      DIFFICULTY: normal
      OPS: user
      MOTD: "Hi!"
      PVP: "FALSE"
      SPAWN_PROTECTION: 0
      ICON: https://cdn.modrinth.com/data/MdwFAVRL/e54083a07bcd9436d1f8d2879b0d821a54588b9e.png
      MAX_PLAYERS: 20
      ENABLE_WHITELIST: "TRUE"
      WHITELIST_FILE: /home/hades/minecraft/cb/whitelist.json
      REMOVE_OLD_MODS: "TRUE"
      REPLACE_ENV_VARIABLES: "TRUE"
    ports:
      - 25565:25565
    volumes:
      - /home/hades/minecraft/cb:/data

Container logs

[mc-image-helper] 23:40:13.625 INFO  : Downloaded mods/RoughlyEnoughItems-12.0.665.jar
[mc-image-helper] 23:40:13.894 INFO  : Downloaded mods/Xaeros_Minimap_23.8.2_Fabric_1.20.jar
[mc-image-helper] 23:40:14.500 INFO  : Downloaded mods/fabric-language-kotlin-1.10.10+kotlin.1.9.10.jar
[mc-image-helper] 23:40:14.582 INFO  : Downloaded mods/PresenceFootsteps-1.9.0.jar
[mc-image-helper] 23:40:20.761 INFO  : Downloaded mods/Cobblemon-fabric-1.4.0+1.20.1.jar
[mc-image-helper] 23:40:21.837 INFO  : Fabric launcher for minecraft 1.20.1 loader 0.14.23 is already available
[init] Removing old mods including:*.jar,*-version.json excluding:
[init] Enabling whitelist functionality
[mc-image-helper] 23:40:25.834 INFO  : Created/updated 1 property in /data/server.properties
[init] Replacing env variables in /data that match the prefix 'CFG_' ...
[mc-image-helper] 23:40:27.636 INFO  : The file ./ops.json already exists, so no changes will be made
[mc-image-helper] 23:40:28.611 INFO  : The file ./whitelist.json already exists, so no changes will be made
[init] Using server icon from https://cdn.modrinth.com/data/MdwFAVRL/e54083a07bcd9436d1f8d2879b0d821a54588b9e.png...
[init] Converting image to 64x64 PNG...
[init] Setting initial memory to 4G and max to 8G
[init] Starting the Minecraft server...
Downloading Minecraft server
Installing Fabric Loader 0.14.23(1.20.1) on the server
Downloading required files
Downloading library net.fabricmc:tiny-mappings-parser:0.3.0+build.17
Downloading library net.fabricmc:sponge-mixin:0.12.5+mixin.0.8.5
Downloading library net.fabricmc:tiny-remapper:0.8.2
Downloading library net.fabricmc:access-widener:2.1.0
Downloading library org.ow2.asm:asm:9.6
Downloading library org.ow2.asm:asm-analysis:9.6
Downloading library org.ow2.asm:asm-commons:9.6
Downloading library org.ow2.asm:asm-tree:9.6
Downloading library org.ow2.asm:asm-util:9.6
Downloading library net.fabricmc:intermediary:1.20.1
Downloading library net.fabricmc:fabric-loader:0.14.23
Generating server launch JAR
Unpacking 1.20.1/server-1.20.1.jar (versions:1.20.1) to versions/1.20.1/server-1.20.1.jar
Unpacking com/github/oshi/oshi-core/6.2.2/oshi-core-6.2.2.jar (libraries:com.github.oshi:oshi-core:6.2.2) to libraries/com/github/oshi/oshi-core/6.2.2/oshi-core-6.2.2.jar
Unpacking com/google/code/gson/gson/2.10/gson-2.10.jar (libraries:com.google.code.gson:gson:2.10) to libraries/com/google/code/gson/gson/2.10/gson-2.10.jar
Unpacking com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar (libraries:com.google.guava:failureaccess:1.0.1) to libraries/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar
Unpacking com/google/guava/guava/31.1-jre/guava-31.1-jre.jar (libraries:com.google.guava:guava:31.1-jre) to libraries/com/google/guava/guava/31.1-jre/guava-31.1-jre.jar
Unpacking com/mojang/authlib/4.0.43/authlib-4.0.43.jar (libraries:com.mojang:authlib:4.0.43) to libraries/com/mojang/authlib/4.0.43/authlib-4.0.43.jar
Unpacking com/mojang/brigadier/1.1.8/brigadier-1.1.8.jar (libraries:com.mojang:brigadier:1.1.8) to libraries/com/mojang/brigadier/1.1.8/brigadier-1.1.8.jar
Unpacking com/mojang/datafixerupper/6.0.8/datafixerupper-6.0.8.jar (libraries:com.mojang:datafixerupper:6.0.8) to libraries/com/mojang/datafixerupper/6.0.8/datafixerupper-6.0.8.jar
Unpacking com/mojang/logging/1.1.1/logging-1.1.1.jar (libraries:com.mojang:logging:1.1.1) to libraries/com/mojang/logging/1.1.1/logging-1.1.1.jar
Unpacking commons-io/commons-io/2.11.0/commons-io-2.11.0.jar (libraries:commons-io:commons-io:2.11.0) to libraries/commons-io/commons-io/2.11.0/commons-io-2.11.0.jar
Unpacking io/netty/netty-buffer/4.1.82.Final/netty-buffer-4.1.82.Final.jar (libraries:io.netty:netty-buffer:4.1.82.Final) to libraries/io/netty/netty-buffer/4.1.82.Final/netty-buffer-4.1.82.Final.jar
Unpacking io/netty/netty-codec/4.1.82.Final/netty-codec-4.1.82.Final.jar (libraries:io.netty:netty-codec:4.1.82.Final) to libraries/io/netty/netty-codec/4.1.82.Final/netty-codec-4.1.82.Final.jar
Unpacking io/netty/netty-common/4.1.82.Final/netty-common-4.1.82.Final.jar (libraries:io.netty:netty-common:4.1.82.Final) to libraries/io/netty/netty-common/4.1.82.Final/netty-common-4.1.82.Final.jar
Unpacking io/netty/netty-handler/4.1.82.Final/netty-handler-4.1.82.Final.jar (libraries:io.netty:netty-handler:4.1.82.Final) to libraries/io/netty/netty-handler/4.1.82.Final/netty-handler-4.1.82.Final.jar
Unpacking io/netty/netty-resolver/4.1.82.Final/netty-resolver-4.1.82.Final.jar (libraries:io.netty:netty-resolver:4.1.82.Final) to libraries/io/netty/netty-resolver/4.1.82.Final/netty-resolver-4.1.82.Final.jar
Unpacking io/netty/netty-transport/4.1.82.Final/netty-transport-4.1.82.Final.jar (libraries:io.netty:netty-transport:4.1.82.Final) to libraries/io/netty/netty-transport/4.1.82.Final/netty-transport-4.1.82.Final.jar
Unpacking io/netty/netty-transport-classes-epoll/4.1.82.Final/netty-transport-classes-epoll-4.1.82.Final.jar (libraries:io.netty:netty-transport-classes-epoll:4.1.82.Final) to libraries/io/netty/netty-transport-classes-epoll/4.1.82.Final/netty-transport-classes-epoll-4.1.82.Final.jar
Unpacking io/netty/netty-transport-native-epoll/4.1.82.Final/netty-transport-native-epoll-4.1.82.Final-linux-x86_64.jar (libraries:io.netty:netty-transport-native-epoll:4.1.82.Final:linux-x86_64) to libraries/io/netty/netty-transport-native-epoll/4.1.82.Final/netty-transport-native-epoll-4.1.82.Final-linux-x86_64.jar
Unpacking io/netty/netty-transport-native-epoll/4.1.82.Final/netty-transport-native-epoll-4.1.82.Final-linux-aarch_64.jar (libraries:io.netty:netty-transport-native-epoll:4.1.82.Final:linux-aarch_64) to libraries/io/netty/netty-transport-native-epoll/4.1.82.Final/netty-transport-native-epoll-4.1.82.Final-linux-aarch_64.jar
Unpacking io/netty/netty-transport-native-unix-common/4.1.82.Final/netty-transport-native-unix-common-4.1.82.Final.jar (libraries:io.netty:netty-transport-native-unix-common:4.1.82.Final) to libraries/io/netty/netty-transport-native-unix-common/4.1.82.Final/netty-transport-native-unix-common-4.1.82.Final.jar
Unpacking it/unimi/dsi/fastutil/8.5.9/fastutil-8.5.9.jar (libraries:it.unimi.dsi:fastutil:8.5.9) to libraries/it/unimi/dsi/fastutil/8.5.9/fastutil-8.5.9.jar
Unpacking net/java/dev/jna/jna/5.12.1/jna-5.12.1.jar (libraries:net.java.dev.jna:jna:5.12.1) to libraries/net/java/dev/jna/jna/5.12.1/jna-5.12.1.jar
Unpacking net/java/dev/jna/jna-platform/5.12.1/jna-platform-5.12.1.jar (libraries:net.java.dev.jna:jna-platform:5.12.1) to libraries/net/java/dev/jna/jna-platform/5.12.1/jna-platform-5.12.1.jar
Unpacking net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.jar (libraries:net.sf.jopt-simple:jopt-simple:5.0.4) to libraries/net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.jar
Unpacking org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar (libraries:org.apache.commons:commons-lang3:3.12.0) to libraries/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar
Unpacking org/apache/logging/log4j/log4j-api/2.19.0/log4j-api-2.19.0.jar (libraries:org.apache.logging.log4j:log4j-api:2.19.0) to libraries/org/apache/logging/log4j/log4j-api/2.19.0/log4j-api-2.19.0.jar
Unpacking org/apache/logging/log4j/log4j-core/2.19.0/log4j-core-2.19.0.jar (libraries:org.apache.logging.log4j:log4j-core:2.19.0) to libraries/org/apache/logging/log4j/log4j-core/2.19.0/log4j-core-2.19.0.jar
Unpacking org/apache/logging/log4j/log4j-slf4j2-impl/2.19.0/log4j-slf4j2-impl-2.19.0.jar (libraries:org.apache.logging.log4j:log4j-slf4j2-impl:2.19.0) to libraries/org/apache/logging/log4j/log4j-slf4j2-impl/2.19.0/log4j-slf4j2-impl-2.19.0.jar
Unpacking org/joml/joml/1.10.5/joml-1.10.5.jar (libraries:org.joml:joml:1.10.5) to libraries/org/joml/joml/1.10.5/joml-1.10.5.jar
Unpacking org/slf4j/slf4j-api/2.0.1/slf4j-api-2.0.1.jar (libraries:org.slf4j:slf4j-api:2.0.1) to libraries/org/slf4j/slf4j-api/2.0.1/slf4j-api-2.0.1.jar
Starting net.fabricmc.loader.impl.game.minecraft.BundlerClassPathCapture
[23:40:46] [main/INFO]: Loading Minecraft 1.20.1 with Fabric Loader 0.14.23
[23:40:46] [main/INFO]: Fabric is preparing JARs on first launch, this may take a few seconds...
[23:40:46] [main/INFO]: Loading 3 mods:
	- fabricloader 0.14.23
	- java 17
	- minecraft 1.20.1
[23:40:46] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=file:/data/libraries/net/fabricmc/sponge-mixin/0.12.5+mixin.0.8.5/sponge-mixin-0.12.5+mixin.0.8.5.jar Service=Knot/Fabric Env=SERVER
[23:40:52] [main/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[23:40:53] [main/INFO]: Loaded 7 recipes
[23:40:53] [main/INFO]: Loaded 1271 advancements
[23:40:54] [Server thread/INFO]: Starting minecraft server version 1.20.1```
@itzg
Copy link
Owner

itzg commented Dec 6, 2023

I need to disable that behavior, but in the meantime please don't combine those options. Modrinth platform support already takes care of cleaning up mods it manages.

@itzg
Copy link
Owner

itzg commented Dec 6, 2023

Unrelated, I noticed that your WHITELIST_FILE needs to be a container visible path, such as /data. The path you're providing, /home/hades/minecraft/cb/whitelist.json, is a host path. So it looks like it needs to be /data/whitelist.json...which is actually extraneous to declare because that's where the Minecraft server will locate the file in the first place.

Copy link

github-actions bot commented Jan 6, 2024

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.

@github-actions github-actions bot added the status/stale No recently activity has been seen and will be closed soon. label Jan 6, 2024
@itzg itzg removed the status/stale No recently activity has been seen and will be closed soon. label Jan 6, 2024
@itzg
Copy link
Owner

itzg commented Jan 8, 2024

This needs to be addressed for AUTO_CURSEFORGE also.

Copy link

github-actions bot commented Feb 8, 2024

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.

@github-actions github-actions bot added the status/stale No recently activity has been seen and will be closed soon. label Feb 8, 2024
@itzg itzg removed the status/stale No recently activity has been seen and will be closed soon. label Feb 8, 2024
@itzg itzg closed this as completed in #2648 Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
2 participants