Closed ineptcamel closed 3 years ago
I think I may have misdiagnosed this. The error prints before the new line:
# Start each world requested, if not already running.
printf "Starting Minecraft Server:"
for WORLD in $WORLDS; do
if ! serverRunning $WORLD; then
printf " $WORLD"
start $WORLD
fi
done
printf ".\n"
so that takes me to the start command. The failure to update server software is here:
if [ ! -s "$SERVER_LOCATION/$SERVER_JAR" ]; then
# Download the Minecraft server software.
$WGET -qO "$SERVER_LOCATION/$SERVER_JAR" "$SERVER_URL"
# Report any errors.
if [ $? -ne 0 ]; then
printf "Error updating the Minecraft server software.\n"
exit 1
fi
I think maybe one of the functions in there is failing? I'll keep investigating tomorrow.
I added print statements to the following section to see where the problem was:
updateServerSoftware() {
local SERVER_JAR SERVER_LOCATION SERVER_URL SERVER_VERSION SHA1 SHA1_FILE
SERVER_JAR=$(getServerJar "$1")
printf "$SERVER_JAR\n"
if [ $? -ne 0 ]; then
printf "$SERVER_JAR\n"
exit 1
fi
SERVER_LOCATION=$(getServerLocation "$1")
printf "$SERVER_LOCATION\n"
if [ $? -ne 0 ]; then
printf "$SERVER_LOCATION\n"
exit 1
fi
SERVER_URL=$(getServerURL "$1")
printf "$SERVER_URL\n"
if [ $? -ne 0 ]; then
printf "$SERVER_URL\n"
exit 1
fi
SERVER_VERSION=$(getServerVersion "$1")
printf "$SERVER_VERSION\n"
if [ $? -ne 0 ]; then
printf "$SERVER_VERSION\n"
exit 1
fi
and the output:
The cached copy of the version manifest is up to date.
Use the force-update option to ensure a new copy is downloaded.
Starting Minecraft Server: Dadland3
minecraft_server.1.16.3.jar
/opt/mscs/server
malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "(end of string)") at -e line 14, <> chunk 1.
1.16.3
.
So I've narrowed it down to getServerURL
sorry for extra comments, just tracking my t/s pattern here for future sake
$json = decode_json (get ($id->{url}));
from getMinecraftVersionDownloadURL
. Resulting URL is "" which then breaks the next wget function in line 1540.
I realize now that this only ran because the server jar was 0 bytes, triggering the if statement. I manually moved in a 1.16.3 jar and now the server starts.
I still want to leave this issue open though since there is some sort of json formatting error. I have no experience in Perl to contribute though.
Hi @ineptcamel. I'm not sure what is going on with your setup. I just checked, and I'm able to update just fine. Could you please post a copy of your mscs.properties
file for the world and your mscs.defaults
file if you have made modifications to it. It appears that you are requesting a version that does not exist in the version_manifest.json
or that the manifest file itself is corrupted.
Hey @sandain thanks for getting back. Worked on this over the weekend, and it's nothing with this software.
On a fresh install of Ubuntu 20.04, I set up pihole for ad-blocking on my home network. Once that was all squared away, I installed mscs and setup a server. It worked for a couple of days and then just broke for no discernible reason. You can see my logic here earlier, but my final troubleshooting trace was to the wget calls for downloading the various necessary files from mojang.
It turns out my server could not connect to the internet via IPv4. The issue is covered here, with the only solution a fresh install. The situation in that pihole forum post is identical to mine, even down to the router.
I'm going to close this issue for now.
I seem to be having some issue with the backup version manifest JSON.
Affects all worlds, even newly created ones. Force update output: