MinecraftServerControl / mscs

Powerful command-line control for UNIX and Linux powered Minecraft servers
https://minecraftservercontrol.github.io
BSD 2-Clause "Simplified" License
485 stars 62 forks source link

Trouble upgrading Paper server to 1.16.5 #275

Closed glasserd17 closed 3 years ago

glasserd17 commented 3 years ago

I'm trying to update the PaperMC server to 1.16.5.

My understanding of the update directions is that I should follow the PaperMC instructions.

I updated mscs.properties for the world as follows change 1.16.4 to 1.16.5:

mscs-enabled=true
mscs-server-url=https://papermc.io/api/v1/paper/$SERVER_VERSION/latest/download
mscs-server-jar=paperclip.jar
mscs-client-version=1.16.5
mscs-server-version=1.16.5

From there I restarted the server expecting that the new server jar would download. Running mscs status indicates the server is still at version 1.16.4.

It appears that the PaperMC server 1.16.5 is available on their download site as build 418.

I reviewed #273, but frankly I don't know enough about mscs or PaperMC to know if this is the same issue. Any guidance would be appreciated.

sandain commented 3 years ago

I don't have time to work on a more robust update function for MSCS. However, the following should get you a working server:

mscs-enabled=true
mscs-server-url=https://papermc.io/api/v2/projects/paper/versions/1.16.5/builds/438/downloads/paper-1.16.5-438.jar
mscs-server-jar=paper-1.16.5-438.jar
mscs-client-version=1.16.5
mscs-server-version=1.16.5

You will have to manually change the URL to get updates.

sandain commented 3 years ago

I tested this out and it works fine. Automatic updates will not work with this method, but the PaperMC folks made this difficult by not providing a stable link to the latest version. I updated the docs to note the correct method to get a working install.

If anyone finds a stable link to the latest version, that would be more ideal...

sandain commented 3 years ago

I just want to note that the PaperMC folks refuse to provide a link to download the latest version.

Issue #261 tracks the need for a more robust update method. I'll leave this issue open for the time being, but feel free to close it @glasserd17 if my workaround is good enough for you.

Xarius86 commented 3 years ago

I've just been updating it manually as well, as I haven't had the time to help rewrite anything either. I thought it would be a quick, easy fix to code, but it's more involved than I've had time for lately.

sandain commented 3 years ago

I'm in the same boat time wise. It is going to require a fairly major rework of the update code, with each server provider giving a different API.

For PaperMC, we first have to send an https request to https://papermc.io/api/v2/projects/paper/versions/$SERVER_VERSION/ to get a json file containing build numbers for the requested server version, then a second https request to https://papermc.io/api/v2/projects/paper/versions/$SERVER_VERSION/builds/$BUILD_NUMBER/downloads/paper-$SERVER_VERSION-$BUILD_NUMBER.jar to get the server jar.

glasserd17 commented 3 years ago

Interestingly, if I just delete paperclip.jar it downloads the new version when I start. This is with the default dynamic URL:

mscs-server-url=https://papermc.io/api/v1/paper/$SERVER_VERSION/latest/download
Xarius86 commented 3 years ago

Interestingly, if I just delete paperclip.jar it downloads the new version when I start. This is with the default dynamic URL:

mscs-server-url=https://papermc.io/api/v1/paper/$SERVER_VERSION/latest/download

Yeah, this was not functional at all recently. Not sure when it was resurrected. I wouldn't count on it sticking around.

sandain commented 3 years ago

I'm going to close this issue as #261 covers the need for a better update function.