I\'m making an http
request with the node.js
client, and I get an ECONNREFUSED
error. When I make what appears to be the same request
I exactly faced the same issue where I was accessing a third party url. I tried using dns (subdomain.domain.com) and ip (XXX.XXX.XXX.XXX) both but it did not work.
After some struggle, later I realized that this was a problem at server (subdomain.domain.com) end which was not responsive and gone down.
I disagree this is a problem with localhost / 127.0.0.1 (or domain name vs IP address). ( In above case, it's surely a case of incorrect host mapping)