Potential regression or bug since 1.17-188 related to exit codes?

Hi!

I maintain a docker image for papermc with a prebuild stage. I use this command to patch the vanilla jar. Since the eula is not accepted, the server exits with an error and I can proceed from there.

RUN /opt/openjdk-16/bin/java -jar /opt/minecraft/paperclip.jar; exit 0

This normally results in:

Step 7/26 : RUN /opt/openjdk-16/bin/java -jar /opt/minecraft/paperclip.jar; exit 0
 ---> Running in 2aecdf4fd848
Downloading vanilla jar...
Patching vanilla jar...
System Info: Java 16 (OpenJDK 64-Bit Server VM 16-ea+32) Host: Linux 4.4.180+ (amd64)
Loading libraries, please wait...
2021-08-17 18:08:48,780 main WARN Advanced terminal features are not available in this environment
[18:09:00 ERROR]: Failed to load properties from file: server.properties
[18:09:01 WARN]: Failed to load eula.txt
[18:09:01 INFO]: You need to agree to the EULA in order to run the server. Go to eula.txt for more info.
Removing intermediate container 2aecdf4fd848
 ---> f45d613ba4e7
Step 8/26 : RUN mv /opt/minecraft/cache/patched*.jar paperspigot.jar 

This works with 1.17.1-117.

But since 1.17.1-188 I get this:

Step 7/26 : RUN /opt/openjdk-16/bin/java -jar /opt/minecraft/paperclip.jar; exit 0
 ---> Running in 1f2314df2023
Downloading vanilla jar...
Patching vanilla jar...
System Info: Java 16 (OpenJDK 64-Bit Server VM 16-ea+32) Host: Linux 4.4.180+ (amd64)
Loading libraries, please wait...
2021-08-17 18:11:54,391 main WARN Advanced terminal features are not available in this environment
[18:12:06 ERROR]: Failed to load properties from file: server.properties
[18:12:06 WARN]: Failed to load eula.txt
[18:12:06 INFO]: You need to agree to the EULA in order to run the server. Go to eula.txt for more info.

And it just stops there like the exit code is not 0. Any idea what could have been changed? Is this a bug?

I can’t speak to what may/have may not changed there or can look at that now, but if you start the server with java -Dpaperclip.patchonly=true -jar etc. paperclip will exit after patching the jar.

1 Like

Changed the command to

RUN /opt/openjdk-16/bin/java -Dpaperclip.patchonly=true -jar /opt/minecraft/paperclip.jar; exit 0

and with 1.17.1-188 it works now. Thank you. May still be a bug though.

Sounds like https://github.com/PaperMC/Paper/issues/6422