1834690 Members
2285 Online
110069 Solutions
New Discussion

ECONNREFUSED

 
SOLVED
Go to solution
Tom Dawson
Regular Advisor

ECONNREFUSED

Hi,

I have a D330 running v11.11. I've installed a vendors sw application that connects via the internet to their server to upload transaction data.

Their app uses ssl. So I have verified that port 443 is open on our firewall.

When I test their app, it generates the following in their log file:

ECONNREFUSED - Connection refused.
Connection failed -- error code -239.

The error is generated so fast that I'm fairly certain that nothing has actually left my D330.

I looked in /usr/include/sys/errno.h and found this:

# define ECONNREFUSED 239 /* Connection refused */

I'm confused that this entry is commented out.

Can someone point me to a document that might explain what is involved in a ECONNREFUSED error?

TIA,
Tom
3 REPLIES 3
Steven Gillard_2
Honored Contributor

Re: ECONNREFUSED

A connection refused means that the remote system is not listening on the port you're trying to establish a connection with. From a TCP point of view this is the error you'll get when the remote system responds to a SYN with a RST.

So, whatever service you're trying to connect to is not running on the remote system. I doubt its a firewall issue - if the firewall was dropping the packets you would have got a timeout, not a connection refused.

Regards,
Steve
rick jones
Honored Contributor

Re: ECONNREFUSED

as has been pointed-out, an ECONNREFUSED will happen when the initial SYN segment (triggered when you call connect()) receives a RST segment in response rather than a SYN|ACK.

indeed, a firewall could in theory (if not likely in practice) be configured to return a RST.

it is also possible that the remote application is not running and listening on that port number.

if the remote app is running under a windows variant, MS also will return an RST (bogusly in most IETF types opinions :) if the apps listen queue is full.

there is no rest for the wicked yet the virtuous have no pillows