Penguin
Blame: ECONNREFUSED
EditPageHistoryDiffInfoLikePages
Annotated edit history of ECONNREFUSED version 2, including all changes. View license author blame.
Rev Author # Line
1 KevinGeorge 1 !!! Connection refused
2
3 You would usually run into this when attempting to use connect(2) a socket(2).
4 "Connection refused" means that the remote host rejected your connection attempt.
5 This usually means that the host was not listening on the port you attempted to
6 connect on, or there is a firewall preventing you from connecting to that port.
2 PerryLorier 7
8 You can get this on connectionless protocols such as [UDP] if the protocol returned an [ICMP] error message such as DestinationPortUnreachable. Note that because [UDP] is connectionless the nexttime you send(2)/recv(2) a packet on the same socket you may get the error, not immediately when you send the packet. Thus if you get this error from send(2) (or recv(2)) then it is likely that the packet you __just__ sent was fine, but one of the packets you sent earlier returned an error message, however it's impossible to tell which packet exactly it was (unless you open a new socket per packet...)