Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downloading latest not working ""(6) Could not resolve host: paperclip.jar" #27

Closed
davie2000 opened this issue Aug 1, 2021 · 7 comments
Assignees

Comments

@davie2000
Copy link

With the command from start.sh script
curl -H "Accept-Encoding: identity" -H "Accept-Language: en" -L -A -o paperclip.jar https://papermc.io/api/v1/paper/verselect/latest/download

we always receive error
"(6) Could not resolve host: paperclip.jar"

If we call the above URL directly the browser shows a "Whitelabel Error Page" telling that "There was an unexpected error (type=Not Found, status=404)."

So we will be nailed to the installed version (fix #143) although there should be an automatic daily update to newest version at 4 a.m. :-(
We are using Ubuntu 20 on a raspi4.

@TheRemote
Copy link
Owner

TheRemote commented Aug 1, 2021

Hmmm. It shouldn't literally have verselect in start.sh. That is replaced by SetupMinecraft.sh (unless you are reusing an old copy of SetupMinecraft.sh).

Have you been using the script for a while? It used to work by saving a standalone copy but these days it's just ran with:

curl https://raw.githubusercontent.com/TheRemote/RaspberryPiMinecraft/master/SetupMinecraft.sh | bash

I'd for sure try this first (when it asks for the installation path leave it the default of ~). I think you may be using a SetupMinecraft from back before verselect was replaced in SetupMinecraft.sh by this line (line 132): sed -i "s:verselect:$Version:g" start.sh

Thus your real line should look like:

curl -H "Accept-Encoding: identity" -H "Accept-Language: en" -L -A -o paperclip.jar https://papermc.io/api/v1/paper/1.17.1/latest/download

in your actual start.sh inside ~/minecraft/start.sh. Can you check/verify this? I just checked mine and it still looks happy here. That URL in the browser seems to yield me the current 143 version as intended here at https://papermc.io/api/v1/paper/1.17.1/latest/download and should update at 4am normally.

I'm also getting the "my build is old" warning in the server upon startup if that is what prompted this, but you get the exact same version in the browser with the non verselect URL so it definitely seems to be the latest build despite the warning.

@davie2000
Copy link
Author

Thanks for the fast reply!

I was using the script for the first time today; coming from papermc 1.16.5 and installing into the same directory (~/minecraft) overwriting the old content.
As I have tried a lot manually I can not proof having the wrong line after installation. But I am sure that the mentioned error occured on first start either.

If I read you correctly it will be enough, to replace my wrong line with your above line in ~/minecraft/start.sh to correct the script so it downloads the newest version automatically at 4am?

@davie2000
Copy link
Author

davie2000 commented Aug 1, 2021

I tried this out, but still getting the same error when running start.sh:

./world_the_end/level.dat_old
Updating to most recent paperclip version ...
curl: (6) Could not resolve host: paperclip.jar
Warning: Binary output can mess up your terminal. Use "--output -" to tell
Warning: curl to output it to your terminal anyway, or consider "--output
Warning: <FILE>" to save to a file.
Starting Minecraft server. To view window type screen -r minecraft.
To minimize the window and let the server run in the background, press Ctrl+A then Ctrl+D

Here is an extract of my start.sh script:
...
# Update paperclip.jar
echo "Updating to most recent paperclip version ..."

# Test internet connectivity first
curl -H "Accept-Encoding: identity" -H "Accept-Language: en" -L -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4.212 Safari/537.36" -s google.com -o /dev/null
if [ "$?" != 0 ]; then
echo "Unable to connect to update website (internet connection may be down). Skipping update ..."
else
curl -H "Accept-Encoding: identity" -H "Accept-Language: en" -L -A -o paperclip.jar https://papermc.io/api/v1/paper/1.17.1/latest/download
fi

echo "Starting Minecraft server. To view window type screen -r minecraft."
echo "To minimize the window and let the server run in the background, press Ctrl+A then Ctrl+D"
screen -dmS minecraft java -jar -Xms400M -Xmx3239M /home/ubuntu/minecraft/paperclip.jar

What is still wrong here?

PS: sorry for the bad formatting - I couldn't do better
PPS: is the user-agent-parameter "-A" allowed to be empty?

@TheRemote
Copy link
Owner

TheRemote commented Aug 2, 2021

No that should not be empty. Let's try if I put the user agent in there from the earlier lines. I just uploaded the fix to GitHub.

Definitely run SetupMinecraft.sh again with:

curl https://raw.githubusercontent.com/TheRemote/RaspberryPiMinecraft/master/SetupMinecraft.sh | bash

and it will build it with the updated templates I just uploaded for you. Ideally this time you should not need to make any changes at all after letting SetupMinecraft.sh update it.

It looks like it's not picking up the -o parameter to me possibly because the -A without the parameter is eating it. It says I'm running build 145 after the fix for what it's worth (and the warning is gone) so this may have got it unstuck here. Let's see if that gets it for you!

@TheRemote
Copy link
Owner

Should be fixed here, script and README updated

@davie2000
Copy link
Author

Thank you for the quick fix and your effort!

Unfortunately my kids wanted back to 1.16.5 because of 1.17.1 being too unstable for them.
So I restored a backup and therefore all 1.17 stuff got overwritten.

I think we will have another try on 1.17.1 in a few weeks and surely we will use your (updated) script again.

@TheRemote
Copy link
Owner

TheRemote commented Aug 3, 2021

Hey davie2000,

Thanks for confirming! If you're having any trouble with the older versions you can follow the instructions to do a manual version override install (you basically download the script and open it at nano and change the version at the top, as well as set AllowLocalCopy=1, full instructions in the GitHub documentation / this web page). That would let you install the newest versions on 1.16.5 if you wanted to stay on it. If everything is working fine though you can just leave it alone until things stabilize here.

This isn't the first time the newer versions have been super, super unstable and you can almost count on it so I completely understand. Either way you should be covered.

Thanks again for reporting this, I had just done the curl conversion 3 days prior to you opening this. I missed the parameter on that one command so my server wasn't updating either. It had only just been 3 days so I was just starting to get the warning but this would have happened for everyone that installed in those 3 days since that curl line was essentially broken. Take care!

@TheRemote TheRemote self-assigned this May 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants