rustup
rustup copied to clipboard
Rust installer fails with "operation timed out"
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
- 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
I'm not sure how bash vs dash can affect this, since the download is happening from within rustup-init itself.
Does rustup install successfully on the host OS?
If you run rustup-init by hand within WSL does it still fail?
If you run whatever scenario fails with the env variable RUSTUP_DEBUG set to 1 and add -v to the command line options, what output do you get?
I got the same error on the same environment, and rustup NOT installed AFTER got error
$ type rustup
bash: type: rustup: not found
and sh(dash) got error, so change it to bash, then success
That looks like a PATH problem : when you started bash the bash profile gets loaded and now the already installed rustup is available for use.
Restarting dash should also have had the same effect.
Regardless @krmbn0576 please file a new bug for your issue, this bug is @thardie 's who reported the opposite case.