Solved

NodeJS - { [Error: socket hang up] code: 'ECONNRESET' }

Posted on 2013-01-14
3
2,595 Views
Last Modified: 2013-02-15
Hi,

i'm getting data via http get method Node JS but i get this error often "{ [Error: socket hang up] code: 'ECONNRESET' }" error on console.

What do you think the problem?
0
Comment
Question by:ahmettiryaki
  • 2
3 Comments
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 38775475
0
 

Author Comment

by:ahmettiryaki
ID: 38775502
@COBOLdinosaur in the link you posted, i couldn't find my problem. They only explain what is the mean of error.
0
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 500 total points
ID: 38775624
The problem is on the other end.  It is closing the connection.  So you probably need to look at logs on the other side to see why it is closing.

ECONNRESET means the connection has received a ReSeT (RST) segment
(ostesibly) from the remote TCP. There are a multitude of reasons
such a segment could be received, including, but not limited to:

the remote abused SO_LINGER and did an abortive close of the
connection

your application sent data which arrived after the remote called
shutdown(SHUT_RD) or close()

the remote TCP hit a retransmission limit and aborted (yes, if the
data segments weren't getting through the chances of the RST making
it are slim, but still non-zero)
*) there was some actual TCP protocol error between the two systems

9 times out of ten if the server _application_ terminates
(prematurely) the normal close() which happens on almost all platforms
will cause TCP to emit a FINished (FIN) segment. That would then be a
recv/read return of zero at your end. Of course if your application
ignored that and then tried to send something, that brings us to the
second bullet item above.

BTW it is not a rare occurrence for these kind of connects to go down frequently.

Cd&
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

This article discusses how to create an extensible mechanism for linked drop downs.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now