0
votes

I have a simple script that is failing. I am running the service and the firewall is off. Anyone have any ideas on what's wrong? I can't netcat to it either with cmd : nc -vz 127.0.0.1 40400

Python 2.7

import telnetlib

tn = telnetlib.Telnet("127.0.0.1", 40400)

Traceback (most recent call last): File "/Users/mhegglin/assignments/telemetry/Basis.py", line 3, in tn = telnetlib.Telnet("127.0.0.1", 40400)

File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/telnetlib.py", line 211, in init self.open(host, port, timeout)

File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/telnetlib.py", line 227, in open self.sock = socket.create_connection((host, port), timeout)

File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py",
line 575, in create_connection raise err socket.error: [Errno 61] Connection refused

1

1 Answers

0
votes

My telnet server wasn't staying online so when I tried to telnet it was failing