frequent socket hangups
See original GitHub issue❤️ node
Error: socket hang up
at createHangUpError (http.js:1264:15)
at CleartextStream.socketCloseListener (http.js:1315:23)
at CleartextStream.EventEmitter.emit [as emit] (events.js:126:20)
at SecurePair.destroy (tls.js:938:22)
at process.startup.processNextTick.process._tickCallback [as _tickCallback] (node.js:244:9)
---------------------------------------------
at registerReqListeners (/home/vagrant/projects/thumbs/node_modules/knox/lib/client.js:38:7)
at Client.Client.putStream [as putStream] (/home/vagrant/projects/thumbs/node_modules/knox/lib/client.js:264:3)
at Client.putFile (/home/vagrant/projects/thumbs/node_modules/knox/lib/client.js:232:20)
at Object.oncomplete (fs.js:297:15)
looking into it, seems ridiculous to accuse s3 here, but it wouldn’t surprise me either way
Issue Analytics
- State:
- Created 11 years ago
- Comments:51 (32 by maintainers)
Top Results From Across the Web
NodeJS - What does "socket hang up" actually mean?
It means that socket does not send connection end event within the timeout period. If you are getting the request for cheerio via...
Read more >Receiving Socket Hang Up error often - Help - Fauna Forums
I'm calling Fauna from an EC2 using the Fauna NPM package and have been creating a new Fauna client each time before making...
Read more >Hang in There! (A solution to socket hang up) - Medium
The most common solution suggested, seemed to think setting a setTimeOut() on the request function would solve the problem. I didn't think that ......
Read more >NodeJS - What does socket hang up actually mean - Edureka
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 >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. This can be ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I know this isn’t StackOverflow, but for anyone coming into this issue in the future, make sure you call
.end()
on theknoxClient.get()
call.IE this will return a socket hangup…
and this will not
A pretty obvious coding error, but one that I usually end up running into when I add Knox to a new project. 😆
FWIW, I’ve had this problem when I was passing the request object into a callback function in Loopback. Long story short, the only thing that “fixed” the problem was to do
getFile(url, (err, res) => {callback(null, res)})
- in that way the data is streamed correctly.