Not too long ago I asked this question. I was very surprised that no one came up with any answers, so I am pretty sure my issue is fairly rare. Yesterday, as I was self-diagnosing the issue, I began connecting the dots. My Twisted TCP server won't work, IDLE fails at startup because of a "Socket Error" and returns the message: "IDLE Subprocess: socket error: No connection could be made because the target machine actively refused it", and I get this same error when I try running a (local) TCP client connecting to a (local) TCP server.
So I came to the conclusion Yesterday, that these weren't just individual issues, but rather a larger issue with creating and running TCP endpoints using Python Sockets. Keep in mind, UDP servers and clients that I run both on a local network and locally work, so I don't think it's a problem with the Socket module as a whole, but just the TCP side of things.
Some info on my computer: Windows 64bit, running Python 2.7.9 (for some reason, 32bit), Laptop connected to a network via (built in) Wireless card. ISP is Comcast (if it makes a difference), and the Router/Modem (it's an all-in-one) is a TechniColor provided by Comcast (again, if it makes a difference).
Things I've tried:
- Reset my .../etc/hosts file
- Reinstalled Python 2 months ago (while trying to troubleshoot)
- Turned off all Firewall (I only have 1)
- No antivirus other than Microsoft Security Essentials
- The issue was still present when I still had Bitdefender installed, but I installed it to be sure
I also went through a small troubleshooting session on the previous thread I mentioned earlier. The biggest error I get when using TCP Sockets is:
socket.error: [Errno 10061] No connection could be made because the target machine actively refused it
.
So, anyone have an idea as to what's wrong here? Thanks.
EDIT: Looks like I missed something, the port is 45002, which is out of the range of default Windows ports, and I am pretty sure nothing uses it, as I have been able to run a UDP server on that port with good results. The port is also port forwarded, just in case.