Python TCP Sockets Not Working Properly -
not long ago asked this question. surprised no 1 came answers, pretty sure issue rare. yesterday, self-diagnosing issue, began connecting dots. twisted tcp server won't work, idle fails @ startup because of "socket error" , returns message: "idle subprocess: socket error: no connection made because target machine actively refused it", , same error when try running (local) tcp client connecting (local) tcp server.
so came conclusion yesterday, these weren't individual issues, rather larger issue creating , running tcp endpoints using python sockets. keep in mind, udp servers , clients run both on local network , locally work, don't think it's problem socket module whole, tcp side of things.
some info on computer: windows 64bit, running python 2.7.9 (for reason, 32bit), laptop connected network via (built in) wireless card. isp comcast (if makes difference), , router/modem (it's all-in-one) technicolor provided comcast (again, if makes difference).
things i've tried:
- reset .../etc/hosts file
- reinstalled python 2 months ago (while trying troubleshoot)
- turned off firewall (i have 1)
- no antivirus other microsoft security essentials
- the issue still present when still had bitdefender installed, installed sure
i went through small troubleshooting session on previous thread mentioned earlier. biggest error when using tcp sockets is: socket.error: [errno 10061] no connection made because target machine actively refused it
.
so, have idea what's wrong here? thanks.
edit: looks missed something, port 45002, out of range of default windows ports, , pretty sure nothing uses it, have been able run udp server on port results. port port forwarded, in case.
this type of error happens when initial tcp syn replied rst (reset). unless wrong os, socket
or twisted, message must have occurred on wire - must have sent it, , that's person blame! :)
my advice running wireshark on computer in order figure out rst coming from.
if comes device inside or outside network, must investigate device.
if comes computer, , do have socket listening @ address, blame rests on os (or program meddles it, such firewall, antivirus or virus).
if there's no rst message, wrong application (or twisted, or python, or os), , must investigate caused exception raised (check stack trace).
Comments
Post a Comment