-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
ECONNREFUSED when connecting locally #108
Comments
are you using listen(8000, function () { request('http://localhost:8000') }) that's probably what is happening, newer versions of node are really need you to wait for the listen callback to fire before connecting. closing until you respond. |
I get this same error, my node is running on 8081 and Im trying to POST to another service that is running on my local machine on 8080. I can post to external websites fine it seems. Any ideas? |
are you binding to |
I've enjoyed using request on a number of projects, but this problem has me stumped.
When attempting to use request to access a data-serving endpoint on my local machine on, say, port 3000, I get a ECONNREFUSED. Yet if I use a simple function using the http module, it processes normally.
Perhaps there is something wrong with my server code that would deny some header or agent set by this module, but I'm just not sure. I'm using Connect, which is pretty standard out of the box... any insight?
The text was updated successfully, but these errors were encountered: