question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"socket hang up" when using Proxy

See original GitHub issue

I am using a http proxy with speedtest-net like below:

var speedTest = require('speedtest-net');

speedTest.visual({maxTime: 15000, proxy: "http://127.0.0.1:7890"}, (err, data) => {
  console.dir(err, data);
});

Then got an error:

{ Error: socket hang up
    at createHangUpError (_http_client.js:322:15)
    at Socket.socketOnEnd (_http_client.js:425:23)
    at Socket.emit (events.js:187:15)
    at endReadableNT (_stream_readable.js:1094:12)
    at process._tickCallback (internal/process/next_tick.js:63:19) code: 'ECONNRESET' }

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
ddsolcommented, Feb 22, 2019

Probably be fixed in #82. If this is not the case, let me know and I will reopen.

0reactions
Fndroidcommented, Feb 22, 2019

works fine, thx

Read more comments on GitHub >

github_iconTop Results From Across the Web

Socket hangup while posting request to Node-http-proxy ...
I think the issue comes from the order of middleware. Using bodyParser before httpProxy will break the requests with JSON body ...
Read more >
NodeJS - What does socket hang up actually mean
When a socket hang up is thrown, one of two things happens: When you're a customer, When you send a request to a...
Read more >
Issue #527 · http-party/node-http-proxy - socket hang up
It happens predictably every time a connection is intentionally aborted by the client (can be quite often); There is no way to 'properly...
Read more >
502 Bad Gateway - Socket hang up | Apigee Edge
The error code [socket hang up][ECONNRESET] indicates that the target server has closed the connection with Edge Microgateway.
Read more >
Gulp - Fix to socket hang up using httpProxy - Michael Cranston
Adding simple error handling to your httpProxy will disallow the hangup and keep your sanity in check: var proxy = httpProxy.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found