[Tutor] ftp socket.error

richard kappler richkappler at gmail.com
Fri Sep 11 18:47:33 CEST 2015


No, apparently I didn't figure it out. I thought I had as after the
modprobe I was getting a an EOFError, but now I'm getting the no route to
host error again. I can ping it, and as you can see from the original post,
I am able to establish a connection and log in, it's just when I try to
send a file it goes bollocks up. Still need ideas.

regards, Richard

On Fri, Sep 11, 2015 at 12:17 PM, richard kappler <richkappler at gmail.com>
wrote:

> Figured it out. On the receiving machine  I had to
>
> # modprobe ip_conntrack_ftp
>
>
> On Fri, Sep 11, 2015 at 12:00 PM, richard kappler <richkappler at gmail.com>
> wrote:
>
>> I can connect via ftp, but when I try to send a file, I get a no route to
>> host error, I don't understand.
>>
>> code:
>>
>> >>> import ftplib
>> >>> from ftplib import FTP
>> >>> fBOT = FTP()
>> >>> oldfile = '/home/test/DataFeed/input/images/BOT/1.jpg'
>> >>> newfile = 'new.jpg'
>> >>> oldfile = open('/home/test/DataFeed/input/images/BOT/1.jpg', 'rb')
>> >>> fBOT.connect('192.168.2.23', 2021)
>> '220 Service ready for new user.'
>> >>> fBOT.login('BOT', 'sick')
>> '230 User logged in, proceed.'
>> >>> fBOT.storbinary('STOR  newfile', oldfile)
>> Traceback (most recent call last):
>>   File "<stdin>", line 1, in <module>
>>   File "/usr/lib64/python2.6/ftplib.py", line 452, in storbinary
>>     conn = self.transfercmd(cmd)
>>   File "/usr/lib64/python2.6/ftplib.py", line 360, in transfercmd
>>     return self.ntransfercmd(cmd, rest)[0]
>>   File "/usr/lib64/python2.6/ftplib.py", line 326, in ntransfercmd
>>     conn = socket.create_connection((host, port), self.timeout)
>>   File "/usr/lib64/python2.6/socket.py", line 567, in create_connection
>>     raise error, msg
>> socket.error: [Errno 113] No route to host
>>
>> Any ideas?
>>
>> regards, Richard
>>
>> --
>>
>> All internal models of the world are approximate. ~ Sebastian Thrun
>>
>
>
>
> --
>
> All internal models of the world are approximate. ~ Sebastian Thrun
>



-- 

All internal models of the world are approximate. ~ Sebastian Thrun


More information about the Tutor mailing list