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

Download failing for 1.21.31.04 #461

Closed
singleserveapps opened this issue Oct 2, 2024 · 7 comments
Closed

Download failing for 1.21.31.04 #461

singleserveapps opened this issue Oct 2, 2024 · 7 comments
Labels
duplicate This issue or pull request already exists

Comments

@singleserveapps
Copy link

Using Truecharts on a TrueNAS Scale server.

App Version: latest
Chart Version: 9.0.10
Last Updated: N/A
Source:
github.com/itzg/docker-minecraft-servergit.luolix.top/truecharts/charts/tree/master/charts/stable/minecraft-bedrockhub.docker.com/r/itzg/minecraft-bedrock-server
Developer: N/A
Catalog: Truecharts
Train: stable

Using /data to match uid and gid
Resolved UID=568 from match path
Resolved GID=568 from match path
Skipping uid/gid change since current user is not root
Looking up latest version...
Downloading Bedrock server version 1.21.31.04 ...
curl: (92) HTTP/2 stream 1 was not closed cleanly: INTERNAL_ERROR (err 2)
ERROR failed to download from https://www.minecraft.net/bedrockdedicatedserver/bin-linux/bedrock-server-1.21.31.04.zip
Double check that the given VERSION is valid

@teedog
Copy link

teedog commented Oct 2, 2024

Same issue here, the download of archives from https://www.minecraft.net with command line tools fails. Connecting with SSH to the NAS itself and using curl to download the archive results in curl (or wget) hanging after establishing the connection (see below). I helped myself with downloading the archive using a browser on windows, transferring it over with SCP, and unpacking it to the datadir - I consider this a hacky workaround. So far, I did not find out what causes curl and wget to hang (btw, it also hangs on windows, not only on the NAS). DNS resolution and TLS handshake both look good, it seems like the server is just not sending data at all.

$ curl -vvvvv https://www.minecraft.net/bedrockdedicatedserver/bin-linux/bedrock-server-1.21.31.04.zip
* Host www.minecraft.net:443 was resolved.
* IPv6: (none)
* IPv4: 185.22.140.8, 185.22.140.10
*   Trying 185.22.140.8:443...
* Connected to www.minecraft.net (185.22.140.8) port 443
* ALPN: curl offers http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
*  CAfile: none
*  CApath: /etc/ssl/certs
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384 / X25519 / id-ecPublicKey
* ALPN: server accepted http/1.1
* Server certificate:
*  subject: C=US; ST=WA; L=Redmond; O=Microsoft Corporation; CN=*.minecraft.net
*  start date: May 29 20:28:20 2024 GMT
*  expire date: May 24 20:28:20 2025 GMT
*  subjectAltName: host "www.minecraft.net" matched cert's "*.minecraft.net"
*  issuer: C=US; O=Microsoft Corporation; CN=Microsoft Azure ECC TLS Issuing CA 04
*  SSL certificate verify ok.
*   Certificate level 0: Public key type EC/prime256v1 (256/128 Bits/secBits), signed using ecdsa-with-SHA384
*   Certificate level 1: Public key type EC/secp384r1 (384/192 Bits/secBits), signed using ecdsa-with-SHA384
*   Certificate level 2: Public key type EC/secp384r1 (384/192 Bits/secBits), signed using ecdsa-with-SHA384
* using HTTP/1.x
> GET /bedrockdedicatedserver/bin-linux/bedrock-server-1.21.31.04.zip HTTP/1.1
> Host: www.minecraft.net
> User-Agent: curl/8.5.0
> Accept: */*
>
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
[HANGS FOREVER]

@teedog
Copy link

teedog commented Oct 2, 2024

Update: I checked how Chrome on Windows is able to download the file by copying the curl line from network inspector, then deleting the headers one by one. The header that causes the download to hang is User-Agent. Once you change the download command to curl 'https://www.minecraft.net/bedrockdedicatedserver/bin-linux/bedrock-server-1.21.31.04.zip' -H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36' --output bedrock-server-1.21.31.04.zip, everything works as expected. The string of the user agent doesn't seem to matter; even if you set it to -H 'user-agent: MCS Downloader', the download will proceed and work.

curl -vvvv 'https://www.minecraft.net/bedrockdedicatedserver/bin-linux/bedrock-server-1.21.31.04.zip'   -H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36'  --output bedrock-server-1.21.31.04.zip ; rm bedrock-server-1.21.31.04.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Host www.minecraft.net:443 was resolved.
* IPv6: (none)
* IPv4: 185.22.140.8, 185.22.140.10
*   Trying 185.22.140.8:443...
* Connected to www.minecraft.net (185.22.140.8) port 443
* ALPN: curl offers http/1.1
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
*  CAfile: none
*  CApath: /etc/ssl/certs
{ [5 bytes data]
* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [122 bytes data]
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
{ [35 bytes data]
* TLSv1.3 (IN), TLS handshake, Certificate (11):
{ [2427 bytes data]
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
{ [79 bytes data]
* TLSv1.3 (IN), TLS handshake, Finished (20):
{ [52 bytes data]
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
} [1 bytes data]
* TLSv1.3 (OUT), TLS handshake, Finished (20):
} [52 bytes data]
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384 / X25519 / id-ecPublicKey
* ALPN: server accepted http/1.1
* Server certificate:
*  subject: C=US; ST=WA; L=Redmond; O=Microsoft Corporation; CN=*.minecraft.net
*  start date: May 29 20:28:20 2024 GMT
*  expire date: May 24 20:28:20 2025 GMT
*  subjectAltName: host "www.minecraft.net" matched cert's "*.minecraft.net"
*  issuer: C=US; O=Microsoft Corporation; CN=Microsoft Azure ECC TLS Issuing CA 04
*  SSL certificate verify ok.
*   Certificate level 0: Public key type EC/prime256v1 (256/128 Bits/secBits), signed using ecdsa-with-SHA384
*   Certificate level 1: Public key type EC/secp384r1 (384/192 Bits/secBits), signed using ecdsa-with-SHA384
*   Certificate level 2: Public key type EC/secp384r1 (384/192 Bits/secBits), signed using ecdsa-with-SHA384
* using HTTP/1.x
} [5 bytes data]
> GET /bedrockdedicatedserver/bin-linux/bedrock-server-1.21.31.04.zip HTTP/1.1
> Host: www.minecraft.net
> Accept: */*
> user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36
>
{ [5 bytes data]
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [265 bytes data]
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [265 bytes data]
* old SSL session ID is stale, removing
{ [5 bytes data]
< HTTP/1.1 200 OK
< Content-Length: 56027291
< Content-Type: application/x-zip-compressed
< Content-MD5: gPPO/pbSYdvJnG61s5DuDA==
< Last-Modified: Mon, 30 Sep 2024 15:45:49 GMT
< Accept-Ranges: bytes
< ETag: "0x8DCE166F5659C92"
< Server: Windows-Azure-Web/1.0 Microsoft-HTTPAPI/2.0
< x-ms-request-id: b1a00868-601e-003d-7050-13be84000000
< x-ms-version: 2018-03-28
< Cache-Control: max-age=450445
< Expires: Mon, 07 Oct 2024 15:46:35 GMT
< Date: Wed, 02 Oct 2024 10:39:10 GMT
< Connection: keep-alive
< Server-Timing: cdn-cache; desc=HIT
< Server-Timing: edge; dur=2
< Server-Timing: ak_p; desc="1727865550729_3105262596_810342358_282_13244_15_38_-";dur=1
<
{ [15743 bytes data]
100 53.4M  100 53.4M    0     0  34.7M      0  0:00:01  0:00:01 --:--:-- 34.8M
* Connection #0 to host www.minecraft.net left intact

@teedog
Copy link

teedog commented Oct 2, 2024

Created PR #463 to add the user-agent to bedrock-entry.sh.

@itzg
Copy link
Owner

itzg commented Oct 2, 2024

Re-pull the image. This has already been fixed in #459

@itzg itzg added the duplicate This issue or pull request already exists label Oct 2, 2024
@singleserveapps
Copy link
Author

singleserveapps commented Oct 2, 2024

I apologize for creating a duplicate issue. This item has been resolved on my server. Thanks!

Resolution info:
Attempting to start via TrueCharts Version: 9.0.10 is/was still failing even though it does appear to attempt to pull the latest docker-minecraft-bedrock-server image each time (?)

curl: (92) HTTP/2 stream 1 was not closed cleanly: INTERNAL_ERROR (err 2)

And, unfortunately, I'm currently unable to to update to the latest TrueCharts version (10.2.0) on my TrueNAS Scale server (for reasons: https://www.reddit.com/r/truenas/comments/1e1dxvk/truecharts_just_nuked_everything_in_response_to/) to see if that resolves the issue for the TrueCharts apps.

So, I was able to resolve on my TrueNAS Scale server by "migrating" my TrueCharts catalog docker-minecraft-bedrock-server apps to manually created/configured "custom" apps.

@maui671
Copy link

maui671 commented Oct 11, 2024

I apologize for creating a duplicate issue. This item has been resolved on my server. Thanks!

Resolution info: Attempting to start via TrueCharts Version: 9.0.10 is/was still failing even though it does appear to attempt to pull the latest docker-minecraft-bedrock-server image each time (?)

curl: (92) HTTP/2 stream 1 was not closed cleanly: INTERNAL_ERROR (err 2)

And, unfortunately, I'm currently unable to to update to the latest TrueCharts version (10.2.0) on my TrueNAS Scale server (for reasons: https://www.reddit.com/r/truenas/comments/1e1dxvk/truecharts_just_nuked_everything_in_response_to/) to see if that resolves the issue for the TrueCharts apps.

So, I was able to resolve on my TrueNAS Scale server by "migrating" my TrueCharts catalog docker-minecraft-bedrock-server apps to manually created/configured "custom" apps.

Can you help with how you went about this?

@singleserveapps
Copy link
Author

What I ended up doing was essentially following the steps outlined at this link for creating a custom app: https://www.truenas.com/docs/scale/24.04/scaletutorials/apps/usingcustomapp/

The key step being specifying the approx 25 Environment Variables - Step 4 - specific to my Minecraft servers.

I've since moved to Electric Eel RC-2 and using Dockge, which made it much easier to create/deploy via Docker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

4 participants