You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"An existing connection was forcibly closed by the remote host." error on Windows (with Rust + MSVC) #1186
When I try to build my Rust project, I get this error:
error: failed to run `rustc` to learn about target-specific information
Caused by:
process didn't exit successfully: `C:\Users\Mahad\.cargo\bin\sccache.exe rustc - --crate-name ___ --print=file-names --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg` (exit code: 2)
--- stderr
sccache: error: failed to execute compile
sccache: caused by: Failed to send data to or receive data from server
sccache: caused by: An existing connection was forcibly closed by the remote host. (os error 10054)
Restarting the server/machine/VS Code did not help. In addition to this, Kaspersky's Web Anti-Virus is turned off.
OS error 10054 indicates the peer application reset the TCP connection (set the TCP RST flag). That could be from improper firewall configuration, spotty wifi, etc.
As it is right now I don't have enough information to determine if this is a bug in sccache, or if you simply had a transient networking issue.
Can you provide more information about your network environment and what you were trying to compile? Also, if you could provide your windows version that would also be helpful.
I also run into this issue occasionally on windows with only a local disk cache.
sccache: error: failed to execute compile
sccache: caused by: Failed to send data to or receive data from server
sccache: caused by: An existing connection was forcibly closed by the remote host. (os error 10054)
Sometimes I use sccache stop-server and sccache start-server to try to restart the server, but most of the time, the issue is not resolved and I have to resort to resetting RUSTC_WRAPPER
Activity
emabrey commentedon Aug 18, 2022
OS error 10054 indicates the peer application reset the TCP connection (set the TCP RST flag). That could be from improper firewall configuration, spotty wifi, etc.
As it is right now I don't have enough information to determine if this is a bug in sccache, or if you simply had a transient networking issue.
Can you provide more information about your network environment and what you were trying to compile? Also, if you could provide your windows version that would also be helpful.
skyfallwastaken commentedon Aug 26, 2022
Hello, thanks for the reply!
emabrey commentedon Aug 27, 2022
Can you provide the rust toolchain you are using?
rustup toolchain listis the commandskyfallwastaken commentedon Sep 10, 2022
I can't remember (I switched away from Windows to Linux) but I'm pretty sure it was the latest stable Rust version at the time.
wmmc88 commentedon Oct 31, 2023
I also run into this issue occasionally on windows with only a local disk cache.
Sometimes I use
sccache stop-serverandsccache start-serverto try to restart the server, but most of the time, the issue is not resolved and I have to resort to resettingRUSTC_WRAPPERPrototypeNM1 commentedon Jan 7, 2025
Had the same behavior. Deleting the
targetdirectory (not viacargo clean) resolved the issue.chore: Remove unused bytes from dependencies (mozilla#1186)