Skip to content

Can't install, fails with: "internal error inside Hyper and/or its dependencies, please report" #3391

Description

@mgalgs

Problem

I'm trying to install Rust using the recommended rustup command:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

but it's failing like so (with --verbose):

info: profile set to 'default'
info: default host triple is x86_64-unknown-linux-gnu
verbose: installing toolchain 'stable-x86_64-unknown-linux-gnu'
verbose: toolchain directory: '/home/mgalgs/.rustup/toolchains/stable-x86_64-unknown-linux-gnu'
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
verbose: creating temp file: /home/mgalgs/.rustup/tmp/z0knt4q4ahiof37m_file
verbose: downloading file from: 'https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256'
verbose: downloading with reqwest
verbose: removing toolchain directory: '/home/mgalgs/.rustup/toolchains/stable-x86_64-unknown-linux-gnu'
error: could not download file from 'https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256' to '/home/mgalgs/.rustup/tmp/z0knt4q4ahiof37m_file'

Caused by:
    0: failed to make network request
    1: error sending request for url (https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256): internal error inside Hyper and/or its dependencies, please report
    2: internal error inside Hyper and/or its dependencies, please report

I've also tried forcing the curl fallback download helper as recommended in #1328 (by setting RUSTUP_USE_CURL=1), but it fails with a different error:

info: profile set to 'default'
info: default host triple is x86_64-unknown-linux-gnu
verbose: installing toolchain 'stable-x86_64-unknown-linux-gnu'
verbose: toolchain directory: '/home/mgalgs/.rustup/toolchains/stable-x86_64-unknown-linux-gnu'
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
verbose: creating temp file: /home/mgalgs/.rustup/tmp/0hk5cenyeo3kf8o5_file
verbose: downloading file from: 'https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256'
verbose: downloading with curl
verbose: manifest not found. trying legacy manifest
verbose: creating temp file: /home/mgalgs/.rustup/tmp/r0ttxaytzd3en0ng_file
verbose: downloading file from: 'https://static.rust-lang.org/dist/channel-rust-stable.sha256'
verbose: downloading with curl
verbose: removing toolchain directory: '/home/mgalgs/.rustup/toolchains/stable-x86_64-unknown-linux-gnu'
error: no release found for 'stable'

Steps

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Possible Solution(s)

No response

Notes

This is on Arch Linux, x86_64. No network proxy. I'm able to curl https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256 just fine:

curl https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256
81d62a9e0d32f621d8cd83c07640bf91adc3467cb72dafd2e46f004a3d00cb27  channel-rust-stable.toml

Oddly enough, I have another machine on this same network also running Arch, using the same DNS, same default route, same kernel, same network proxy settings (no proxy), similar package selection (both fully up-to-date), and rustup (same version) works just fine on that machine.

Rustup version

`rustup-init 1.26.0 (5af9b9484 2023-04-05)`

Installed toolchains

❯ /tmp/rustup show
info: downloading installer
error: error: Found argument 'show' which wasn't expected, or isn't valid in this context

USAGE:
    rustup-init [OPTIONS]

For more information try --help

Guess I'm not bootstrapped far enough along to have a working show subcommand?

Oh wait, hold on, here you go:

❯ ~/.cargo/bin/rustup show
Default host: x86_64-unknown-linux-gnu
rustup home:  /home/mgalgs/.rustup

no active toolchain

Activity

  1. rbtcollins commented on Jun 25, 2023

    @rbtcollins
    Contributor

    Thats .. .strange. The first error is likely something in the reqwest -> hyper -> tokio stack (using reqwest blocking client).

    The second suggests either bad DNS, bad TLS certs, or some wicked combination.

    Can you explore this a bit? e.g. with strace? Duplicate the HTTP call that fails with a command line curl?

  2. mgalgs commented on Jun 25, 2023

    @mgalgs
    Author

    I'm able to curl the last URL printed to the console:

    curl https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256
    81d62a9e0d32f621d8cd83c07640bf91adc3467cb72dafd2e46f004a3d00cb27  channel-rust-stable.toml
    

    I'm not really sure what to look for in the strace output... I see a bunch of socket operations that seem reasonable, though there are a few recvfroms returning an error code (-1).

    I took a network capture and dropped it into Wireshark but not really seeing anything jump out at me there either... I do see the DNS requests and responses and they seem fine. Only thing jumping out at me is that I'm getting IPv6 addresses back... I'm going to try disabling IPv6 altogether to see if I have any better luck.

  3. mgalgs commented on Jun 25, 2023

    @mgalgs
    Author

    Welp, I disabled IPv6 (and verified that I'm getting IPv4 addresses back via network capture) but still no luck...

  4. mgalgs commented on Jun 26, 2023

    @mgalgs
    Author

    I realize this is a real stinker of an issue since "it works on my machine" -- I mean, it actually works on MY machine on the same network, using the same OS and similar configuration... If anyone has any tips on further strace debugging or things to look for in the network capture please let me know!

  5. rbtcollins commented on Aug 13, 2023

    @rbtcollins
    Contributor

    You could copy the ~/.rustup directory between the two machines to get a working install, and then grab the rustup source, build it locally and step into it with a debugger. I'd love to know whats going on here.

  6. added
    incompleteThe bug report does not have enough information
    on Apr 25, 2024
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

    bugincompleteThe bug report does not have enough information

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions