Skip to content
Advertisement

AWS Python socket client TimeoutError: [WinError 10060] A connection attempt failed

I have an aws ec2 instance where I am trying to create a server to bind with my windows application the ser works but whenever I try to connect to the server from the client on my pc it gives the following error:

JavaScript

Server.py

JavaScript

Client.py

JavaScript

The client code is running on my windows pc and the Server code is running on my aws-ec2 instance which is a Linux Os.

This is my inbound rules enter image description here

I have a kaspersky firewall in my client windows but Will it effect connecting to a server?

Advertisement

Answer

Assuming your instance is public as I guess you can ssh into it, you need to add inbound rule to the instance’s security group which allows connections to 5050 from 0.0.0.0/0 or better, from your home/work IP address.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement