![]() |
|
[Python] ConnectionRefusedError: [Errno 111] Connection refused - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [Python] ConnectionRefusedError: [Errno 111] Connection refused (/showthread.php?tid=5688790) |
ConnectionRefusedError: [Errno 111] Connection refused - PimpSlickback - Aug 7, 2017 Here's what I'm trying to do 1. Write a TCP Client that will connect to 127.0.0.1 on port 9990. 2. send "Hello, World" to the server. 3. get the response, and print it out. Here is my code: ![]() Code from time import sleep* - vorticalbox - Aug 7, 2017 Do you have a firewall? I believe windows firewall blocks incoming connections by default. * - PimpSlickback - Aug 7, 2017 (Aug 7, 2017 11:54 AM)vorticalbox Wrote: Do you have a firewall? I believe windows firewall blocks incoming connections by default. I dont think it's the firewall because when i do the same code for port 9987 is works, but I need port 9990 * - Payload - Aug 7, 2017 (Aug 7, 2017 11:57 AM)PimpSlickback Wrote: I dont think it's the firewall because when i do the same code for port 9987 is works, but I need port 9990 It works for me on ports I have allowed TCP inbound/outbound on the firewall. You probably just have to do that, if it still doesn't work you have something blocking that port, on windows try. Code netstat -na | find "9990"to see what is running on that port. * - PimpSlickback - Aug 7, 2017 (Aug 7, 2017 12:22 PM)Payload Wrote: It works for me on ports I have allowed TCP inbound/outbound on the firewall. You probably just have to do that, if it still doesn't work you have something blocking that port, on windows try. This is on a website for a test so it won't allow me to see/do any of that. It only gives me the directions above. So port 9990 should be open unless I am missing some line of code somewhere. |