-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Yarn install ECONNREFUSED 151.101.36.162:443 issue (proposed fix) #5299
Comments
Thanks a lot for creating a new issue with all these details! I still think this is due to slow/overwhelmed DNS but that doesn't explain why the DNS cache doesn't help. I think we need this patch to be merged: https://github.com/yahoo/dnscache/pull/6/files Seems unlikely that the maintainers will do anything with the package so maybe we should fork it into @yarnpkg and publish under our own scope? |
Just tested and I can confirm that this issue is still present in yarn 1.4.0. Unfortunately, my company won't accept having a forked yarn inside their system and it's a really low priority issue for me, since it only happens to me when working remotely through my home network, plus the fact that I'm the only person there who experiences this. |
Oh, I wasn't referring to forking Yarn :) I was saying we may need to fork Makes sense? |
@BYK I could take this on with some support, as I've never published an npm package before. Would you like me to take a look? If so, does it make sense for you to start by forking https://github.com/yahoo/dnscache/ within the yarn Github org? |
Still present on the latest version. |
@Xerios I also get the same error as you |
@mhchen it is probably easier than you think :) If you are interested, give it a shot? |
@BYK Will do, would you mind please forking https://github.com/yahoo/dnscache/ into https://github.com/yarnpkg/dnscache/ (if that's the optimal way to handle this)? |
@1459416736 Tell us if Truth to be told, I haven't had this error for a while now. Unfortunately, I can't pinpoint when it was fixed since I was working on non-node projects for a while now. Perhaps it was fixed through my latest windows insider build ( 10.0.17661.1001, I'm sure it also worked few releases before this one ), or one of the newer Docker CE versions I installed ( 17.12.0-ce, build c97c6d6 ). |
@Xerios it works for me |
Got this issue today, everything was working fine yesterday, but then today yarn says:
I'm on windows and my yarn version is 1.5.1, node is v8.10.0. I can provide any needed details if it helps to solve this issue... |
Docker 20.10.6 I encounter the same problem, while installing packages with yarn in a Dockerfile. |
I've been getting some strange ECONNREFUSED errors when trying to use yarn or npm inside Docker ( and Docker edge build ), an issue that is somehow still unknown of origins.
What is the current behavior?
When doing an
yarn install/add
ornpm install
, you start seeingECONNREFUSED 151.101.36.162:443
on random packages. Verbose output shows that once the first ECONNREFUSED error happens, all the following requests will start failing with the same reason. Note that the error happens randomly on any package, there is no specific package or url causing it as far as I know.Steps to reproduce.
It's pretty hard to reproduce, and from reading other people's similar issues, it doesn't seem to be related to the OS. One odd behavior I have noticed, is that, using the same machine with the same setup, I do NOT get this issue when I'm connected my work's network ( physically in a different place ), but I do get it at home. My friend's (windows) PC, which's also connected to the same home network as me, does not get this problem, but both of my own PCs do (both windows).
What is the expected behavior?
Yarn install should simply install the packages just like it's supposed to.
Solution
Setting an argument
--network-concurrency=1
solves this issue entirely.Proposed change
In case of consecutive ECONNREFUSED errors, falling back to
network-concurrency=1
with a delay would solve this for me and many others. Perhaps a message proposing this argument is gonna prevent users from getting this confusing error.Tested this issue on these following systems:
Happens with yarn(1.3.2) and npm (5.6.0) and possibly older versions.
Node 9.2, 8.9 and Node 6.x.
Windows 10 ( cleanly installed build 16299 and an existing 17074 build ) with Docker CE ( older version 16.x, stable 17.12.x and edge 18.01.0 )
To do later
I'll test yarn again with 1.4.0 later this evening to see if this issue persists.
The text was updated successfully, but these errors were encountered: