Python ConnectionRefusedError: [Errno 61] Connection refused

This may not answer your original question, but I encountered this error and it was simply that I had not starting the server process first to listen to localhost (127.0.0.1) on the port I chose to test on. In order for the client to connect to localhost, a server must be listening on localhost.

Leave a Comment