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

curl timeout on one package cause the overall install fail #902

Closed
grissiom opened this issue Jan 5, 2017 · 0 comments · Fixed by #914
Closed

curl timeout on one package cause the overall install fail #902

grissiom opened this issue Jan 5, 2017 · 0 comments · Fixed by #914

Comments

@grissiom
Copy link
Contributor

grissiom commented Jan 5, 2017

I have a slow connection to the AWS so the curl is likely to fail to download the cargo. After the timeout, rustup-init will delete all the temp files so I've to start over and over again. Here is the log:

./rustup-init -v --no-modify-path

Welcome to Rust!

This will download and install the official compiler for the Rust programming 
language, and its package manager, Cargo.

It will add the cargo, rustc, rustup and other commands to Cargo's bin 
directory, located at:

  /home/grissiom/.cargo/bin

This path needs to be in your PATH environment variable, but will not be added 
automatically.

You can uninstall at any time with rustup self uninstall and these changes will
be reverted.

Current installation options:

   default host triple: x86_64-unknown-linux-gnu
     default toolchain: stable
  modify PATH variable: no

1) Proceed with installation (default)
2) Customize installation
3) Cancel installation
1

verbose: installing toolchain 'stable-x86_64-unknown-linux-gnu'
verbose: toolchain directory: '/home/grissiom/.rustup/toolchains/stable-x86_64-unknown-linux-gnu'
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
verbose: creating temp file: /home/grissiom/.rustup/tmp/_bmgbnllh3nsrjuj_file
verbose: downloading file from: 'https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256'
verbose: downloading with curl
verbose: deleted temp file: /home/grissiom/.rustup/tmp/_bmgbnllh3nsrjuj_file
verbose: no update hash at: '/home/grissiom/.rustup/update-hashes/stable-x86_64-unknown-linux-gnu'
verbose: creating temp file: /home/grissiom/.rustup/tmp/z83ayr388cskczt4_file.toml
verbose: downloading file from: 'https://static.rust-lang.org/dist/channel-rust-stable.toml'
verbose: downloading with curl
verbose: checksum passed
verbose: deleted temp file: /home/grissiom/.rustup/tmp/z83ayr388cskczt4_file.toml
info: downloading component 'rustc'
verbose: creating temp file: /home/grissiom/.rustup/tmp/9vht9tz39xey6xnv_file
verbose: downloading file from: 'https://static.rust-lang.org/dist/2016-12-21/rustc-1.14.0-x86_64-unknown-linux-gnu.tar.gz'
verbose: downloading with curl
 47.1 MiB /  47.1 MiB (100 %) 220.8 KiB/s ETA:   0 s                
verbose: checksum passed
info: downloading component 'rust-std'
verbose: creating temp file: /home/grissiom/.rustup/tmp/0djwi0zdnpjhaoep_file
verbose: downloading file from: 'https://static.rust-lang.org/dist/2016-12-21/rust-std-1.14.0-x86_64-unknown-linux-gnu.tar.gz'
verbose: downloading with curl
 56.8 MiB /  56.8 MiB (100 %) 236.8 KiB/s ETA:   0 s                 
verbose: checksum passed
info: downloading component 'cargo'
verbose: creating temp file: /home/grissiom/.rustup/tmp/opwlmgc9qyatcy7z_file
verbose: downloading file from: 'https://s3.amazonaws.com/rust-lang-ci/cargo-builds/298a0127f703d4c2500bb06d309488b92ef84ae1/cargo-nightly-x86_64-unknown-linux-gnu.tar.gz'
verbose: downloading with curl
151.6 KiB /   4.0 MiB (  4 %)  13.4 KiB/s ETA: 294 s                verbose: deleted temp file: /home/grissiom/.rustup/tmp/9vht9tz39xey6xnv_file
verbose: deleted temp file: /home/grissiom/.rustup/tmp/0djwi0zdnpjhaoep_file
verbose: removing toolchain directory: '/home/grissiom/.rustup/toolchains/stable-x86_64-unknown-linux-gnu'
error: component download failed for cargo-x86_64-unknown-linux-gnu
info: caused by: could not download file from 'https://s3.amazonaws.com/rust-lang-ci/cargo-builds/298a0127f703d4c2500bb06d309488b92ef84ae1/cargo-nightly-x86_64-unknown-linux-gnu.tar.gz' to '/home/grissiom/.rustup/tmp/opwlmgc9qyatcy7z_file
info: caused by: error during download
info: caused by: [28] Timeout was reached (Operation too slow. Less than 10 bytes/sec transferred the last 30 seconds)

I think comment out the lines

            try!(handle.low_speed_limit(10).chain_err(|| "failed to set low speed limit"));
            try!(handle.low_speed_time(Duration::new(30, 0)).chain_err(|| "failed to set low speed time"));

in src/download/src/lib.rs will deal with the issue. Maybe we need them to be options?

grissiom added a commit to grissiom/rustup.rs that referenced this issue Jan 8, 2017
On some country, the network might be very slow occasionally. Setting
"low speed limit" and "low speed time" will make rustup fail nearly all
the time. Removing the settings will make rustup work on the unstable
networks.

This fixed rust-lang#902 .
nodakai pushed a commit to nodakai/rustup.rs that referenced this issue Apr 23, 2017
On some country, the network might be very slow occasionally. Setting
"low speed limit" and "low speed time" will make rustup fail nearly all
the time. Removing the settings will make rustup work on the unstable
networks.

This fixed rust-lang#902 .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant