Skip to content

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

Open
@zachallaun

Description

@zachallaun

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

Activity

zachallaun

zachallaun commented on Nov 4, 2024

@zachallaun
ContributorAuthor

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

wojtekmach commented on Nov 4, 2024

@wojtekmach
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

zachallaun commented on Nov 4, 2024

@zachallaun
ContributorAuthor

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

zachallaun commented on Nov 4, 2024

@zachallaun
ContributorAuthor

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

wojtekmach commented on Nov 4, 2024

@wojtekmach
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @wojtekmach@zachallaun

        Issue actions

          install.sh: OTP master fails to install without obvious error · Issue #1781 · elixir-lang/elixir-lang.github.com