rust-lang / rust-lang/rustup

Rust installer fails with "operation timed out"

Open
#2,929 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Rust
Stars
7k
Forks
1.1k
Avg merge
22h 40m
Merged PRs (30d)
46

Description

Problem

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

error: could not download file from 'https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256' to '/home/terry/.rustup/tmp/l6iooajjzu4sbq0v_file': failed to make network request: error sending request for url (https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256): operation timed out: operation timed out

Manual attempt:

terry@Breach:~/git/gateway-rs$ curl -v https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256
*   Trying 54.230.15.127:443...
* TCP_NODELAY set
* Connected to static.rust-lang.org (54.230.15.127) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* 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_128_GCM_SHA256
* ALPN, server accepted to use h2
* Server certificate:
*  subject: CN=doc.rust-lang.org
*  start date: Jun 23 00:00:00 2021 GMT
*  expire date: Jul 22 23:59:59 2022 GMT
*  subjectAltName: host "static.rust-lang.org" matched cert's "static.rust-lang.org"
*  issuer: C=US; O=Amazon; OU=Server CA 1B; CN=Amazon
*  SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x563be3f8fd40)
> GET /dist/channel-rust-stable.toml.sha256 HTTP/2
> Host: static.rust-lang.org
> user-agent: curl/7.68.0
> accept: */*
>
* Connection state changed (MAX_CONCURRENT_STREAMS == 128)!
< HTTP/2 200
< content-type: binary/octet-stream
< content-length: 91
< date: Wed, 22 Dec 2021 00:56:22 GMT
< last-modified: Thu, 02 Dec 2021 14:51:55 GMT
< etag: "d70ce259a9030057108ad60ec9ebd4ed"
< x-amz-version-id: J9y_PITgr8VFF9fB2EMf7rFawlu_HNXl
< accept-ranges: bytes
< server: AmazonS3
< x-cache: Hit from cloudfront
< via: 1.1 4a19df966da88006816fbfa475b144f9.cloudfront.net (CloudFront)
< x-amz-cf-pop: ORD51-C4
< x-amz-cf-id: Tuh2b72j-boB4qrVmDcxNVtiWYT9YKyw_vsdvxL5M0Ria_HAPvnKRg==
< age: 15705
<
e8f7c18df088f4368d4721a28049ae50fda971a996b1619ce20ed23441ea0f67  channel-rust-stable.toml
* Connection #0 to host static.rust-lang.org left intact

This is under Ubuntu 20.04 LTS

Steps
  1. Launch installer with curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash
Possible Solution(s)

Surprisingly, launching the script with "sh" instead works! On my system, sh is a link to dash, so I'm guessing this is some interaction with bash versus dash. Could be useful to other troubleshooting

Notes

This is running Ubuntu under WSL2.

Ubuntu network config:

terry@Breach:~$ ip ad ls
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 2a:b9:b2:bd:4a:dd brd ff:ff:ff:ff:ff:ff
3: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether a6:30:c1:c3:50:23 brd ff:ff:ff:ff:ff:ff
4: tunl0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
    link/ipip 0.0.0.0 brd 0.0.0.0
5: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
    link/sit 0.0.0.0 brd 0.0.0.0
6: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:15:5d:d0:db:85 brd ff:ff:ff:ff:ff:ff
    inet 192.168.225.209/20 brd 192.168.239.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::215:5dff:fed0:db85/64 scope link
       valid_lft forever preferred_lft forever

Windows network config:

Windows IP Configuration


Ethernet adapter Ethernet:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Ethernet adapter Ethernet 4:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Ethernet adapter 10G:

   Connection-specific DNS Suffix  . :
   IPv6 Address. . . . . . . . . . . : 2001:559:106:1:<redacted>
   Temporary IPv6 Address. . . . . . : 2001:559:106:<redacted>
   Link-local IPv6 Address . . . . . : fe80::acdc:5c2e:6050:5b14%19
   IPv4 Address. . . . . . . . . . . : 192.168.111.201
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : fe80::a0f7:d7ff:fe5c:754a%19
                                       192.168.111.253

Unknown adapter Local Area Connection:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Ethernet adapter Bluetooth Network Connection:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Ethernet adapter vEthernet (WSL):

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::21af:cc67:ce80:6680%36
   IPv4 Address. . . . . . . . . . . : 192.168.224.1
   Subnet Mask . . . . . . . . . . . : 255.255.240.0
   Default Gateway . . . . . . . . . 
Rustup version
N/A
Installed toolchains
N/A

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the rustup command under Ubuntu 20.04 on WSL2, comparing the reported bash and dash invocations and the direct curl request to static.rust-lang.org. Trace the installer entry point and its network request path; done means identifying a reproducible cause and documenting or validating a fix for the timeout.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.