Closed roderick-zambrano closed 1 year ago
I'm sorry, that indeed sounds like an unfortunate situation but I am seeing nothing that indicates this is an issue specific to this container or more importantly what I could possibly change during preparation of the server to resolve this. It is failing after the process has been handed off to the Minecraft server software.
The build-from-source mechanism is even further from the control of this image than pretty much every other supported server type. Have you contacted Spigot for help? It is their build tool and their server software that is failing.
I am going to convert this to a discussion unless you can provide specific advice about something I can change in the startup to resolve this.
I haven't contacted Spigot yet, the previous half of this issue was definitely something from somewhere else given the 522 CloudFlare error during the attempt to download a compiled 1.19.4.jar, but the fact that something changed virtually overnight from one container spin to the next has left me a bit in the air about this. I'm also not sure if it's a Spigot issue or if it's a Bukkit issue because the download.getbukkit.org is the one that responds with 522, even from https://download.getbukkit.org/spigot/spigot-1.19.4.jar (although I don't know what I would do with that .jar on the container since I usually let the container startup download it). I'll see if I can get a hold of someone on the bukkit downloads since I changed nothing else, I just restarted the container, and I assume then the only moving part would have to be the jar. I'll try contacting them about it, then see if Spigot has anything to say, and then if anything comes up that might help I'll bring it back here
Found their Discord, one other person mentioned the 522 error, was directed to BuildTools. I tried changing the compose to point to the linked BuildTools.jar, but when executed by the container it simply compiles the now default 1.20.1 jar unfortunately... Removed the download link override from my compose file. Looking at the BUILD_FROM_SOURCE process, downloading and invoking BuildTools already happens, but when trying to run a new fresh container with only BUILD_FROM_SOURCE=true and VERSION=1.19.4 returns an error, as seen at the end of the following block. Not sure if there is a variable or argument I can pass to fulfill the "rev" argument in the process and try again to see if a working 1.19.4 jar can be generated.
+ log 'Resolving type given SPIGOT'
+ local oldState
++ shopt -po xtrace
+ oldState='set -o xtrace'
+ shopt -u -o xtrace
[init] 2023-08-15 23:47:30-05:00 Resolving type given SPIGOT
+ case "${TYPE^^}" in
+ exec /start-deployBukkitSpigot
+ set -e
+ isTrue ''
+ case "${1,,}" in
+ return 1
+ isTrue true
+ case "${1,,}" in
+ return 0
+ resolveVersion
+ givenVersion=1.19.4
++ mc-image-helper resolve-minecraft-version 1.19.4
[mc-image-helper] 23:47:31.735 DEBUG : JSON FETCH: uri=https://launchermeta.mojang.com/mc/game/version_manifest_v2.json headers=[user-agent: itzg/mc-image-helper/1.33.5 (cmd=resolve-minecraft-version), x-fetch-session: 09d743fb-08e0-421f-b1a9-174bdd59dd16, accept: application/json, host: launchermeta.mojang.com]
[mc-image-helper] 23:47:32.059 DEBUG : Resolved given Minecraft version 1.19.4 to 1.19.4
+ VERSION=1.19.4
+ log 'Resolved version given 1.19.4 into 1.19.4'
+ local oldState
++ shopt -po xtrace
+ oldState='set -o xtrace'
+ shopt -u -o xtrace
[init] 2023-08-15 23:47:32-05:00 Resolved version given 1.19.4 into 1.19.4
+ setServerVar
+ case "$TYPE" in
+ export SERVER=spigot_server-1.19.4.jar
+ SERVER=spigot_server-1.19.4.jar
+ '[' '!' -f spigot_server-1.19.4.jar ']'
+ buildSpigotFromSource
+ [[ SPIGOT = *BUKKIT ]]
+ log 'Building Spigot from source, might take a while, get some coffee'
+ local oldState
++ shopt -po xtrace
+ oldState='set -o xtrace'
+ shopt -u -o xtrace
[init] 2023-08-15 23:47:32-05:00 Building Spigot from source, might take a while, get some coffee
+ rm -rf /data/temp
+ mkdir /data/temp
+ cd /data/temp
+ jvmOpts='-Xms6G -Xmx6G'
'
+ echo -n '[init] '
+ curl -sSL -o /data/temp/BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
+ java -Xms6G -Xmx6G -jar /data/temp/BuildTools.jar --rev
+ read l
+ tee /data/spigot_build.log
+ echo -n .
+ read l
+ echo -n .
+ read l
+ echo -n .
+ read l
+ echo -n .
+ read l
+ echo -n .
+ read l
+ echo -n .
+ read l
+ echo -n .
+ read l
+ echo -n .
+ read l
+ echo -n .
+ read l
+ echo -n .
+ read l
+ echo -n .
+ read l
+ log done
+ local oldState
++ shopt -po xtrace
+ oldState='set -o xtrace'
+ shopt -u -o xtrace
[init] ...........[init] 2023-08-15 23:47:33-05:00 done
+ case ${TYPE^^} in
+ mv 'spigot-*.jar' /data/spigot_server-1.19.4.jar
mv: cannot stat 'spigot-*.jar': No such file or directory
+ log 'ERR failed to build Spigot'
+ local oldState
++ shopt -po xtrace
+ oldState='set -o xtrace'
+ shopt -u -o xtrace
[init] 2023-08-15 23:47:33-05:00 ERR failed to build Spigot
+ cat /data/spigot_build.log
Loading BuildTools version: git-BuildTools-2836244-160 (#160)
Java Version: Java 17
Current Path: /data/temp/.
Exception in thread "main" joptsimple.OptionMissingRequiredArgumentException: Option rev requires an argument
at joptsimple.RequiredArgumentOptionSpec.detectOptionArgument(RequiredArgumentOptionSpec.java:48)
at joptsimple.ArgumentAcceptingOptionSpec.handleOption(ArgumentAcceptingOptionSpec.java:257)
at joptsimple.OptionParser.handleLongOptionToken(OptionParser.java:513)
at joptsimple.OptionParserState$2.handleArgument(OptionParserState.java:56)
at joptsimple.OptionParser.parse(OptionParser.java:396)
at org.spigotmc.builder.Builder.main(Builder.java:175)
at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:27)
+ exit 1
Thanks for the follow up investigation. Yes, I do need to fix this line since VANILLA_VERSION is no longer setup
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.
Describe the problem
Initially, I had an instance running without any problems at all, for quite a long time, I regularly updated the container, one day I need to restart my physical machine, so the containers go down as well. I notice then upon spinning all containers back up that the Minecraft server isn't responding, getting a 522 error which while investigating I found out to be a CloudFlare error. I waited a couple of days assuming it was some CDN issue, but the issue persists and the jar download fails. Eventually I try using the BUILD_FROM_SOURCE=true variable as a scrambling attempt to get the spigot 1.19.4 jar, and it manages to avoid the 522 error for the Spigot version I use. The problem now is that there is some Java exception that seems to be happening upon world loading, I tried using an earlier backup before the physical server restart but the problem persists. I don't know if it's something to do with the version, if there's something to do with attempting to troubleshoot, I disabled all plugins, it seems to start the server alright to my understanding, but then it stops the server due to the exception. I'm at the limit of my knowledge at the moment, and I didn't see recent discussions/issues in respect to the 522 error (I assumed this was external to the container anyway, but found no discussion of it anywhere else online which was very confusing to me), and this server crash issue is more critical to me since at least it reaches the startup process of the server before the exception, which upon closer inspection seems to occur specifically in the end, a place that neither me nor the players in my server have reached yet. Hopefully the logs of the crash can help shine a light on what might possibly be the cause.
Container definition
Container logs
Edit: Updated with correct log that shows no plugins enabled