425 Can't open data connection for transfer

Need help with FileZilla Server? Something does not work as expected? In this forum you may find an answer.

Moderator: Project members

Post Reply
Message
Author
TiKilla
500 Command not understood
Posts: 2
Joined: 2016-05-18 03:52
First name: Timur
Last name: Devlikamov

425 Can't open data connection for transfer

#1 Post by TiKilla » 2016-05-23 10:19

Hi everyone,

While using Filezilla FTP Server (OS: Windows 2008 R2), periodically face the problem - 425 Error.
Firstly, i suggested, the problem with Windows Firewall and disable to test it. But it didn't solved the problem.
Between client (RHEL 6.5) and server at least two Cisco router and now I suggest the problem in Port Forwarding but I'm not sure in it.

Here is FTP log snippet:
(002479)23.05.2016 12:48:55 - anonymous (172.25.215.170)> LIST /E002210/DWH
(002479)23.05.2016 12:48:55 - anonymous (172.25.215.170)> 150 Opening data channel for directory listing of "/E002210/DWH"
(002479)23.05.2016 12:48:55 - anonymous (172.25.215.170)> 226 Successfully transferred "/E002210/DWH"
(002480)23.05.2016 12:48:55 - (not logged in) (172.25.215.170)> Connected on port 21, sending welcome message...
(002480)23.05.2016 12:48:55 - (not logged in) (172.25.215.170)> 220-FileZilla Server 0.9.56 beta
(002480)23.05.2016 12:48:55 - (not logged in) (172.25.215.170)> 220-written by Tim Kosse (tim.kosse@filezilla-project.org)
(002480)23.05.2016 12:48:55 - (not logged in) (172.25.215.170)> 220 Please visit https://filezilla-project.org/
(002480)23.05.2016 12:48:55 - (not logged in) (172.25.215.170)> USER anonymous
(002480)23.05.2016 12:48:55 - (not logged in) (172.25.215.170)> 331 Password required for anonymous
(002480)23.05.2016 12:48:55 - (not logged in) (172.25.215.170)> PASS *********
(002480)23.05.2016 12:48:55 - anonymous (172.25.215.170)> 230 Logged on
(002480)23.05.2016 12:48:55 - anonymous (172.25.215.170)> MODE B
(002480)23.05.2016 12:48:55 - anonymous (172.25.215.170)> 502 Unimplemented MODE type
(002480)23.05.2016 12:48:55 - anonymous (172.25.215.170)> TYPE I
(002480)23.05.2016 12:48:55 - anonymous (172.25.215.170)> 200 Type set to I
(002480)23.05.2016 12:48:55 - anonymous (172.25.215.170)> PWD
(002480)23.05.2016 12:48:55 - anonymous (172.25.215.170)> 257 "/" is current directory.
(002480)23.05.2016 12:48:55 - anonymous (172.25.215.170)> QUIT
(002480)23.05.2016 12:48:55 - anonymous (172.25.215.170)> 221 Goodbye
(002480)23.05.2016 12:48:55 - anonymous (172.25.215.170)> disconnected.
(002479)23.05.2016 12:48:55 - anonymous (172.25.215.170)> QUIT
(002479)23.05.2016 12:48:55 - anonymous (172.25.215.170)> 221 Goodbye
(002479)23.05.2016 12:48:55 - anonymous (172.25.215.170)> disconnected.
(002481)23.05.2016 12:48:55 - (not logged in) (172.25.215.170)> Connected on port 21, sending welcome message...
(002481)23.05.2016 12:48:55 - (not logged in) (172.25.215.170)> 220-FileZilla Server 0.9.56 beta
(002481)23.05.2016 12:48:55 - (not logged in) (172.25.215.170)> 220-written by Tim Kosse (tim.kosse@filezilla-project.org)
(002481)23.05.2016 12:48:55 - (not logged in) (172.25.215.170)> 220 Please visit https://filezilla-project.org/
(002481)23.05.2016 12:48:55 - (not logged in) (172.25.215.170)> USER anonymous
(002481)23.05.2016 12:48:55 - (not logged in) (172.25.215.170)> 331 Password required for anonymous
(002481)23.05.2016 12:48:55 - (not logged in) (172.25.215.170)> PASS *********
(002481)23.05.2016 12:48:55 - anonymous (172.25.215.170)> 230 Logged on
(002481)23.05.2016 12:48:55 - anonymous (172.25.215.170)> MODE B
(002481)23.05.2016 12:48:55 - anonymous (172.25.215.170)> 502 Unimplemented MODE type
(002481)23.05.2016 12:48:55 - anonymous (172.25.215.170)> TYPE I
(002481)23.05.2016 12:48:55 - anonymous (172.25.215.170)> 200 Type set to I
(002481)23.05.2016 12:48:55 - anonymous (172.25.215.170)> PWD
(002481)23.05.2016 12:48:55 - anonymous (172.25.215.170)> 257 "/" is current directory.
(002481)23.05.2016 12:48:55 - anonymous (172.25.215.170)> PWD
(002481)23.05.2016 12:48:55 - anonymous (172.25.215.170)> 257 "/" is current directory.
(002481)23.05.2016 12:48:55 - anonymous (172.25.215.170)> SYST
(002481)23.05.2016 12:48:55 - anonymous (172.25.215.170)> 215 UNIX emulated by FileZilla
(002481)23.05.2016 12:48:55 - anonymous (172.25.215.170)> PORT 172,25,215,170,48,29
(002481)23.05.2016 12:48:55 - anonymous (172.25.215.170)> 200 Port command successful
(002481)23.05.2016 12:48:55 - anonymous (172.25.215.170)> LIST /E002210/DWH
(002481)23.05.2016 12:48:55 - anonymous (172.25.215.170)> 150 Opening data channel for directory listing of "/E002210/DWH"
(002481)23.05.2016 12:48:55 - anonymous (172.25.215.170)> 226 Successfully transferred "/E002210/DWH"
(002482)23.05.2016 12:48:55 - (not logged in) (172.25.215.170)> Connected on port 21, sending welcome message...
(002482)23.05.2016 12:48:55 - (not logged in) (172.25.215.170)> 220-FileZilla Server 0.9.56 beta
(002482)23.05.2016 12:48:55 - (not logged in) (172.25.215.170)> 220-written by Tim Kosse (tim.kosse@filezilla-project.org)
(002482)23.05.2016 12:48:55 - (not logged in) (172.25.215.170)> 220 Please visit https://filezilla-project.org/
(002482)23.05.2016 12:48:55 - (not logged in) (172.25.215.170)> USER anonymous
(002482)23.05.2016 12:48:55 - (not logged in) (172.25.215.170)> 331 Password required for anonymous
(002482)23.05.2016 12:48:55 - (not logged in) (172.25.215.170)> PASS *********
(002482)23.05.2016 12:48:55 - anonymous (172.25.215.170)> 230 Logged on
(002482)23.05.2016 12:48:55 - anonymous (172.25.215.170)> MODE B
(002482)23.05.2016 12:48:55 - anonymous (172.25.215.170)> 502 Unimplemented MODE type
(002482)23.05.2016 12:48:55 - anonymous (172.25.215.170)> TYPE I
(002482)23.05.2016 12:48:55 - anonymous (172.25.215.170)> 200 Type set to I
(002482)23.05.2016 12:48:55 - anonymous (172.25.215.170)> PWD
(002482)23.05.2016 12:48:55 - anonymous (172.25.215.170)> 257 "/" is current directory.
(002482)23.05.2016 12:48:55 - anonymous (172.25.215.170)> QUIT
(002482)23.05.2016 12:48:55 - anonymous (172.25.215.170)> 221 Goodbye
(002482)23.05.2016 12:48:55 - anonymous (172.25.215.170)> disconnected.
(002481)23.05.2016 12:48:55 - anonymous (172.25.215.170)> ALLO 131072
(002481)23.05.2016 12:48:55 - anonymous (172.25.215.170)> 202 No storage allocation neccessary.
(002481)23.05.2016 12:48:55 - anonymous (172.25.215.170)> CWD /E002210/DWH
(002481)23.05.2016 12:48:55 - anonymous (172.25.215.170)> 250 CWD successful. "/E002210/DWH" is current directory.
(002481)23.05.2016 12:48:55 - anonymous (172.25.215.170)> PORT 172,25,215,170,54,138
(002481)23.05.2016 12:48:55 - anonymous (172.25.215.170)> 200 Port command successful
(002481)23.05.2016 12:48:55 - anonymous (172.25.215.170)> RETR 20160228E002210_node_3_CR_DWH_RES.txt_01
(002481)23.05.2016 12:48:55 - anonymous (172.25.215.170)> 150 Opening data channel for file download from server of "/E002210/DWH/20160228E002210_node_3_CR_DWH_RES.txt_01"
(002481)23.05.2016 12:48:55 - anonymous (172.25.215.170)> 226 Successfully transferred "/E002210/DWH/20160228E002210_node_3_CR_DWH_RES.txt_01"
(002481)23.05.2016 12:48:55 - anonymous (172.25.215.170)> QUIT
(002481)23.05.2016 12:48:55 - anonymous (172.25.215.170)> 221 Goodbye
(002481)23.05.2016 12:48:55 - anonymous (172.25.215.170)> disconnected.
(002483)23.05.2016 12:48:55 - (not logged in) (172.25.215.170)> Connected on port 21, sending welcome message...
(002483)23.05.2016 12:48:55 - (not logged in) (172.25.215.170)> 220-FileZilla Server 0.9.56 beta
(002483)23.05.2016 12:48:55 - (not logged in) (172.25.215.170)> 220-written by Tim Kosse (tim.kosse@filezilla-project.org)
(002483)23.05.2016 12:48:55 - (not logged in) (172.25.215.170)> 220 Please visit https://filezilla-project.org/
(002483)23.05.2016 12:48:55 - (not logged in) (172.25.215.170)> USER anonymous
(002483)23.05.2016 12:48:55 - (not logged in) (172.25.215.170)> 331 Password required for anonymous
(002483)23.05.2016 12:48:55 - (not logged in) (172.25.215.170)> PASS *********
(002483)23.05.2016 12:48:55 - anonymous (172.25.215.170)> 230 Logged on
(002483)23.05.2016 12:48:55 - anonymous (172.25.215.170)> MODE B
(002483)23.05.2016 12:48:55 - anonymous (172.25.215.170)> 502 Unimplemented MODE type
(002483)23.05.2016 12:48:55 - anonymous (172.25.215.170)> TYPE I
(002483)23.05.2016 12:48:55 - anonymous (172.25.215.170)> 200 Type set to I
(002483)23.05.2016 12:48:55 - anonymous (172.25.215.170)> PWD
(002483)23.05.2016 12:48:55 - anonymous (172.25.215.170)> 257 "/" is current directory.
(002483)23.05.2016 12:48:55 - anonymous (172.25.215.170)> SYST
(002483)23.05.2016 12:48:55 - anonymous (172.25.215.170)> 215 UNIX emulated by FileZilla
(002483)23.05.2016 12:48:55 - anonymous (172.25.215.170)> PORT 172,25,215,170,86,170
(002483)23.05.2016 12:48:55 - anonymous (172.25.215.170)> 200 Port command successful
(002483)23.05.2016 12:48:55 - anonymous (172.25.215.170)> LIST /E002210/DWH
(002483)23.05.2016 12:48:55 - anonymous (172.25.215.170)> 150 Opening data channel for directory listing of "/E002210/DWH"
(002483)23.05.2016 12:48:55 - anonymous (172.25.215.170)> 425 Can't open data connection for transfer of "/E002210/DWH"

I would appreciate your advice, how to solve this problem.
Sorry for my poor English.

User avatar
botg
Site Admin
Posts: 35558
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: 425 Can't open data connection for transfer

#2 Post by botg » 2016-05-23 16:24

Your clients tries to use MODE B, that's unusual. Which FTP client are you using if I may ask?

Apart from that there's nothing unusual in the log.

If you look at a large number of successful and failed transfers, do you notice any pattern in the used port as given by the last two numbers given in the PORT command?

TiKilla
500 Command not understood
Posts: 2
Joined: 2016-05-18 03:52
First name: Timur
Last name: Devlikamov

Re: 425 Can't open data connection for transfer

#3 Post by TiKilla » 2016-05-31 15:34

botg wrote:Your clients tries to use MODE B, that's unusual. Which FTP client are you using if I may ask?

Apart from that there's nothing unusual in the log.

If you look at a large number of successful and failed transfers, do you notice any pattern in the used port as given by the last two numbers given in the PORT command?
Hi Tim, thanks for your reply,

initially the problem was with trasmiting files from FileZilla FTP Server (on Windows) to Hadoop File System (HDFS) with special utulity - DistCp - that can put file directly to HDFS.

But we test this problem with trasmiting files from FileZilla FTP Server to Linux server by using default ftp client, and got the same problem.
Last week found some details:
- Problem arises only when FTP Server works in active mode, when client sends to FTP Server, host and port information, and FTP Server makes connect to client by that address. If client connect in passive mode than everything ok, but the problem is that disctp can work only in active mode.
- In my experience problem arises when FTP connect to port that already used previsiously

User avatar
botg
Site Admin
Posts: 35558
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: 425 Can't open data connection for transfer

#4 Post by botg » 2016-05-31 15:57

Looks like classic port exhaustion due to the TIME_WAIT TCP socket state.

While FileZilla Server can reuse sockets, your client probably cannot.

Can you configure the range of ports used by your client? If so, make sure it is as big as possible. If there is no such option, it may help to increase the range of ports the client's operating system uses as ephemeral ports.

Post Reply