Yarn: Get ECONNREFUSED 104.16.62.173:443

Created on 30 Nov 2017  ยท  7Comments  ยท  Source: yarnpkg/yarn

Do you want to request a feature or report a bug?

bug

Description

Since a few days, when running $ yarn in my projects, I get this error:

yarn install v1.3.2
[1/5] ๐Ÿ”  Validating package.json...
[2/5] ๐Ÿ”  Resolving packages...
[3/5] ๐Ÿšš  Fetching packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/@frctl/mandelbrot/-/mandelbrot-1.2.0.tgz: connect ECONNREFUSED 104.16.62.173:443".
info If you think this is a bug, please open a bug report with the information provided in "/Users/cedricaellen/Projects/foehn/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

If I run several time the command, this not always the same package how is mentionned.
756ab9498466909b2b7b7a1d44804d5c _image 2017-11-30 at 2 55 28 pm

What is the expected behavior?

The commande should run smoothly.
Last week everything was working ๐Ÿ‘Œ and I have not done any change.

Versions

Investigations

I'm behind a corporate proxy (yeah!).

If I ping 104.16.62.173 I get this

$ ping 104.16.62.173
PING 104.16.62.173 (104.16.62.173): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
Request timeout for icmp_seq 4
...

When I visite http://104.16.62.173
image 2017-11-30 at 2 48 38 pm

When I visite https://104.16.62.173, I get a ssl_error_bad_cert_domain error page
image 2017-11-30 at 2 50 15 pm

triaged

Most helpful comment

I manage to fix my problem.

As I've said, I'm behind a corporate proxy (๐Ÿ’ฉ). So I use a local proxy (Charles) to connect to the corporate proxy. So, everything is set to http://localhost:3128.

We use a Nexus Repository Manager for npm package.
My npm settings are

# npm config
npm config set registry http://nexus.company.ch/folder1/folder2/
npm config set @types:registry=https://registry.npmjs.org
npm config set //nexus.company.ch/folder1/folder2/:_authToken=xxx

Everything was working fine since last week with only this npm config.

To fix my problem, I've set a proxy and https-proxy config for yarn.

$ yarn config set proxy http://localhost:3128
$ yarn config set https-proxy http://localhost:3128

And now, everything work fine again.


For me, the problem is fixed and this issue can be closed.

@rally25rs @bestander if you want to investigate more about this problem of yarn not following npm config, you can keep it open.

All 7 comments

ho! and I forget to mention that $ npm install work ๐Ÿ‘Œ. (Don't know if it helps)

I believe the in-browser cert error is because the cert is registered to the domain name, not the IP address, so it will always appear invalid when trying to navigate by IP.

Is this still an issue? I can manually download all those URLs and yarn add them

~/Projects/yarn-test : yarn add @allmarkedup/fang
yarn add v1.3.2
[1/4] ๐Ÿ”  Resolving packages...
[2/4] ๐Ÿšš  Fetching packages...
[3/4] ๐Ÿ”—  Linking dependencies...
[4/4] ๐Ÿ“ƒ  Building fresh packages...
success Saved lockfile.
success Saved 1 new dependency.
โ””โ”€ @allmarkedup/[email protected]
โœจ  Done in 1.88s.

The yarn registry is pretty much just a proxy to the npm registry, but sometimes it falls down for a few minutes.

thanks for your help @rally25rs but the problem is still there.

cedricaellen at imac-de-cedric in ~/Projects/foehn on master [$]
$ yarn
yarn install v1.3.2
[1/5] ๐Ÿ”  Validating package.json...
[2/5] ๐Ÿ”  Resolving packages...
[3/5] ๐Ÿšš  Fetching packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz: connect ECONNREFUSED 104.16.61.173:443".
info If you think this is a bug, please open a bug report with the information provided in "/Users/cedricaellen/Projects/foehn/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

I manage to fix my problem.

As I've said, I'm behind a corporate proxy (๐Ÿ’ฉ). So I use a local proxy (Charles) to connect to the corporate proxy. So, everything is set to http://localhost:3128.

We use a Nexus Repository Manager for npm package.
My npm settings are

# npm config
npm config set registry http://nexus.company.ch/folder1/folder2/
npm config set @types:registry=https://registry.npmjs.org
npm config set //nexus.company.ch/folder1/folder2/:_authToken=xxx

Everything was working fine since last week with only this npm config.

To fix my problem, I've set a proxy and https-proxy config for yarn.

$ yarn config set proxy http://localhost:3128
$ yarn config set https-proxy http://localhost:3128

And now, everything work fine again.


For me, the problem is fixed and this issue can be closed.

@rally25rs @bestander if you want to investigate more about this problem of yarn not following npm config, you can keep it open.

I followed @alienlebarge but it did work for me and I am getting the same error. I am getting this after i upgraded to version 1.9.2

me too

My yarn is 1.9.4

I just change my node version to 12 with nvm use 12 and solved it.

Was this page helpful?
0 / 5 - 0 ratings