Yarn: ETIMEOUT 104.16.59.173:443

Created on 13 Oct 2016  ·  55Comments  ·  Source: yarnpkg/yarn

Do you want to request a _feature_ or report a _bug_?
bug

What is the current behavior?
cannot to a yarn

If the current behavior is a bug, please provide the steps to reproduce.
image

Please mention your node.js, yarn and operating system version.
Node 6.7.0 64Bit
Windows 10

cat-bug needs-discussion needs-repro-script triaged

Most helpful comment

I've found a solution thanks to https://github.com/yarnpkg/yarn/pull/2129

EX: yarn add -D webpack --network-concurrency 1

All 55 comments

Hi @MystK! Could you please try ping 104.16.59.173 and see if you can reach that IP address?

Yes! Pingable.

image

Hello, with the latest yarn, I will get the same error.

Below is the yarn-error.log

Arguments: 
  c:\Program Files\nodejs\node.exe c:\Program Files\nodejs\node_modules\yarn\bin\yarn.js

PATH: 
  C:\ProgramData\Oracle\Java\javapath;c:\windows\system32;c:\windows;c:\windows\system32\wbem;c:\windows\system32\windowspowershell\v1.0\;c:\users\its\appdata\roaming\nvm;c:\program files\nodejs;c:\programdata\chocolatey\bin;c:\program files\git\cmd;c:\tools\python2;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Bitvise SSH Client;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files\Git\cmd;C:\Program Files (x86)\Microsoft VS Code\bin;D:\dev\dist\apache-maven-3.2.2\bin;C:\Program Files\7-Zip;C:\adb

Yarn version: 
  0.16.1

Node version: 
  6.9.1

Platform: 
  win32 x64

npm manifest: 
  {
    "name": "universal-react-boilerplate",
    "version": "3.0.0",
    "description": "A new Webpack boilerplate with React components and error handling on module and component level.",
    "scripts": {
      "clean": "rimraf build",
      "build:webpack": "webpack --config webpack.config.prod.js",
      "build:webpack:dev": "webpack --config webpack.config.dev.js",
      "build": "npm run clean && npm run build:webpack",
      "build:dev": "npm run clean && npm run build:webpack:dev",
      "start": "cross-env NODE_PATH=source babel-node devServer.js | bunyan",
      "server": "cross-env NODE_PATH=source babel-node source/server/server.js | bunyan",
      "test": "cross-env NODE_PATH=source babel-node source/test/index.js",
      "test:e2e": "cross-env NODE_PORT=3000 NODE_PATH=source babel-node source/test/e2e.js",
      "lint": "eslint --cache .",
      "watch": "watch \"clear && npm run lint -s && npm run test -s\" source",
      "check": "npm run lint && npm run test && npm outdated --depth=0",
      "update": "updtr"
    },
    "engines": {
      "node": ">=4"
    },
    "os": [
      "darwin",
      "linux"
    ],
    "keywords": [
      "react",
      "reactjs",
      "boilerplate",
      "webpack",
      "babel",
      "react-transform"
    ],
    "repository": {
      "type": "git",
      "url": "[email protected]:cloverfield-tools/universal-react-boilerplate.git"
    },
    "devDependencies": {
      "babel-cli": "6.6.5",
      "babel-core": "6.7.7",
      "babel-eslint": "5.0.0",
      "babel-loader": "6.2.4",
      "babel-plugin-react-transform": "2.0.2",
      "babel-plugin-transform-runtime": "6.6.0",
      "babel-preset-es2015": "6.6.0",
      "babel-preset-react": "6.5.0",
      "babel-preset-stage-2": "6.5.0",
      "cheerio": "0.20.0",
      "cross-env": "1.0.7",
      "eslint": "2.4.0",
      "eslint-plugin-react": "4.2.2",
      "estraverse-fb": "1.3.1",
      "nightwatch-autorun": "2.3.1",
      "open": "0.0.5",
      "react-transform-catch-errors": "1.0.2",
      "redbox-react": "1.2.2",
      "rimraf": "2.5.2",
      "supertest": "1.2.0",
      "tap-xunit": "1.3.1",
      "tape": "4.5.1",
      "updtr": "0.1.7",
      "watch": "0.17.1",
      "webpack": "1.12.14",
      "webpack-dev-middleware": "1.5.1"
    },
    "dependencies": {
      "bunyan-request-logger": "1.1.0",
      "connect-cache-control": "1.0.0",
      "express": "4.13.4",
      "react": "0.14.7",
      "react-dom": "0.14.7",
      "react-redux": "4.4.1",
      "react-router": "2.0.1",
      "react-router-redux": "4.0.0",
      "redux": "3.3.1",
      "redux-logger": "2.6.1",
      "redux-thunk": "2.0.1"
    },
    "license": "MIT",
    "bugs": {
      "url": "https://github.com/cloverfield-tools/universal-react-boilerplate/issues"
    },
    "homepage": "https://github.com/cloverfield-tools/universal-react-boilerplate"
  }

yarn manifest: 
  No manifest

bower manifest: 
  No manifest

Lockfile: 
  No lockfile

Trace: 
  Error: connect ETIMEDOUT 104.16.62.173:443
      at Object.exports._errnoException (util.js:1026:11)
      at exports._exceptionWithHostPort (util.js:1049:20)
      at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1085:14)

While doing more investigation, I tried all combinations of strict-ssl false and both http and https version of the yarn and npmjs registries.

I noticed in the resource monitor that it does in fact connect, but it stalls after a certain amount of connections. Maybe there are too many connections?
image

I set up Bash on Windows and am able to successfully install packages. I think we can point to the operating system as the culprit. I am currently on Windows 10.

Running into this error on OSX 10.12.0.

I'm on OSX 10.11.6 and I'm seeing the same error

I'm not sure what the problem is, but with the latest yarn, if I run "yarn" multiple times, it will finish.

CORRECTION: If there is already a yarn.lock file, then I am able to run yarn multiple times for it to work.

It has something to do with my network card. I tried hotspotting from my iPhone through USB and was successful. Everything else was similar.

I had exactly the same problem. Doing yarn install always ends up with Error connect ETIMEDOUT 104.16.59.173:443. (no yarn.lock file present by the way).
Switching to a USB-Network Card fixed it for me.

OS: Windows 10
Node: 6.9.2
Yarn: 0.17.10
Network Card: Intel Centrino Wireless-N 2230 (driver version: 15.16.0.2)

@MystK I wonder what you're network card is

I have a "Intel(R) 82579V Gigabit Network Connection"

It is a wired connection.

I also have a ASUS RT-AC68U Router flashed with Merlin. Not sure if that matters.

I am having the same problem:

Trace: 
  Error: connect ETIMEDOUT 114.55.80.225:443
      at Object.exports._errnoException (util.js:1026:11)
      at exports._exceptionWithHostPort (util.js:1049:20)
      at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1090:14)
C:\Users\pc>ping 114.55.80.225

Pinging 114.55.80.225 with 32 bytes of data:
Reply from 114.55.80.225: bytes=32 time=340ms TTL=99
Reply from 114.55.80.225: bytes=32 time=340ms TTL=99
Reply from 114.55.80.225: bytes=32 time=339ms TTL=99
Reply from 114.55.80.225: bytes=32 time=341ms TTL=99

Ping statistics for 114.55.80.225:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 339ms, Maximum = 341ms, Average = 340ms

C:\Users\pc>ping 114.55.80.225

Pinging 114.55.80.225 with 32 bytes of data:
Reply from 114.55.80.225: bytes=32 time=341ms TTL=99
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 114.55.80.225:
    Packets: Sent = 4, Received = 1, Lost = 3 (75% loss),
Approximate round trip times in milli-seconds:
    Minimum = 341ms, Maximum = 341ms, Average = 341ms

C:\Users\pc>ping 114.55.80.225

Pinging 114.55.80.225 with 32 bytes of data:
Request timed out.
Reply from 114.55.80.225: bytes=32 time=348ms TTL=99
Reply from 114.55.80.225: bytes=32 time=349ms TTL=99
Reply from 114.55.80.225: bytes=32 time=349ms TTL=99

Ping statistics for 114.55.80.225:
    Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
    Minimum = 348ms, Maximum = 349ms, Average = 348ms

OS: Windows 10
Yarn: 0.16.0
Node: 7.0.0

Could this be linked to https://github.com/yarnpkg/yarn/issues/746?

You could have a flaky connection, or high package loss in some moments.
Seems that yarn bails out at the first failed attempt.
(Ping results from @sqal show high package loss, and my case is the same)

For my case, I highly doubt it's a flaky/packet loss issue. I have a very stable solution, although, a fix for #756, I think, might be a good workaround for this issue if the root cause cannot be determined.

alexandra:webassets xistence$ yarn upgrade [email protected]
yarn upgrade v0.18.1
[1/4] 🔍  Resolving packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/ajv-keywords: connect ETIMEDOUT 104.16.62.173:443".
info If you think this is a bug, please open a bug report with the information provided in "/Users/xistence/Projects/fulgent/webassets/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/upgrade for documentation about this command.
alexandra:webassets xistence$ ping 104.16.62.173
PING 104.16.62.173 (104.16.62.173): 56 data bytes
64 bytes from 104.16.62.173: icmp_seq=0 ttl=57 time=14.205 ms
64 bytes from 104.16.62.173: icmp_seq=1 ttl=57 time=11.073 ms
64 bytes from 104.16.62.173: icmp_seq=2 ttl=57 time=10.913 ms
64 bytes from 104.16.62.173: icmp_seq=3 ttl=57 time=10.701 ms
64 bytes from 104.16.62.173: icmp_seq=4 ttl=57 time=11.231 ms
64 bytes from 104.16.62.173: icmp_seq=5 ttl=57 time=11.153 ms
^C
--- 104.16.62.173 ping statistics ---
6 packets transmitted, 6 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 10.701/11.546/14.205/1.202 ms

macOS Sierra.

alexandra:webassets xistence$ node --version
v7.4.0
alexandra:webassets xistence$ yarn --version
0.18.1
Trace: 
  Error: connect ETIMEDOUT 104.16.62.173:443
      at Object.exports._errnoException (util.js:1022:11)
      at exports._exceptionWithHostPort (util.js:1045:20)
      at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1090:14)

Even retrying this command over and over doesn't solve the issue for me, I can't currently upgrade any of my packages.

I'm just seeing this issue for the first time, but it's definitely just general connectivity in my case, as I see Cloudflare is having a minor service outage right now, according to their status website. In case it isn't clear from prior reports, some of those IP addresses previously reported are Cloudflare IP addresses. Cloudflare's service is utilized by Facebook Yarn for mitigating attacks agains the Yarn package repository, so it seems possible a Cloudflare outage might explain some of the timeouts people are reporting here, especially if the problem clears up when their status website reports "okay."

Less importantly, but possibly helpful to note that my DNS lookup to the Yarn repo also resulted in the previously reported IP address reported, 104.16.62.173, and I am also seeing minor packet loss (3%) pinging to that same IP address.

I've found a solution thanks to https://github.com/yarnpkg/yarn/pull/2129

EX: yarn add -D webpack --network-concurrency 1

--network-concurrency 1 did not solve the problem for me.

lotus@InfiniteDesktop:~/code/react/1$ yarn global add jest
yarn global v0.18.2
warning No license field
[1/4] Resolving packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/jest-config: connect ETIMEDOUT 104.16.61.173:443".
info If you think this is a bug, please open a bug report with the information provided in "/home/lotus/.config/yarn/global/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.
lotus@InfiniteDesktop:~/code/react/1$ yarn global add jest
yarn global v0.18.2
warning No license field
[1/4] Resolving packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/jest-jasmine2: connect ETIMEDOUT 104.16.59.173:443".
info If you think this is a bug, please open a bug report with the information provided in "/home/lotus/.config/yarn/global/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.
lotus@InfiniteDesktop:~/code/react/1$ yarn global add jest
yarn global v0.18.2
warning No license field
[1/4] Resolving packages...
⠠ webidl-conversions@^3.0.0^C
lotus@InfiniteDesktop:~/code/react/1$ yarn global add jest --network-concurrency 1
yarn global v0.18.2
warning No license field
[1/4] Resolving packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/jest-environment-jsdom: connect ETIMEDOUT 104.16.60.173:443".
info If you think this is a bug, please open a bug report with the information provided in "/home/lotus/.config/yarn/global/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.

Are we still going with "it's Cloudflare's fault" ?

Edit: https://www.cloudflarestatus.com/

Upgrading to the latest version for debian 8 doesn't seem to help:

 _______________________________________
/ Drunks are rarely amusing unless they \
| know some good songs and lose a lot a |
| poker.                                |
|                                       |
\ -- Karyl Roosevelt                    /
 ---------------------------------------
     \
      \
       ("`-'  '-/") .___..--' ' "`-._
         ` *_ *  )    `-.   (      ) .`-.__. `)
         (_Y_.) ' ._   )   `._` ;  `` -. .-'
      _.. `--'_..-_/   /--' _ .' ,4
   ( i l ),-''  ( l i),'  ( ( ! .-'    

lotus@InfiniteDesktop:~$ cd code/react/1/
lotus@InfiniteDesktop:~/code/react/1$ yarn global add webpack
yarn global v0.20.3
warning No license field
[1/4] Resolving packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/mkdirp: connect ETIMEDOUT 104.16.63.173:443".
info If you think this is a bug, please open a bug report with the information provided in "/home/lotus/.config/yarn/global/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.
lotus@InfiniteDesktop:~/code/react/1$ yarn global add webpack --network-concurrency 1
yarn global v0.20.3
warning No license field
[1/4] Resolving packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/memory-fs: connect ETIMEDOUT 104.16.61.173:443".
info If you think this is a bug, please open a bug report with the information provided in "/home/lotus/.config/yarn/global/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.
lotus@InfiniteDesktop:~/code/react/1$ 
Arguments: 
  /home/lotus/.nvm/versions/node/v6.10.0/bin/node /usr/share/yarn/bin/yarn.js global add webpack

PATH: 
  /home/lotus/.nvm/versions/node/v6.10.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/lotus/.npm/bin

Yarn version: 
  0.20.3

Node version: 
  6.10.0

Platform: 
  linux x64

npm manifest: 
  No manifest

yarn manifest: 
  No manifest

Lockfile: 
  No lockfile

Trace: 
  Error: connect ETIMEDOUT 104.16.62.173:443
      at Object.exports._errnoException (util.js:1022:11)
      at exports._exceptionWithHostPort (util.js:1045:20)
      at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1087:14)

~Interestingly enough, the error seems to only happen with global installs...~

Nevermind, that was a fluke.

I tried switching to node v6.10.0 and apt-get purge yarn && apt-get install yarn.

Even on node v7.6.0, yarn global add nodemon works. This also works on node v6.10.0.

Same error, otherwise -- yarn-error.log attached for version 6.10.0 after installing nodemon
yarn-error.log.txt

adding the -D flag allows the operation to complete, but webpack does not install. It's not present at ~/.config/yarn/global/node_modules/.bin/webpack and cannot be run. Same with -O and -P

Other things like sudo,--modules-folder,--cache-foloder,--global-folder` also have no effect. Still getting timeouts

So do i ,but when i exit my xx-net ,and it success downloaded!! Try to exit your vpn and others!

No VPN here. Straight through to my router -> modem -> Comcast. Here's my network speed: http://www.speedtest.net/my-result/6095665032

And my ping results:

lotus@InfiniteDesktop:~$ ping google.com
PING google.com (172.217.7.14) 56(84) bytes of data.
64 bytes from lga25s56-in-f14.1e100.net (172.217.7.14): icmp_seq=1 ttl=53 time=39.9 ms
64 bytes from lga25s56-in-f14.1e100.net (172.217.7.14): icmp_seq=2 ttl=53 time=40.8 ms
64 bytes from lga25s56-in-f14.1e100.net (172.217.7.14): icmp_seq=3 ttl=53 time=41.0 ms
64 bytes from lga25s56-in-f14.1e100.net (172.217.7.14): icmp_seq=4 ttl=53 time=38.1 ms
64 bytes from lga25s56-in-f14.1e100.net (172.217.7.14): icmp_seq=5 ttl=53 time=41.5 ms
64 bytes from lga25s56-in-f14.1e100.net (172.217.7.14): icmp_seq=6 ttl=53 time=41.1 ms
64 bytes from lga25s56-in-f14.1e100.net (172.217.7.14): icmp_seq=7 ttl=53 time=39.8 ms
64 bytes from lga25s56-in-f14.1e100.net (172.217.7.14): icmp_seq=8 ttl=53 time=40.1 ms
64 bytes from lga25s56-in-f14.1e100.net (172.217.7.14): icmp_seq=9 ttl=53 time=43.0 ms
64 bytes from lga25s56-in-f14.1e100.net (172.217.7.14): icmp_seq=10 ttl=53 time=40.0 ms
64 bytes from lga25s56-in-f14.1e100.net (172.217.7.14): icmp_seq=11 ttl=53 time=40.1 ms
64 bytes from lga25s56-in-f14.1e100.net (172.217.7.14): icmp_seq=12 ttl=53 time=42.6 ms
64 bytes from lga25s56-in-f14.1e100.net (172.217.7.14): icmp_seq=13 ttl=53 time=39.8 ms
64 bytes from lga25s56-in-f14.1e100.net (172.217.7.14): icmp_seq=14 ttl=53 time=40.8 ms
64 bytes from lga25s56-in-f14.1e100.net (172.217.7.14): icmp_seq=15 ttl=53 time=40.1 ms
64 bytes from lga25s56-in-f14.1e100.net (172.217.7.14): icmp_seq=16 ttl=53 time=41.6 ms
64 bytes from lga25s56-in-f14.1e100.net (172.217.7.14): icmp_seq=17 ttl=53 time=41.4 ms
64 bytes from lga25s56-in-f14.1e100.net (172.217.7.14): icmp_seq=18 ttl=53 time=39.8 ms
64 bytes from lga25s56-in-f14.1e100.net (172.217.7.14): icmp_seq=19 ttl=53 time=38.1 ms
64 bytes from lga25s56-in-f14.1e100.net (172.217.7.14): icmp_seq=20 ttl=53 time=48.8 ms
--- google.com ping statistics ---
20 packets transmitted, 20 received, 0% packet loss, time 19027ms
rtt min/avg/max/mdev = 38.121/40.962/48.881/2.185 ms

@chadfurman, are you sure you used --network-concurrency 1 ?

yarn add jest --network-concurrency 1

On Fri, Mar 3, 2017 at 8:32 PM, Antoine Pham notifications@github.com
wrote:

yarn add jest --network-concurrency 1

Don't know why, but it's working now. To be fair, I'm not on my home
network. Maybe that matters. Maybe I wasn't typing the command
correctly. Not sure.

Thanks for following up.


chads.website
LinkedIn https://linkedin.com/in/chadfurman
Github https://github.com/chadfurman
Twitter https://twitter.com/chadfurman


I have a lot of these errors today while building on CircleCI. Every build fails. What's interesting if I do "retry without cache" then it works

@zyzop - i'm experiencing same

I decided to give yarn a try, and immediately ran into this problem. Heh.

--network-concurrency 1 does indeed bypass it.

Does yarn do retries for timed out requests?

Still having this problem with yarn v0.24.5
--network-concurrency 1 solves the problem, still annoying though...

Same problems here. Tried with node 6.11.0 & 8.1.0, yarn 0.24.x & 0.26.x, with & without --network-concurrency 1. All under linux (64 bit).

anyone can tell me why?

It's an issue with our network adapter I believe. It can't handle all the connections yarn is making.


From: 2suyun notifications@github.com
Sent: Friday, July 7, 2017 1:57 AM
To: yarnpkg/yarn
Cc: Antoine Pham; Mention
Subject: Re: [yarnpkg/yarn] ETIMEOUT 104.16.59.173:443 (#944)

anyone can tell me why?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/yarnpkg/yarn/issues/944#issuecomment-313627044, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AHDm5CH4yN0N1fFV-rDYFxV9FjQgMAJbks5sLfMDgaJpZM4KVUDY.

I'm curious whether everyone that uses yarn just always uses --network-concurrency 1 with every command every time they use it, or if it just works fine for some people. This issue is one of the biggest things standing in my way to using yarn (the other being working with Sinopia servers), and all of my coworkers and friends I have brought it up to have said the same thing.

I have tried now and again over the past year and the problem still exists---is it fixable as far as can be determined? Sorry if it sounds like I'm just complaining... ultimately I really want to use yarn, as the few times it _has_ worked for me, it did so incredibly fast!

@rosshadden This can be mostly eliminated by using a global yarn-offline-mirror outside of your repository.

Also, we see this issue as well and we use Sinopia. Might be related.

I'm having the same issue but my cause is much simpler. My network firewall and network packet scanners are designed to block applications from making connections to raw IP addresses. Even if i connect it to the proxy server, again, the proxy is designed to block raw ip connections. if its not on a verifiable dns name, i can't connect.

Now, with that said, i am in the process of building out an Artifactory server to act as a file cache to manage and serve files inside the enterprise. How do i get this thing to try to pull the file from our artifactory server instead?

I was only having this issue on my company site where and were assuming it was due to network connection issues. We had some unrelated network problems in the past and was reasonable to assume that it was the case for a lot of yarn timeout errors.

Recently I stumbled upon this github issue and out of curiosity started using a VPN connection whenever I need to yarn add or yarn install and haven't had this problem again.

Before the VPN attempt I also tried --network-concurrency 1 but still got intermittent ETIMEDOUT errors

Is it possible that this problem to be related to networks with poor network link load balancing configurations and how yarn (or Cloudflare?) handles networks changes for consecutive connections?

I was experiencing the same error, in my case it it was only when trying to to yarn add from a Docker container.

Restarting Docker fixed my problem.

@scphantm

I'm curious whether everyone that uses yarn just always uses --network-concurrency 1 with every command every time they use it, or if it just works fine for some people. This issue is one of the biggest things standing in my way to using yarn (the other being working with Sinopia servers), and all of my coworkers and friends I have brought it up to have said the same thing.

We have been using Yarn in multiple places and companies without this setting so I think it is just some people having the issue.

I have tried now and again over the past year and the problem still exists---is it fixable as far as can be determined? Sorry if it sounds like I'm just complaining... ultimately I really want to use yarn, as the few times it has worked for me, it did so incredibly fast!

This definitely doesn't sound like complaining but a genuine question and is very much appreciated :)

I have a few proposals:

  1. Use https://yarnpkg.com/en/docs/yarnrc#toc-cli-arguments with --install.network-concurrency 1 in your .yarnrc file and never pass it again manually.
  2. We add a network-concurrency setting to the .yarnrc file and you set that, applies to everything.
  3. We make Yarn "smarter" about this and if we start getting X number of ETIMEDOUT errors in a certain amount of time or Y number or just get them back to back, we reduce the concurrency dynamically.

What do you think? (/cc @arcanis)

@felipesabino

Is it possible that this problem to be related to networks with poor network link load balancing configurations and how yarn (or Cloudflare?) handles networks changes for consecutive connections?

I honestly don't think this is related to Cloudflare. It sounds like poor network config or poor firewall config.

Connecting with a VPN or yarn add -D webpack --network-concurrency 1 solved it. The second one took a lot of time to install.

--network-concurrency 1 solved it for me, wanted to try yarn out but this issue has not been solved yet looking at the thread

This should be resolved with the latest version with #4447. If not please file a new issue since this one got a bit crowded and it is not clear what needs to be done.

I have the exact same issue and I've been struggling for few weeks now. This only happens inside a Docker container, on my home network, and I'm running windows. I get ECONNREFUSED after a whole bunch of packages have been downloaded and those errors can happen at any point in time.

The interesting thing is that it only happens on my home network, not at work ( similar to @ chadfurman last post ). I tried disabling my modem's firewall, AV, windows firewall, playing around with network settings, trying every single trick I found on the web related to Docker, npm, DNS or yarn, and yet none of the solutions worked for me.

I haven't tried --network-concurrency 1 yet, so if this does work then I can finally leave this error-hell behind.

Looks like network-concurrency fixed my issue, maybe network-concurrency being 8 by default is not an optimal solution? Perhaps some sort of fallback or a message would be handy to prevent future users from getting dragged into this confusing issue?

Also, I have a pretty good connection, and once again, it works outside of docker. Somehow Docker+ my home network = ECONNREFUSED 151.101.36.162:443.

--edit--
Also putting the following in my hosts file got rid EAI_AGAIN which I started to get after my ECONNREFUSED bug got fixed.

151.101.36.162 registry.npmjs.com
151.101.36.162 registry.npmjs.org

@Xerios this should be fixed with newer versions of Yarn since it comes with a built-in DNS cache. If you are already using the latest version, would you mind opening a new issue with more details?

Created new issue https://github.com/yarnpkg/yarn/issues/5299, I'll check it out with the latest yarn build (1.4.x) this evening to see if the issue still persists.

--network-concurrency 1 is not solve my problem

Error:
$ yarn install
yarn install v1.10.1
[1/4] Resolving packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/expo: connect ETIMEDOUT 104.16.18.35:443".

Solução:
Não executar o yarn install com o telefone conectado no USB.

Não faço ideia do motivo do erro.

Still getting ETIMEDOUT sometimes on yarn 1.10.1... I wonder should there be a setting to specify amount of retries? Cause I believe it can be just solved by retrying long enough..

add this is terminal "yarn add -D webpack --network-concurrency 1"

In my case the reason was the local firewall (MacOS: Little Snitch)

Was this page helpful?
0 / 5 - 0 ratings