Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Connection Timeout While Downloading #1785

Closed
tanerci opened this issue Nov 3, 2016 · 10 comments
Closed

Connection Timeout While Downloading #1785

tanerci opened this issue Nov 3, 2016 · 10 comments

Comments

@tanerci
Copy link

tanerci commented Nov 3, 2016

We are getting the below issue when trying to run ci-builds. This was running 24 hrs ago and nothing was touched. I don't know if this is a DynDns issue with GitHub. Any help is appreciated.

This package is being installed as a dependency for Grunt-Sass 1.0.0

Thank you.

  • NPM version 3.7.3 - Node version 5.9.1 - Node Process (node -p process.versions):
    http_parser: '2.6.2
    node: '5.9.1',
    v8: '4.6.85.31',
    uv: '1.8.0',
    zlib: '1.2.8',
    ares: '1.10.1-DEV',
    icu: '56.1',
    modules: '47',
    openssl: '1.0.2g'

Node Platform win32 - Node architecture x64 - node-sass version [email protected]
[email protected] install E:\workspace\client\node_modules\node-sass
node scripts/install.js

Start downloading binary at https://github.com/sass/node-sass/releases/download/v3.11.1/win32-x64-47_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v3.11.1/win32-x64-47_binding.node":

connect ETIMEDOUT 192.30.253.113:443

Timed out whilst downloading the prebuilt binary

@jeremy-moffitt
Copy link

We're having the same issue with the linux version

2016-11-03 21:52:34.308 | Start downloading binary at https://github.com/sass/node-sass/releases/download/v3.11.1/linux-x64-47_binding.node

2016-11-03 21:53:34.346 | Cannot download "https://github.com/sass/node-sass/releases/download/v3.11.1/linux-x64-47_binding.node":
2016-11-03 21:53:34.347 |
2016-11-03 21:53:34.347 | ETIMEDOUT
2016-11-03 21:53:34.347 |
2016-11-03 21:53:34.347 | Timed out attemping to establish a remote connection
2016-11-03 21:53:34.347 |
2016-11-03 21:53:34.347 | Hint: If github.com is not accessible in your location
2016-11-03 21:53:34.347 | try setting a proxy via HTTP_PROXY, e.g.
2016-11-03 21:53:34.347 |
2016-11-03 21:53:34.348 | export HTTP_PROXY=http://example.com:1234
2016-11-03 21:53:34.348 |
2016-11-03 21:53:34.348 | or configure npm proxy via
2016-11-03 21:53:34.348 |
2016-11-03 21:53:34.348 | npm config set proxy http://example.com:8080
2016-11-03 21:53:34.556 |

npm-debug.log attached:

npm-debug.zip

@xzyfer
Copy link
Contributor

xzyfer commented Nov 3, 2016

We recently implemented a 60s timeout because we had downloads hanging for hours. Unfortunately the way request handle timeouts isn't great. Ideally what we want is a timeout being data being received rather than an overall connection timeout.

@djusv
Copy link

djusv commented Nov 4, 2016

I was also having this issue also but I did some quick digging and I think the warning message is a bit confusing. The message states :

2016-11-03 21:53:34.347 | Hint: If github.com is not accessible in your location
2016-11-03 21:53:34.347 | try setting a proxy via HTTP_PROXY, e.g.
2016-11-03 21:53:34.347 |
2016-11-03 21:53:34.348 | export HTTP_PROXY=http://example.com:1234

But the system environment proxies are being completely ignored. Looking at merged code from #1725.

So people who before who were using system environment proxies <3.11.0 and now are upgrading to >=3.11.x will encounter this issue (timeout). I experienced this when updating gulp-sass.

@tanerci
Copy link
Author

tanerci commented Nov 4, 2016

@xzyfer,
Is it possible to increase timeout duration to 600s or something which would prevent fails? This will still help with this other issue for downloads hanging for hours.

It looks like we started to have this issue when this change was merged.

Thank you very much for your response.

@rasselin
Copy link

rasselin commented Nov 4, 2016

If the system proxies are being ignored & needed to make the connection, then no value for timeout will help.

@tanerci
Copy link
Author

tanerci commented Nov 4, 2016

@rasselin,
The issue is not timeout then. It's ignoring the proxy. I thought recent timeout implementation caused this issue, but checking the code, there is a proxy function update/change not a timeout? And looks like @rasselin and @djusv are right. Proxy is being ignored.

@xzyfer ,
Is there way to resolve this, soon?
Thank you

@tanerci
Copy link
Author

tanerci commented Nov 4, 2016

We also did a scan on our proxies during build process and looks like the request never even made to the proxy.

@tanerci
Copy link
Author

tanerci commented Nov 4, 2016

For anyone else who is having similar issue, we added NPM proxies for the service account for our ci-builds and we get around the issue for now.

Thank you @xzyfer, @rasselin and @djusv for your comments.

npm config set proxy [proxy]

xzyfer added a commit that referenced this issue Nov 5, 2016
In #1725 we started setting `proxy: ''` to defer proxy resolution
logic to request. However `request` uses `hasOwnProperty` rather
than falsey checks to determine if an option has been set. This
caused `request` to believe were configuring a proxy so it didn't
do it's own proxy resolution.

Fixes #1785
Fixes #1787
xzyfer added a commit that referenced this issue Nov 5, 2016
In #1725 we started setting `proxy: ''` to defer proxy resolution
logic to request. However `request` uses `hasOwnProperty` rather
than falsey checks to determine if an option has been set. This
caused `request` to believe were configuring a proxy so it didn't
do it's own proxy resolution.

Fixes #1785
Fixes #1787
xzyfer added a commit that referenced this issue Nov 5, 2016
In #1725 we started setting `proxy: ''` to defer proxy resolution
logic to request. However `request` uses `hasOwnProperty` rather
than falsey checks to determine if an option has been set. This
caused `request` to believe were configuring a proxy so it didn't
do it's own proxy resolution.

Fixes #1785
Fixes #1787
xzyfer added a commit that referenced this issue Nov 5, 2016
In #1725 we started setting `proxy: ''` to defer proxy resolution
logic to request. However `request` uses `hasOwnProperty` rather
than falsey checks to determine if an option has been set. This
caused `request` to believe were configuring a proxy so it didn't
do it's own proxy resolution.

Fixes #1785
Fixes #1787
@xzyfer
Copy link
Contributor

xzyfer commented Nov 5, 2016

This should be fixed with v3.11.2

@rasselin
Copy link

rasselin commented Nov 7, 2016

Thanks, works for us again.

@nschonni nschonni added this to the 3.11.2 milestone Nov 8, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants