Open JonathanWoollett-Light opened 2 years ago
It's hard to remote debug. The root cause varies from platform to platform. ehuss wrote a simple guide to follow if seeing SSL connection issue, as this may be the same issue as #9113.
Also, knowing how Rust is installed is also important.
linuxmint-20.3-cinnamon-64bit.iso
(https://linuxmint.com/edition.php?id=292)curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
cargo install rusty-hook
Errors:
mint@mint:~$ cargo install rusty-hook
Updating crates.io index
error: failed to fetch `https://github.com/rust-lang/crates.io-index`
Caused by:
network failure seems to have happened
if a proxy or similar is necessary `net.git-fetch-with-cli` may help here
https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli
Caused by:
SSL error: received early EOF; class=Ssl (16); code=Eof (-20)
I believe this is the mcve.
Thanks for the clear example!
Here are more approaches to help investigate this issue:
net.git-fetch-with-cli
and do it again? This uses system git
binary instead of Cargo's libgit2. git
binary? Something like git fetch https://github.com/rust-lang/crates.io-index
. It wouldn't seem any of these helps resolve the problem, here is full terminal output covering these (it is too long to include directly in this comment).
From line 259-264 of your output, looks like it's a general TLS error on Linux, not only happens with Cargo.
mint@mint:~$ git clone https://github.com/rust-lang/crates.io-index
Cloning into 'crates.io-index'...
remote: Enumerating objects: 418179, done.
remote: Counting objects: 100% (1462/1462), done.
remote: Compressing objects: 100% (653/653), done.
error: RPC failed; curl 56 GnuTLS recv error (-9): Error decoding the received TLS packet.
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
Having searched on the Internet, some suggest to increase post buffer size or do a apt install gnutls-bin
. Maybe give it a shot?
So moving from Mint to Ubuntu fixes the issue with git clone https://github.com/rust-lang/crates.io-index
but the issue with cargo install rusty-hook
(and other crates.io
operations) remains.
Same issue here. Fresh rust install, can't build hello world because it can't update from crates.io.
I've even cloned crates.io and set the default registry to that local one, in ~/.cargo/config.toml
and myproject/.cargo/config.toml
but it still wants to download the entire thing from scratch.
This seems to also be an issue with Ubuntu. My configuration here:
jonathan@jonathan-desk:~$ neofetch
.-/+oossssoo+/-. jonathan@jonathan-desk
`:+ssssssssssssssssss+:` ----------------------
-+ssssssssssssssssssyyssss+- OS: Ubuntu 22.04 LTS x86_64
.ossssssssssssssssssdMMMNysssso. Kernel: 5.15.0-46-generic
/ssssssssssshdmmNNmmyNMMMMhssssss/ Uptime: 39 mins
+ssssssssshmydMMMMMMMNddddyssssssss+ Packages: 2041 (dpkg), 13 (snap)
/sssssssshNMMMyhhyyyyhmNMMMNhssssssss/ Shell: bash 5.1.16
.ssssssssdMMMNhsssssssssshNMMMdssssssss. Resolution: 3840x2160
+sssshhhyNMMNyssssssssssssyNMMMysssssss+ DE: GNOME 42.1
ossyNMMMNyMMhsssssssssssssshmmmhssssssso WM: Mutter
ossyNMMMNyMMhsssssssssssssshmmmhssssssso WM Theme: Adwaita
+sssshhhyNMMNyssssssssssssyNMMMysssssss+ Theme: Yaru-dark [GTK2/3]
.ssssssssdMMMNhsssssssssshNMMMdssssssss. Icons: Yaru [GTK2/3]
/sssssssshNMMMyhhyyyyhdNMMMNhssssssss/ Terminal: gnome-terminal
+sssssssssdmydMMMMMMMMddddyssssssss+ CPU: AMD Ryzen 9 5900X (24) @ 3.700GHz
/ssssssssssshdmNNNNmyNMMMMhssssss/ GPU: NVIDIA GeForce RTX 3060 Ti Lite Hash Rate
.ossssssssssssssssssdMMMNysssso. Memory: 4326MiB / 128723MiB
-+sssssssssssssssssyyyssss+-
`:+ssssssssssssssssss+:`
.-/+oossssoo+/-.
jonathan@jonathan-desk:~$
Same issue on Mac OS (13.6.3) Intel
I have the same issue in ubuntu 22.04. Interestingly, it's happening randomly. You can see an example run here https://github.com/furkansahin/frequency/actions/runs/8419571829/job/23052464174. Using git, I can easily clone and fetch the target repository, however, using cargo, it fails randomly. I could also validate that system date time is not an issue. Adding git-fetch-with-cli = true
to cargo did not help either. The only solution I could find is adding retry = 5
parameter. It seems like continuous tries are solving the issue but this is not ideal. Anyone has an idea?
Problem
On new install of mint 20.3 when attempting to run
cargo install rusty-hook
I receiveSteps
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
cargo
command which requires pulling from crates.io (e.g.cargo build
on a project with dependencies orcargo install <any package>
).Possible Solution(s)
No response
Notes
I first encountered this issue with an extremely minimal set of installed applications under an hour after doing a clean install.
Version