Open repomanz opened 1 year ago
What I did was grabbing the command from the generated run.sh
and putting the arguments into the java arguments field.
Example for 1.19.2: @user_jvm_args.txt @libraries/net/minecraftforge/forge/1.19.2-43.2.4/unix_args.txt "$@"
But mineos seems to recognise that it is still set to the installer jar file and adds a --installServer
argument, so I used the vanilla 1.19.2 profile and set it to the minecraft_server.1.19.2.jar
file.
But in my eyes this is a workaround. Would be great if there comes a update that also let's you choose .sh
files to run and then the Java and Jar arguments fields get hidden.
@TECH7Fox thanks for the tip. Ended up using your work around and it worked. Would really enjoy seeing mineos-node updated as it's a great management system.
Another workaround that is a shell shim in java:
Main.java
class Main {
public static void main(String[] args) throws Exception {
Process p = new ProcessBuilder()
.command("sh", "-c", args[1]) // run program arg 1 in a shell
.inheritIO() // subprocess io is redirected to this process and ensures io doesn't block
.start(); // build and start process
System.exit(p.waitFor()); // wait and return subprocess exit code
}
}
Build:
javac Main.java
jar cvfe shim.jar Main Main.class
Test:
java -jar shim.jar -- 'echo hello from shim'
Adding to mineos:
shim.jar
-- ./run.sh
or whatever startup script is needed by your modpack. ensure to prefix with --
What I did was grabbing the command from the generated
run.sh
and putting the arguments into the java arguments field. Example for 1.19.2:@user_jvm_args.txt @libraries/net/minecraftforge/forge/1.19.2-43.2.4/unix_args.txt "$@"
But mineos seems to recognise that it is still set to the installer jar file and adds a--installServer
argument, so I used the vanilla 1.19.2 profile and set it to theminecraft_server.1.19.2.jar
file.But in my eyes this is a workaround. Would be great if there comes a update that also let's you choose
.sh
files to run and then the Java and Jar arguments fields get hidden.
Thanks for the hint. I've tried adding these in and seem to be getting somewhere, however, the server will still stop a few seconds after trying to start. I've tried a number of different things and nothing seems to be working. I'm wondering if it's related to the ATM8 modpack, but running run.sh
directly from within MineOS works.
Some
server.config
[minecraft]
profile=1.19.2
broadcast=true
unconventional=false
[java]
jarfile=minecraft_server.1.19.2.jar
java_xmx=6144
java_xms=4096
jar_args=
java_tweaks=@user_jvm_args.txt @libraries/net/minecraftforge/forge/1.19.2-43.2.14/unix_args.txt
java_binary=/usr/lib/jvm/java-17-openjdk-amd64/bin/java
[onreboot]
start=true
(I have tried using the universal .jar
file and the regular minecraft server .jar
, doesn't seem to make a difference)
latest.log
[19Jul2023 22:41:13.177] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--launchTarget, forgeserver, --fml.forgeVersion, 43.2.14, --fml.mcVersion, 1.19.2, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20220805.130853, -jar, minecraft_server.1.19.2.jar, nogui]
[19Jul2023 22:41:13.180] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 10.0.8+10.0.8+main.0ef7e830 starting: java version 17.0.2 by Private Build; OS Linux arch amd64 version 5.15.107+truenas
[19Jul2023 22:41:15.046] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=union:/var/games/minecraft/servers/all_the_mods_8/libraries/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar%2363!/ Service=ModLauncher Env=SERVER
debug.log
[19Jul2023 22:41:13.177] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--launchTarget, forgeserver, --fml.forgeVersion, 43.2.14, --fml.mcVersion, 1.19.2, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20220805.130853, -jar, minecraft_server.1.19.2.jar, nogui]
[19Jul2023 22:41:13.180] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 10.0.8+10.0.8+main.0ef7e830 starting: java version 17.0.2 by Private Build; OS Linux arch amd64 version 5.15.107+truenas
[19Jul2023 22:41:13.197] [main/DEBUG] [cpw.mods.modlauncher.LaunchServiceHandler/MODLAUNCHER]: Found launch services [fmlclientdev,forgeclient,minecraft,forgegametestserverdev,fmlserveruserdev,fmlclient,fmldatauserdev,forgeserverdev,forgeserveruserdev,forgeclientdev,forgeclientuserdev,forgeserver,forgedatadev,fmlserver,fmlclientuserdev,fmlserverdev,forgedatauserdev,testharness,forgegametestserveruserdev]
[19Jul2023 22:41:13.208] [main/DEBUG] [cpw.mods.modlauncher.NameMappingServiceHandler/MODLAUNCHER]: Found naming services : [srgtomcp]
[19Jul2023 22:41:13.219] [main/DEBUG] [cpw.mods.modlauncher.LaunchPluginHandler/MODLAUNCHER]: Found launch plugins: [mixin,eventbus,slf4jfixer,object_holder_definalize,runtime_enum_extender,capability_token_subclass,accesstransformer,runtimedistcleaner]
[19Jul2023 22:41:13.227] [main/DEBUG] [cpw.mods.modlauncher.TransformationServicesHandler/MODLAUNCHER]: Discovering transformation services
[19Jul2023 22:41:15.008] [main/DEBUG] [cpw.mods.modlauncher.TransformationServicesHandler/MODLAUNCHER]: Found additional transformation services from discovery services: [/var/games/minecraft/servers/all_the_mods_8/mods/JCPlugin-1.17.x-1.20.x-4.0.4-Forge.jar]
[19Jul2023 22:41:15.018] [main/DEBUG] [cpw.mods.modlauncher.TransformationServicesHandler/MODLAUNCHER]: Found transformer services : [jcplugin,mixin,fml]
[19Jul2023 22:41:15.018] [main/DEBUG] [cpw.mods.modlauncher.TransformationServicesHandler/MODLAUNCHER]: Transformation services loading
[19Jul2023 22:41:15.018] [main/DEBUG] [cpw.mods.modlauncher.TransformationServiceDecorator/MODLAUNCHER]: Loading service jcplugin
[19Jul2023 22:41:15.019] [main/DEBUG] [cpw.mods.modlauncher.TransformationServiceDecorator/MODLAUNCHER]: Loaded service jcplugin
[19Jul2023 22:41:15.019] [main/DEBUG] [cpw.mods.modlauncher.TransformationServiceDecorator/MODLAUNCHER]: Loading service mixin
[19Jul2023 22:41:15.019] [main/DEBUG] [cpw.mods.modlauncher.TransformationServiceDecorator/MODLAUNCHER]: Loaded service mixin
[19Jul2023 22:41:15.019] [main/DEBUG] [cpw.mods.modlauncher.TransformationServiceDecorator/MODLAUNCHER]: Loading service fml
[19Jul2023 22:41:15.020] [main/DEBUG] [net.minecraftforge.fml.loading.LauncherVersion/CORE]: Found FMLLauncher version 1.0
[19Jul2023 22:41:15.020] [main/DEBUG] [net.minecraftforge.fml.loading.FMLLoader/CORE]: FML 1.0 loading
[19Jul2023 22:41:15.021] [main/DEBUG] [net.minecraftforge.fml.loading.FMLLoader/CORE]: FML found ModLauncher version : 10.0.8+10.0.8+main.0ef7e830
[19Jul2023 22:41:15.021] [main/DEBUG] [net.minecraftforge.fml.loading.FMLLoader/CORE]: FML found AccessTransformer version : 8.0.4+66+master.c09db6d7
[19Jul2023 22:41:15.021] [main/DEBUG] [net.minecraftforge.fml.loading.FMLLoader/CORE]: FML found EventBus version : 6.0.3+6.0.3+master.039e4ea9
[19Jul2023 22:41:15.021] [main/DEBUG] [net.minecraftforge.fml.loading.FMLLoader/CORE]: Found Runtime Dist Cleaner
[19Jul2023 22:41:15.022] [main/DEBUG] [net.minecraftforge.fml.loading.FMLLoader/CORE]: FML found CoreMod version : 5.0.1+15+master.dc5a2922
[19Jul2023 22:41:15.023] [main/DEBUG] [net.minecraftforge.fml.loading.FMLLoader/CORE]: Found ForgeSPI package implementation version 6.0.0+6.0.0+master.42474703
[19Jul2023 22:41:15.023] [main/DEBUG] [net.minecraftforge.fml.loading.FMLLoader/CORE]: Found ForgeSPI package specification 5
[19Jul2023 22:41:15.024] [main/DEBUG] [cpw.mods.modlauncher.TransformationServiceDecorator/MODLAUNCHER]: Loaded service fml
[19Jul2023 22:41:15.024] [main/DEBUG] [cpw.mods.modlauncher.TransformationServicesHandler/MODLAUNCHER]: Configuring option handling for services
[19Jul2023 22:41:15.028] [main/DEBUG] [cpw.mods.modlauncher.TransformationServicesHandler/MODLAUNCHER]: Transformation services initializing
[19Jul2023 22:41:15.029] [main/DEBUG] [cpw.mods.modlauncher.TransformationServiceDecorator/MODLAUNCHER]: Initializing transformation service jcplugin
[19Jul2023 22:41:15.029] [main/DEBUG] [cpw.mods.modlauncher.TransformationServiceDecorator/MODLAUNCHER]: Initialized transformation service jcplugin
[19Jul2023 22:41:15.029] [main/DEBUG] [cpw.mods.modlauncher.TransformationServiceDecorator/MODLAUNCHER]: Initializing transformation service mixin
[19Jul2023 22:41:15.037] [main/DEBUG] [mixin/]: MixinService [ModLauncher] was successfully booted in cpw.mods.cl.ModuleClassLoader@6ee52dcd
[19Jul2023 22:41:15.046] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=union:/var/games/minecraft/servers/all_the_mods_8/libraries/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar%2363!/ Service=ModLauncher Env=SERVER
[19Jul2023 22:41:15.049] [main/DEBUG] [mixin/]: Initialising Mixin Platform Manager
[19Jul2023 22:41:15.049] [main/DEBUG] [mixin/]: Adding mixin platform agents for container ModLauncher Root Container(ModLauncher:4f56a0a2)
[19Jul2023 22:41:15.049] [main/DEBUG] [mixin/]: Instancing new MixinPlatformAgentMinecraftForge for ModLauncher Root Container(ModLauncher:4f56a0a2)
[19Jul2023 22:41:15.050] [main/DEBUG] [mixin/]: MixinPlatformAgentMinecraftForge rejected container ModLauncher Root Container(ModLauncher:4f56a0a2)
[19Jul2023 22:41:15.050] [main/DEBUG] [mixin/]: Instancing new MixinPlatformAgentDefault for ModLauncher Root Container(ModLauncher:4f56a0a2)
[19Jul2023 22:41:15.050] [main/DEBUG] [mixin/]: MixinPlatformAgentDefault accepted container ModLauncher Root Container(ModLauncher:4f56a0a2)
[19Jul2023 22:41:15.051] [main/DEBUG] [cpw.mods.modlauncher.TransformationServiceDecorator/MODLAUNCHER]: Initialized transformation service mixin
[19Jul2023 22:41:15.052] [main/DEBUG] [cpw.mods.modlauncher.TransformationServiceDecorator/MODLAUNCHER]: Initializing transformation service fml
[19Jul2023 22:41:15.052] [main/DEBUG] [net.minecraftforge.fml.loading.FMLServiceProvider/CORE]: Setting up basic FML game directories
[19Jul2023 22:41:15.052] [main/DEBUG] [net.minecraftforge.fml.loading.FileUtils/CORE]: Found existing GAMEDIR directory : /var/games/minecraft/servers/all_the_mods_8
[19Jul2023 22:41:15.053] [main/DEBUG] [net.minecraftforge.fml.loading.FMLPaths/CORE]: Path GAMEDIR is /var/games/minecraft/servers/all_the_mods_8
[19Jul2023 22:41:15.053] [main/DEBUG] [net.minecraftforge.fml.loading.FileUtils/CORE]: Found existing MODSDIR directory : /var/games/minecraft/servers/all_the_mods_8/mods
[19Jul2023 22:41:15.053] [main/DEBUG] [net.minecraftforge.fml.loading.FMLPaths/CORE]: Path MODSDIR is /var/games/minecraft/servers/all_the_mods_8/mods
[19Jul2023 22:41:15.053] [main/DEBUG] [net.minecraftforge.fml.loading.FileUtils/CORE]: Found existing CONFIGDIR directory : /var/games/minecraft/servers/all_the_mods_8/config
[19Jul2023 22:41:15.053] [main/DEBUG] [net.minecraftforge.fml.loading.FMLPaths/CORE]: Path CONFIGDIR is /var/games/minecraft/servers/all_the_mods_8/config
[19Jul2023 22:41:15.053] [main/DEBUG] [net.minecraftforge.fml.loading.FMLPaths/CORE]: Path FMLCONFIG is /var/games/minecraft/servers/all_the_mods_8/config/fml.toml
[19Jul2023 22:41:15.053] [main/DEBUG] [net.minecraftforge.fml.loading.FMLServiceProvider/CORE]: Loading configuration
Running directly gives this kind of output (only the first few lines, the rest is just regular loading)
[22:47:16] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher running: args [--launchTarget, forgeserver, --fml.forgeVersion, 43.2.14, --fml.mcVersion, 1.19.2, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20220805.130853]
[22:47:16] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher 10.0.8+10.0.8+main.0ef7e830 starting: java version 17.0.2 by Private Build; OS Linux arch amd64 version 5.15.107+truenas
[22:47:18] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=union:/var/games/minecraft/servers/all_the_mods_8/libraries/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar%2363!/ Service=ModLauncher Env=SERVER
[22:47:18] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file /var/games/minecraft/servers/all_the_mods_8/libraries/net/minecraftforge/fmlcore/1.19.2-43.2.14/fmlcore-1.19.2-43.2.14.jar is missing mods.toml file
[22:47:18] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file /var/games/minecraft/servers/all_the_mods_8/libraries/net/minecraftforge/javafmllanguage/1.19.2-43.2.14/javafmllanguage-1.19.2-43.2.14.jar is missing mods.toml file
[22:47:18] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file /var/games/minecraft/servers/all_the_mods_8/libraries/net/minecraftforge/lowcodelanguage/1.19.2-43.2.14/lowcodelanguage-1.19.2-43.2.14.jar is missing mods.toml file
[22:47:18] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file /var/games/minecraft/servers/all_the_mods_8/libraries/net/minecraftforge/mclanguage/1.19.2-43.2.14/mclanguage-1.19.2-43.2.14.jar is missing mods.toml file
[22:47:19] [main/WARN] [ne.mi.ja.se.JarSelector/]: Attempted to select a dependency jar for JarJar which was passed in as source: resourcefullib. Using Mod File: /var/games/minecraft/servers/all_the_mods_8/mods/resourcefullib-forge-1.19.2-1.1.24.jar
[22:47:19] [main/WARN] [ne.mi.ja.se.JarSelector/]: Attempted to select a dependency jar for JarJar which was passed in as source: botarium. Using Mod File: /var/games/minecraft/servers/all_the_mods_8/mods/botarium-forge-1.19.2-1.8.2.jar
[22:47:19] [main/INFO] [ne.mi.fm.lo.mo.JarInJarDependencyLocator/]: Found 20 dependencies adding them to mods collection
The first few lines match what MineOS produces, MineOS just seems to stop.
Thanks for any help or pointers :bow:
Hello hexparrot -
I was wondering if you could guide me or give me pointers on how to setup a forge 1.19+ minecraft sever. I noticed in newer versions the forge developers created a run.sh but this isn't picked up by mineos-node. My older forge versions work but not the newer ones.
I've tried a few things to trick mineos-node to see the jar. For example creating a symlink in the root mineos-node server directory to the new location of the jar file/libraries/net/... for example.
MineOS-Node sees this symlink but fails to start. Would love to get this working within mineos-node.
Any pointers?