SSL_connect: SSL_ERROR_SYSCALL behind a proxy
Trying to run cargo behind a proxy. Note that rustup immediately prior to this is successful, and curl is able to reach github without issues.
[root@fab7-compute-1 ~]# curl -o /dev/null https://github.com/
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 52814 0 52814 0 0 93135 0 --:--:-- --:--:-- --:--:-- 93310
[root@fab7-compute-1 ~]# cargo install click
Updating registry `https://github.com/rust-lang/crates.io-index`
warning: spurious network error (2 tries remaining): [35] SSL connect error (OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to proxy.esl.cisco.com:80 ); class=Net (12)
warning: spurious network error (1 tries remaining): [35] SSL connect error (OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to proxy.esl.cisco.com:80 ); class=Net (12)
error: failed to fetch `https://github.com/rust-lang/crates.io-index`
Caused by:
[35] SSL connect error (OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to proxy.esl.cisco.com:80 ); class=Net (12)
[root@fab7-compute-1 ~]# env | grep -i proxy
http_proxy=https://proxy.esl.cisco.com:80
https_proxy=https://proxy.esl.cisco.com:80
Hm this seems to indicate that weird errors are happening, perhaps the proxy isn't configured correctly? Or maybe Cargo isn't sending the right headers or something like that?
Not sure. I've been able to successfully connect through this proxy with many different systems, including go, python, curl, etc. So it's quite possible Rust is doing some higher level of validation here. Maybe this shouldn't be a cargo issue but against the https stack. I'm fairly new to Rust ecosystem so I'd appreciate any pointers in the right direction.
Ah sorry I've never seen this error before so I'm not sure what's going on :(
Are you sure the proxy is configured correctly? It looks like you're using an SSL proxy on an HTTP (not HTTPS) port, so I just wanted to confirm that was expected
Yea the proxy settings are correct. You can see curl successfully using them to get https://github.com in the output above.
If git is working, then open ~/.cargo/config and write:
[net]
git-fetch-with-cli = true
https://doc.rust-lang.org/cargo/reference/config.html