FTB-App icon indicating copy to clipboard operation
FTB-App copied to clipboard

[Bug]: Server installer installs OpenJDK17U-jre_x64_linux_hotspot_17.0.2_8, but fails install without an already installed Java

Open pjfranke opened this issue 3 years ago • 3 comments

What Operating System

Linux (Other)

App Version

N/A, server install

UI Version

N/A, server install

Log Files

https://pste.ch/olomulucas.sql

Debug Code

bash: ./ftb-debug-linux: No such file or directory

Describe the bug

Server install fails without a system Java. Installer extracts Java after running Forge installer.

Steps to reproduce

  1. apt update && apt install wget -y
  2. wget https://api.modpacks.ch/public/modpack/95/2127/server/linux -O serverinstall_95_2142 && chmod +x serverinstall_95_2142
  3. ./serverinstall_95_2127 --auto

This results in the above log tail, with a "failed Forge install" message, and start.sh isn't valid:

./jre/jdk-17.0.2+8-jre/bin/java -javaagent:log4jfix/Log4jPatcher-1.0.0.jar -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -Xmx6144M -Xms4096M -jar insert-jar-here.jar nogui

2022/06/20 20:56:06 [723/723] Downloaded jre/jre.tar.gz from https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.2%2B8/OpenJDK17U-jre_x64_linux_hotspot_17.0.2_8.tar.gz
2022/06/20 20:56:06 Downloaded 723 successful, 0 failed, 0 incomplete.
2022/06/20 20:56:06 Running Forge installer
2022/06/20 20:56:06 Running forge installer failed with exec: "java": executable file not found in $PATH. You may wish to install forge 40.1.47 for Minecraft 1.18.2 manually
2022/06/20 20:56:06 Extracting jdk-17.0.2+8-jre/conf/sdp/sdp.conf.template -> jre/jdk-17.0.2+8-jre/conf/sdp/sdp.conf.template
    [many lines of JDK extraction removed for brevity]
2022/06/20 20:56:07 Extracting jdk-17.0.2+8-jre/legal/java.xml/bcel.md -> jre/jdk-17.0.2+8-jre/legal/java.xml/bcel.md
2022/06/20 20:56:08 Installed!

In comparison, if you do install a valid Java first, the install succeeds, but then also downloads a particular Java (even if you have Java 17 already), then explicitly references it in the start.sh file.

  1. apt update && apt install openjdk-18-jre-headless wget -y
  2. wget https://api.modpacks.ch/public/modpack/95/2127/server/linux -O serverinstall_95_2142 && chmod +x serverinstall_95_2142
  3. ./serverinstall_95_2127 --auto

This results in a successful installation, and the start.sh has a valid JAR referenced from the unix_args.txt file:

./jre/jdk-17.0.2+8-jre/bin/java -javaagent:log4jfix/Log4jPatcher-1.0.0.jar -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -Xmx6144M -Xms4096M @user_jvm_args.txt @libraries/net/minecraftforge/forge/1.18.2-40.1.47/unix_args.txt nogui

You can delete this installer file now if you wish
2022/06/20 22:51:07 Extracting jdk-17.0.2+8-jre/conf/sdp/sdp.conf.template -> jre/jdk-17.0.2+8-jre/conf/sdp/sdp.conf.template
    [many lines of JDK extraction removed for brevity]
2022/06/20 22:51:08 Extracting jdk-17.0.2+8-jre/legal/java.xml/bcel.md -> jre/jdk-17.0.2+8-jre/legal/java.xml/bcel.md
2022/06/20 22:51:08 Installed!

Expected behaviour

Download the Java it will be using to run Minecraft, extract it first, then use that to run the Forge installer.

Screenshots

No response

Additional information

No response

Information

  • [X] I have provided as much information as possible

pjfranke avatar Jun 20 '22 23:06 pjfranke

Hay, thanks for the issue! Unfortunately it looks like you've not provided a Debug code... We require this as it helps us find your issue as quickly as possible.

Please do the following

Please use the link below to download and run the FTB Debug tool. This is a tool built by our App Developers and will provide you a code that you need to attach to this issue. Please either edit your original issue or add a comment with this code.

Windows // MacOS // Linux

ftb-helper[bot] avatar Jun 20 '22 23:06 ftb-helper[bot]

Unable to generate debug code:

root@db2347a0ab38:/app# wget https://dist.creeper.host/tools/ftb-debug/ftb-debug-linux
--2022-06-20 23:46:23--  https://dist.creeper.host/tools/ftb-debug/ftb-debug-linux
Resolving dist.creeper.host (dist.creeper.host)... 104.26.4.16, 104.26.5.16, 172.67.72.15, ...
Connecting to dist.creeper.host (dist.creeper.host)|104.26.4.16|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9053134 (8.6M) [application/octet-stream]
Saving to: 'ftb-debug-linux'

ftb-debug-linux                                                    100%[=============================================================================================================================================================>]   8.63M  5.49MB/s    in 1.6s

2022-06-20 23:46:24 (5.49 MB/s) - 'ftb-debug-linux' saved [9053134/9053134]

root@db2347a0ab38:/app# chmod +x ftb-debug-linux
root@db2347a0ab38:/app# ./ftb-debug-linux
bash: ./ftb-debug-linux: No such file or directory

pjfranke avatar Jun 20 '22 23:06 pjfranke

#648

MichaelHillcox avatar Jul 28 '22 21:07 MichaelHillcox

If this is still an issue, please report it to https://github.com/CreeperHost/modpacksch-serverdownloader/issues

MichaelHillcox avatar Jun 22 '23 21:06 MichaelHillcox