norimicry / stardew-multiplayer-docker

Run a Stardew Valley Multiplayer Server with docker-compose
81 stars 19 forks source link

[BUG]: Getting Error while Build in Step 6 #5

Closed flex420 closed 5 months ago

flex420 commented 5 months ago

Step 6/16 : RUN mkdir -p /data/Stardew && mkdir -p /data/nexus && wget https://mirror.cloudcraft.info/Stardew_Valley_latest.tar.gz -qO /data/latest.tar.gz && tar xf /data/latest.tar.gz -C /data/Stardew && rm /data/latest.tar.gz ---> Running in 7eabe12f5676 ERROR: Service 'valley' failed to build: The command '/bin/sh -c mkdir -p /data/Stardew && mkdir -p /data/nexus && wget https://mirror.cloudcraft.info/Stardew_Valley_latest.tar.gz -qO /data/latest.tar.gz && tar xf /data/latest.tar.gz -C /data/Stardew && rm /data/latest.tar.gz' returned a non-zero code: 8

Ubuntu - Dedicated Root Server

did try docker-compose build --no-cache (with and without sudo)

Docker compose up gives same error then

~/docker/stardew/stardew-multiplayer-docker # docker-compose up Building valley Step 1/16 : FROM jlesage/baseimage-gui:debian-10 ---> a4c5fcd40bdf Step 2/16 : ENV APP_NAME="StardewValley" ---> Using cache ---> c8dda3bf30fc Step 3/16 : RUN apt-get update ---> Using cache ---> 00166fc5d16d Step 4/16 : RUN apt-get install -y wget unzip tar strace mono-complete xterm gettext-base jq netcat procps ---> Using cache ---> 6ec47d96e759 Step 5/16 : RUN APP_ICON_URL=https://stardewcommunitywiki.com/mediawiki/images/4/48/Fiddlehead_Fern.png && install_app_icon.sh "$APP_ICON_URL" ---> Using cache ---> 28f08695cc17 Step 6/16 : RUN mkdir -p /data/Stardew && mkdir -p /data/nexus && wget https://mirror.cloudcraft.info/Stardew_Valley_latest.tar.gz -qO /data/latest.tar.gz && tar xf /data/latest.tar.gz -C /data/Stardew && rm /data/latest.tar.gz ---> Running in 0090c1be87a3 ERROR: Service 'valley' failed to build: The command '/bin/sh -c mkdir -p /data/Stardew && mkdir -p /data/nexus && wget https://mirror.cloudcraft.info/Stardew_Valley_latest.tar.gz -qO /data/latest.tar.gz && tar xf /data/latest.tar.gz -C /data/Stardew && rm /data/latest.tar.gz' returned a non-zero code: 8

Any ideas? Cheers and thanks for the effort!

norimicry commented 5 months ago

This is likely due to line endings. Could you check out the develop branch (git checkout develop), rebuild, and see if that works? I added a .gitattributes file that should attempt to handle these line endings accordingly. If that works I will merge it into master.

flex420 commented 5 months ago

Hey @norimicry - thx for the fast response - i did make delevop and rebuild - but in rebuild process same error now in step 4.

Use of uninitialized value $libs in concatenation (.) or string at /usr/sbin/mono-xsp4-update line 216. ---> Removed intermediate container 177766f21158 ---> 8012bfd13f7d Step 4/14 : RUN mkdir -p /data/Stardew && mkdir -p /data/nexus && wget https://mirror.cloudcraft.info/Stardew_Valley_latest.tar.gz -qO /data/latest.tar.gz && tar xf /data/latest.tar.gz -C /data/Stardew && rm /data/latest.tar.gz ---> Running in b86543d1e77c ERROR: Service 'valley' failed to build: The command '/bin/sh -c mkdir -p /data/Stardew && mkdir -p /data/nexus && wget https://mirror.cloudcraft.info/Stardew_Valley_latest.tar.gz -qO /data/latest.tar.gz && tar xf /data/latest.tar.gz -C /data/Stardew && rm /data/latest.tar.gz' returned a non-zero code: 8

I entered the error in chatGPT and it told me to look for a wget error -

And Indeed - i get a wget error when trying to to download the release.

/data/Stardew/stardew-multiplayer-docker # wget https://mirror.cloudcraft.info/Stardew_Valley_latest.tar.gz --2024-04-03 16:46:46-- https://mirror.cloudcraft.info/Stardew_Valley_latest.tar.gz Resolving mirror.cloudcraft.info (mirror.cloudcraft.info)... 2a06:98c1:3120::3, 2a06:98c1:3121::3, 188.114.96.3, ... Connecting to mirror.cloudcraft.info (mirror.cloudcraft.info)|2a06:98c1:3120::3|:443... connected. HTTP request sent, awaiting response... 403 Forbidden 2024-04-03 16:46:46 ERROR 403: Forbidden.

However the download works from my windows machine with no problems. Is the Downloadserver with the release.tar blocking some kind of useragent maybe? I can wget other stuff as usual without problems on my root-server :(

My Rootserver Running: Distributor ID: Ubuntu Description: Ubuntu 20.04.6 LTS Release: 20.04 Codename: focal

Hetzner hosting.

norimicry commented 5 months ago

It shouldn't be. I've tested on Windows, WSL, and Debian and have been able to WGET successfully. Let me contact my hosting partner and see if he is aware of anything that would be blocking.

flex420 commented 5 months ago

Thanks!

I looked into the docker sh and found 3 things it would Wget -

  1. wget https://mirror.cloudcraft.info/Stardew_Valley_latest.tar.gz
  2. wget -qO dotnet.tar.gz https://download.visualstudio.microsoft.com/download/pr/d4b71fac-a2fd-4516-ac58-100fb09d796a/e79d6c2a8040b59bf49c0d167ae70a7b/dotnet-sdk-5.0.408-linux-arm64.tar.gz
  3. wget https://mirror.cloudcraft.info/SMAPI_latest.zip

I tested all of them - only successfull was the one from MS. The two from Cloudcraft gave me 403 forbidden.

I will try to alter the script by changing the URL and see how it goes with one I can selfhost ;) . In theory it should resolve the issue- (still with develop branch)

norimicry commented 5 months ago

You are also the only one that has reported an issue with the WGET (thus far), do you happen to have any strict firewalls in place? I do know the files (aside from the MS) are hosted outside of the US.

flex420 commented 5 months ago

Nah - no strict firewall rules in place. wget works for every other source i tested beside your URL's. Really don't know why cloudcraft does not work. My Server is located in Germany - Hosted by one of the biggest root server Farm - Hetzner.

If i am the only one, i will figure it our somehow or fork and change the script to my needs.

norimicry commented 5 months ago

I wonder if hosting providers are blocking each other. Again, let me talk to my hosting partner and see if he can look into it.

flex420 commented 5 months ago

Just a quick Feedback: Changed the Wget URL's -> works ..... weird.

Container is up and running (not tested vnc yet..... but so far so good :)

norimicry commented 5 months ago

Checked with my partner and he assured me there's no safeguards in place that would block any specific regional IPs. His server is hosted in Vietnam and proxied through cloudflare. Unfortunately this may be out of the scope of what I can help with as this is a hosting provider issue and I've not been able to reproduce this. As a workaround feel free to host the files on whatever resources you see fit and change the urls.