Skip to content

Error: read ECONNRESE #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
testanull opened this issue Jul 19, 2017 · 6 comments · May be fixed by #9
Open

Error: read ECONNRESE #8

testanull opened this issue Jul 19, 2017 · 6 comments · May be fixed by #9

Comments

@testanull
Copy link

I got this error when run wsproxy
events.js:141
throw er; // Unhandled 'error' event
^

Error: read ECONNRESET
at exports._errnoException (util.js:907:11)
at TCP.onread (net.js:561:26)
After that, it crash
Do you have any solutions for this problems??
Tks!

@staaldraad
Copy link
Contributor

Hey!

I'm not too sure, looks like it's a problem in one of the import libraries, specifically net.js

Could you try binding to another port. I also just merged a PR that might contain a fix, if you don't mind testing with that.

@testanull
Copy link
Author

Thank you
But i still get that error :(
I have try on both my laptop and virtual machine
It still return that error after get the first request

@0xdevalias
Copy link

Not sure if this is strictly related, but just hit the following error, which crashed out the program:

events.js:163
      throw er; // Unhandled 'error' event
      ^

Error: getaddrinfo ENOTFOUND foo.example.com foo.example.com:443
    at errnoException (dns.js:28:10)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:73:26)

It was for a domain that doesn't currently have an A record. At this stage, not sure where it grabbed that from.. somewhere in the application I presume, it happened during a huge stream of other websocket messages.

@staaldraad staaldraad linked a pull request Nov 13, 2017 that will close this issue
@staaldraad
Copy link
Contributor

@0xdevalias is right, there was a missing error handler for the http.request

Thus any exception while trying to connect to a remote server, be it connection refused or DNS not resolving, the whole proxy would crash.

I've added an error handler and made a PR (#9). Otherwise my fork has an updated version: https://github.com/staaldraad/wsproxy

@0xdevalias
Copy link

0xdevalias commented Nov 13, 2017

@staaldraad Awesome! Thanks for that :3

@0xdevalias
Copy link

Running your updated version, seem to have managed to hit it again (or similar)

Trace
    at Server.<anonymous> (/Users/foo/sec/wsproxy/wsproxy.js:92:15)
    at emitTwo (events.js:106:13)
    at Server.emit (events.js:194:7)
    at parserOnIncoming (_http_server.js:563:12)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:99:23)

events.js:163
      throw er; // Unhandled 'error' event
      ^

Error: read ECONNRESET
    at exports._errnoException (util.js:1050:11)
    at TCP.onread (net.js:581:26)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants