Skip to content


Always get connection reset (ECONNRESET) error #467

caarlos0 opened this Issue · 23 comments

Don't matter what command I try, I always got this same error with bower:

$ bower search angular 
bower error tunneling socket could not be established, cause=read ECONNRESET

I didn't found bower logs (perhaps I looked in the wrong place), so, I don't have any idea about why am I getting this error.

I'm behind a proxy (cntlm), which is exported in my ENV. npm works as expected. Just bower don't.


$ env | grep -i proxy

$ bower -v

$ npm -v

$ node -v

OS is an Ubuntu Linux.

If I could give any more info, please ask. I'll be glad to help.


Bower member

Please cross link if you ask the same question in other places:


Sorry, Just did it. The wiki is maintained by the community. So if there aren't any up to date instructions, we recommend you to explore the solution yourself and hopefully contribute your findings back!

@caarlos0 caarlos0 closed this
@caarlos0 caarlos0 reopened this

(didn't meant to close it, damn tab)

Bower member

@caarlos0 do you have the strict-ssl option disabled in npm?


I had it enabled, then I disable it, and still not working.


Bower member

Humm so it works for npm even with strict-ssl enabled, so I think it's not related with certificates per say..


Perhaps not. It's probably this shitty corporate proxy... thanks anyway.

Bower member

@caarlos0 Bower canary was released and it now supports a few things that mght help:

  • strict-ssl
  • ca

Read about those at the bottom of `

You can install it with npm install -g bower-canary. Please uninstall the old bower before.

@satazor satazor closed this

If it's any help, I'm facing the same problem in the same conditions (cntlm to bypass corporate proxy). I used bower-canary as @satazor suggested. Didn't work until I had the following in my .bowerrc

    "proxy" : "http://localhost:3131",
    "https-proxy" : "http://localhost:3131",
    "strict-ssl": false

Knowing that 3131 is my proxy port. Don't forget to execute git config --global url."https://".insteadOf git:// when behind a corporate proxy which blocks git protocol if needed


Thanks @thebignet! Finally managed it to work =D



This doesn't work for me, have tried the above suggestions.

Have also cross-posted to Stackoverflow, but not sure how active that is for Bower stuff.

When executing most bower commands (search and install as a start), I get the following:

D:\>bower search jquery
bower retry         Request to failed with ECONNRESET, retrying in 1.2s
bower retry         Request to failed with ECONNRESET, retrying in 2.5s
bower retry         Request to failed with ECONNRESET, retrying in 6.8s
bower retry         Request to failed with ECONNRESET, retrying in 15.1s
bower retry         Request to failed with ECONNRESET, retrying in 20.3s
bower ECONNRESET    Request to failed: tunneling socket could not be established, cause=Parse Error

Relevant points:

  • I can browse to and it returns a full json response.
  • I can use git to clone, both using the git:// protocol and http(s).
  • I can use NPM directly without these issues (once I've set up my .npmrc file with proxy details)
  • I've tried using Fiddler to determine what's being blocked, but it doesn't detect any calls from the Bower command. I can see calls from NPM commands in Fiddler.
  • I've tried the above suggestion from @thebignet, but with no success.

Any ideas? I'm using Windows 7.


@marcuswhit Try adding your username and userpassword to these lines in .bowerrc . It worked for me!

    "proxy" : "http://<username>:<userpassword>@<proxyipaddress>:<port>",
    "https-proxy" : "http://<username>:<userpassword>@<proxyipaddress>:<port>",
    "strict-ssl": false

As @thebignet suggested, modified .bowerrc file

    "proxy" : "http://localhost:3131",
    "https-proxy" : "http://localhost:3131",
    "strict-ssl": false

and execute command as @satazor suggested:
npm install -g bower-canary
with sudo, now it works, thanks for your guys.


Incase anybody is still having issues (despite the above), try adding:-

"registry": ""


    "directory": "library",
    "registry": "",
    "proxy" : "http://user:pass@host:8080",
    "https-proxy" : "http://user:pass@host:8080",
    "strict-ssl": false

Sorted my issues.


Thx @gaving adding the registry worked for me!


Just wanted to post that adding my username and password to the proxy URLs in .bowercc also fixed it for me.


The proxy, https-proxy and strict-ssl settings in .bowerrc worked fine for our linux machines, but we are seeing the ECONNRESET issues in Windows (specifically Windows 7), no matter what. If "registry": "" is used, I get an Invalid protocol error.

I was able to get it to work in Windows by removing the proxy and https-proxy options, and adding HTTP_PROXY and HTTPS_PROXY environment variables. This was the only way it seemed to work properly.


@nanowizard Adding HTTP_PROXY and HTTPS_PROXY env variables worked for me on Windows 7. Thanks!


I don't know what I am missing here, but when I try to scaffold 'yo gulp-angular', .bowerrc always gets overwritten. It asks me in the beginning about the conflict, but then overwrites it no matter what I choose. Please help


I solved it by using Git bash cmd on windows and adding:
export http_proxy="yourproxy:port"


Adding the registry entry in addition to the proxies led to less failures and eventually working so many thanks @gaving


At my company, we the retry every now and then, and I have no idea why. It seems to go away after an hour. I'm not sure if it's our side or theirs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.