I
I
IvanOne2015-06-26 15:39:00
Python
IvanOne, 2015-06-26 15:39:00

Why does this error occur on the server?

Good afternoon! debian 7 installed nginx+uwsgi+django, django has a script that downloads a file from ftp, but the connection drops. I am using ftlib. The error is the following:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/ftplib.py", line 117, in __init__
    self.connect(host)
  File "/usr/lib/python2.7/ftplib.py", line 132, in connect
    self.sock = socket.create_connection((self.host, self.port), self.timeout)
  File "/usr/lib/python2.7/socket.py", line 571, in create_connection
    raise err
socket.error: [Errno 111] Connection refused

From the local machine everything works ok

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
tgz, 2015-06-26
@IvanOne

Connection refused, that says it all. Firewall probably does not let.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question