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

install.sh: OTP master fails to install without obvious error #1781

Open
zachallaun opened this issue Nov 4, 2024 · 5 comments
Open

install.sh: OTP master fails to install without obvious error #1781

zachallaun opened this issue Nov 4, 2024 · 5 comments

Comments

@zachallaun
Copy link
Contributor

cc @wojtekmach

Using the latest install.sh from https://elixir-lang.org/install.sh:

~/dev/misc
❯ sh install.sh elixir@main otp@master
downloading https://github.com/elixir-lang/elixir/releases/download/main-latest/elixir-otp-27.zip
downloading https://builds.hex.pm/builds/otp/amd64/ubuntu-22.04/master.tar.gz
unpacking elixir-otp-27.zip to /home/zacha/.elixir-install/installs/elixir/main-otp-27...
curl: (92) HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)
checking OTP... 27 ok
checking Elixir... 1.18.0-dev ok

Run this (or add to your ~/.bashrc or similar file):

    export PATH=$HOME/.elixir-install/installs/otp/master/bin:$PATH
    export PATH=$HOME/.elixir-install/installs/elixir/main-otp-27/bin:$PATH

~/dev/misc 12s
❯ ls ~/.elixir-install/installs
elixir

Note the "HTTP/2 stream 0 was not closed cleanly" error, followed by the "ok" check that passed despite the download/install failing.

Things succeed when downloading otp@latest:

~/dev/misc
❯ sh install.sh elixir@main otp@latest
downloading https://builds.hex.pm/builds/otp/amd64/ubuntu-22.04/OTP-27.1.2.tar.gz
unpacking OTP-27.1.2.tar.gz to /home/zacha/.elixir-install/installs/otp/27.1.2...
checking OTP... 27 ok
checking Elixir... 1.18.0-dev ok

Run this (or add to your ~/.bashrc or similar file):

    export PATH=$HOME/.elixir-install/installs/otp/27.1.2/bin:$PATH
    export PATH=$HOME/.elixir-install/installs/elixir/main-otp-27/bin:$PATH


~/dev/misc 33s
❯ ls ~/.elixir-install/installs
elixir  otp
@zachallaun
Copy link
Contributor Author

Hmm... Perhaps this was a transient error with builds.hex.pm? Because it's suddenly working.

I suppose it's worth leaving this open to track error handling when downloads fail?

@wojtekmach
Copy link
Member

We should track it upstream, for builds.hex.pm this would be https://github.com/hexpm/bob/issues. This reminds me of erlef/setup-beam#260 btw.

Are you able to reproduce this at all? One thing we could do here is force HTTP/1 if the problem is around HTTP/2.

@zachallaun
Copy link
Contributor Author

zachallaun commented Nov 4, 2024

One thing we could do here is force HTTP/1 if the problem is around HTTP/2.

I did try that, but it still failed, just with a different error: curl: (18) transfer closed with 24841216 bytes remaining to read

We should track it upstream, for builds.hex.pm this would be https://github.com/hexpm/bob/issues. This reminds me of erlef/setup-beam#260 btw.

Just to clarify: I should open an issue at hexpm/bob and just include that there was a period where the connection was dropping (both with HTTP/1 and HTTP/2) and that it eventually resolved itself?

@zachallaun
Copy link
Contributor Author

As for reproduction, I unfortunately can no longer reproduce it. While the issue was ongoing, I could reproduce by just running

curl -fsSLo master.tar.gz https://builds.hex.pm/builds/otp/amd64/ubuntu-22.04/master.tar.gz
# or
curl --http1.1 -fsSLo master.tar.gz https://builds.hex.pm/builds/otp/amd64/ubuntu-22.04/master.tar.gz

@wojtekmach
Copy link
Member

Yes please report it. Perhaps we're gonna file it under transient error but I think it'd be good to leave a papetrail. If you have any ideas how to reproduce this it would be greatly appreciated.

I was hoping passing --retry 3 which we do in install.sh would help with issues like this but it doesn't seem to make a difference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants