python – Errno 10061 : No connection could be made because the target machine actively refused it ( client – server )

python – Errno 10061 : No connection could be made because the target machine actively refused it ( client – server )

10061 is WSAECONNREFUSED, connection refused, which means there was nothing listening at the IP:port you tried to connect to.

There was a firewall product around the year 2000 that issued refusals instead of ignoring incoming connections to blocked ports, but this was quickly recognised as an information leak to attackers and corrected or withdrawn.

Hint: actively refused sounds like somewhat deeper technical trouble, but…

…actually, this response (and also specifically errno:10061) is also given, if one calls the bin/mongo executable and the mongodb service is simply not running on the target machine. This even applies to local machine instances (all happening on localhost).

Always rule out for this trivial possibility first, i.e. simply by using the command line client to access your db.

See here.

python – Errno 10061 : No connection could be made because the target machine actively refused it ( client – server )

Using the examples from: https://docs.python.org/3.2/library/socketserver.html
I determined that I needed to set the HOST port to the machine I had the server program running on. So TCPServer on 192.168.0.1 HOST = TCPServer IP 192.168.0.1 then I had to set the TCPClient side to point to the TCPServer IP. So the TCPClient HOST value = 192.168.0.1 – Sorry, thats the best I can describe it.

Leave a Reply

Your email address will not be published. Required fields are marked *