Solved

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

Posted on 2013-01-14
3
3,004 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
This article discusses how to create an extensible mechanism for linked drop downs.
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…

740 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