https socket error (ECONNRESET, Connection reset by peer) #43

Closed
leebhm opened this Issue Apr 27, 2011 · 2 comments

2 participants

@leebhm

Hi, I come across this error when stress test node-http-proxy, using basic-proxy-https script.js

The test is based on a simple python script that use wget:

#!/usr/local/bin/python

import os,signal,sys

count = 0
while(count < 1000):
os.system("wget --no-check-certificate --secure-protocol=SSLv3 --spider 'https://172.168.1\
.19:8081/'");

node proxy will run for a while then will shutdown with error:

net.js:825
close(this.fd);
^
Error: ECONNRESET, Connection reset by peer
at Socket.destroy (net.js:825:5)
at Socket._onReadable (net.js:652:30)
at IOWatcher.onReadable as callback

@indexzero
nodejitsu member

I believe this to be a separate (but related) issue around HTTPS in node.js core. See: #36

@indexzero
nodejitsu member

This is resolved as of v0.5.6. Check the updated documentation for how to proxy HTTPS --> HTTP vs. HTTPS --> HTTPS. I have tried the following python script (a modified version of what you supplied) with these two target example scripts:

node examples/proxy-https-to-https.js
https proxy server started on port 8080
https server started on port 8000 
(...)
node examples/proxy-https-to-http.js
https proxy server started on port 8080
http server started on port 8000
(...)
#!/usr/bin/python
import os, signal, sys

count = 0
while(count < 1000):
  os.system("wget --no-check-certificate --secure-protocol=SSLv3 --spider 'https://localhost:8080/'");
  count += 1;

In both cases the node process never ends. We've been making a lot of improvements to HTTPS support (both standard HTTP and WebSockets) to node-http-proxy in the last several patch releases. Can you try updating to v0.5.6 and confirm? Thanks!

@indexzero indexzero closed this May 19, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment