docker-minecraft-server icon indicating copy to clipboard operation
docker-minecraft-server copied to clipboard

TrueNAS Scale Minecraft-java Forge Serveur installation

Open BaptisteP06 opened this issue 1 year ago • 13 comments

Enhancement Type

Improve an existing feature

Describe the enhancement

I'm using TrueNAS Scale and I'm trying to install a Minecraft server with forge, but it persists with errors, I succeeded with the "Vanilla" and "Papers" versions but I'm stuck on the Forge version. I've tried with MC 1.20.4, which creates an error, and now I'm trying with 1.12.2 and I'm getting the following logs.

Container definition

`Image: itzg/minecraft-server:java8-multiarch

environment:
  TYPE: "FORGE"
  OVERRIDE_SERVER_PROPERTIES: "false"
  EULA: "TRUE"
  VERSION: "1.12.2"
  FORGE_VERSION: 14.23.5.2859
  GUI: "FALSE"
  INIT_MEMORY: "1G"
  MAX_MEMORY: "12G"
  USE_AIKAR_FLAGS: "true"
  JVM_XX_OPTS: "-XX:+UseG1GC"`

Container logs

2024-01-19 00:53:20.604355+01:00[init] Running as uid=568 gid=568 with /data as 'drwxrwxrwx+ 3 3000 3000 12 Jan 19 00:29 /data'
2024-01-19 00:53:20.607072+01:00[init] Resolving type given FORGE
2024-01-19 00:53:22.523894+01:00[mc-image-helper] 00:53:22.521 INFO  : Forge version 14.23.5.2859 for minecraft version 1.12.2 is already installed
2024-01-19 00:53:23.390544+01:00[init] server.properties already created and managed manually
2024-01-19 00:53:24.076346+01:00[mc-image-helper] 00:53:24.074 INFO  : The file ./ops.json already exists, so no changes will be made
2024-01-19 00:53:24.811734+01:00[mc-image-helper] 00:53:24.809 INFO  : The file ./whitelist.json already exists, so no changes will be made
2024-01-19 00:53:27.357883+01:00[init] Using Aikar's flags
2024-01-19 00:53:27.358449+01:00[init] Setting initial memory to 2048M and max to 2048M
2024-01-19 00:53:28.354272+01:00[init] Starting the Minecraft server...
2024-01-19 00:53:28.676214+01:00A problem occurred running the Server launcher.java.lang.reflect.InvocationTargetException
2024-01-19 00:53:28.676409+01:00at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2024-01-19 00:53:28.676425+01:00at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2024-01-19 00:53:28.676439+01:00at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2024-01-19 00:53:28.676458+01:00at java.base/java.lang.reflect.Method.invoke(Unknown Source)
2024-01-19 00:53:28.676475+01:00at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.run(ServerLaunchWrapper.java:70)
2024-01-19 00:53:28.676512+01:00at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.main(ServerLaunchWrapper.java:34)
2024-01-19 00:53:28.676655+01:00Caused by: java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.base of loader 'bootstrap')
2024-01-19 00:53:28.676681+01:00at net.minecraft.launchwrapper.Launch.<init>(Launch.java:34)
2024-01-19 00:53:28.676726+01:00at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
2024-01-19 00:53:28.676757+01:00... 6 more
2024-01-19 00:53:28.823920+01:002024-01-19T00:53:28.822+0100	WARN	mc-server-runner	Minecraft server failed. Inspect logs above for errors that indicate cause. DO NOT report this line as an error.	{"exitCode": 1}
2024-01-19 00:53:28.823969+01:002024-01-19T00:53:28.823+0100	INFO	mc-server-runner	Done

BaptisteP06 avatar Jan 19 '24 00:01 BaptisteP06

You'll need to use an image tagged for Java 8 rather than the default of Java 17 for Forge less than 1.18:

https://docker-minecraft-server.readthedocs.io/en/latest/versions/java/

itzg avatar Jan 19 '24 00:01 itzg

oh great thanks my problem, come from there

BaptisteP06 avatar Jan 19 '24 00:01 BaptisteP06

@itzg I've managed to install the forge server up to 1.19.2 with Java17 JDK but for 1.20.4 I can't do it. Which version should I use?

BaptisteP06 avatar Jan 19 '24 00:01 BaptisteP06

Please provide the new logs for Forge 1.20.4. You will need to use Java 17 for that.

itzg avatar Jan 19 '24 01:01 itzg

Here are the new logs for MC 1.20.4 with Java 17JDK

2024-01-19 13:15:56.191813+01:00[init] Running as uid=568 gid=568 with /data as 'drwxrwxrwx+ 3 3000 3000 6 Jan 19 13:15 /data'
2024-01-19 13:15:56.193542+01:00[init] Resolving type given FORGE
2024-01-19 13:15:58.034778+01:00[mc-image-helper] 13:15:58.032 INFO  : Downloading Forge installer 49.0.19 for Minecraft 1.20.4
2024-01-19 13:15:59.496692+01:00[mc-image-helper] 13:15:59.496 INFO  : Running Forge installer. This might take a while...
2024-01-19 13:16:01.221118+01:00[mc-image-helper] 13:16:01.220 ERROR : 'install-forge' command failed. Version is 1.36.9
2024-01-19 13:16:01.221149+01:00me.itzg.helpers.errors.GenericException: Unable to locate forge server jar
2024-01-19 13:16:01.221156+01:00at me.itzg.helpers.forge.ForgeInstaller.install(ForgeInstaller.java:215)
2024-01-19 13:16:01.221161+01:00at me.itzg.helpers.forge.ForgeInstaller.install(ForgeInstaller.java:88)
2024-01-19 13:16:01.221167+01:00at me.itzg.helpers.forge.InstallForgeCommand.call(InstallForgeCommand.java:103)
2024-01-19 13:16:01.221180+01:00at me.itzg.helpers.forge.InstallForgeCommand.call(InstallForgeCommand.java:19)
2024-01-19 13:16:01.221189+01:00at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
2024-01-19 13:16:01.221196+01:00at picocli.CommandLine.access$1500(CommandLine.java:148)
2024-01-19 13:16:01.221202+01:00at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
2024-01-19 13:16:01.221211+01:00at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
2024-01-19 13:16:01.221216+01:00at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
2024-01-19 13:16:01.221221+01:00at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
2024-01-19 13:16:01.221226+01:00at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
2024-01-19 13:16:01.221232+01:00at picocli.CommandLine.execute(CommandLine.java:2170)
2024-01-19 13:16:01.221244+01:00at me.itzg.helpers.McImageHelper.main(McImageHelper.java:157)
2024-01-19 13:16:01.575822+01:00[init] ERROR failed to install Forge

BaptisteP06 avatar Jan 19 '24 12:01 BaptisteP06

Make sure you have the latest image by running

docker compose pull

That sounds like an issue with Forge 1.20.4 that was recently fixed in the image.

itzg avatar Jan 19 '24 12:01 itzg

I do have the latest version. (the one offered by TrueNAS Scale)

Name:
minecraft-forge-1-20-4
App Version:
2023.11.1
Chart Version:
7.1.7
Last Updated:
N/A
Source:
[github.com/truecharts/charts/tree/master/charts/stable/minecraft-java](https://github.com/truecharts/charts/tree/master/charts/stable/minecraft-java)[hub.docker.com/r/itzg/minecraft-server](https://hub.docker.com/r/itzg/minecraft-server)[github.com/itzg/docker-minecraft-server](https://github.com/itzg/docker-minecraft-server)
Developer:
N/A
Catalog:
Truecharts
Train:
stable

BaptisteP06 avatar Jan 19 '24 12:01 BaptisteP06

That'll be a TrueNAS problem or whoever maintains that chart. That version is quite old and missing 44 changes at this point

https://github.com/itzg/docker-minecraft-server/releases/tag/2023.11.1

Please contact the appropriate maintainer there.

itzg avatar Jan 19 '24 13:01 itzg

It's unlikely to work with 44 updates not posted on Truecharts.

BaptisteP06 avatar Jan 19 '24 15:01 BaptisteP06

I see they updated it last week, so they've got a lot of catching up to do.

Version: 2023.11.1
Source:
[github.com/truecharts/charts/tree/master/charts/stable/minecraft-java](https://github.com/truecharts/charts/tree/master/charts/stable/minecraft-java)[hub.docker.com/r/itzg/minecraft-server](https://hub.docker.com/r/itzg/minecraft-server)[github.com/itzg/docker-minecraft-server](https://github.com/itzg/docker-minecraft-server)
Last App Update: last Monday at 7:33 PM

BaptisteP06 avatar Jan 19 '24 15:01 BaptisteP06

It's unlikely to work with 44 updates not posted on Truecharts.

Agreed. Specifically, they need to pick up this change from image tag 2023.12.2 and newer

https://github.com/itzg/docker-minecraft-server/commit/6363949bda8b9cc1cfb35d93fc3dd61c0b089e43

itzg avatar Jan 19 '24 15:01 itzg

In the end, I switched to Crafty, which has a better interface and works in 1.20.4.

BaptisteP06 avatar Jan 19 '24 15:01 BaptisteP06

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[bot] avatar Feb 19 '24 02:02 github-actions[bot]