cancel
Showing results for 
Search instead for 
Did you mean: 

FTP connection timing out

dm_nypl
Champ in-the-making
Champ in-the-making
Hello,

I'm new to administering Alfresco. I'm trying to connect to the server using the OTB configuration on port 2121. I seem to be able to connect but while listing the directories the server times out on me. I've got this running on an AWS Ubuntu 12.10 instance and it is alfresco version 4.2c, if that is of any consequence. I'm wondering if anyone can diagnose what's going on here. Here is what a filezilla session looks like.


Status:   Resolving address of myserver.com
Status:   Connecting to myserverIP:2121…
Status:   Connection established, waiting for welcome message…
Response:   220 FTP server ready
Command:   USER myname
Response:   331 User name okay, need password for myname
Command:   PASS ********
Response:   230 User logged in, proceed
Command:   SYST
Response:   215 UNIX Type: Java FTP Server
Command:   FEAT
Response:   211-Features supported
Response:    MFMT
Response:    SIZE
Response:    UTF8
Response:    MLST size*;modify*;create*;type*;unique*;perm*;media-type*;
Response:    MLSD
Response:    AUTH TLS
Response:   211 END
Command:   OPTS UTF8 ON
Response:   200 OPTS UTF8 ON
Status:   Connected
Status:   Retrieving directory listing…
Command:   PWD
Response:   257 "/"
Command:   TYPE I
Response:   200 Command OK
Command:   PASV
Response:   227 Entering Passive Mode (xx,xxx,xx,xxx,194,201)
Status:   Server sent passive reply with unroutable address. Using server address instead.
Command:   MLSD
Response:   150 File status okay, about to open data connection
Error:   Connection timed out
Error:   Failed to retrieve directory listing


Thanks!
11 REPLIES 11

mrogers
Star Contributor
Star Contributor
It looks like it could be filezilla that is timing out rather than Alfresco.   Filezilla has a timeout setting.   You don't say what value you have configured but you could try increasing the timeout or turning it off by setting it to 0.

dm_nypl
Champ in-the-making
Champ in-the-making
Thanks MRogers,

I changed my timeout, which was set at 2 mins (I presume more than enough time to list a dir) to infinite. Now nothing is happening, My client still makes the handshake with the server, but the server is still not listing the directory. It's like the connection is hanging. Is there a log in the application somewhere that I might get a better idea of what's going awry?

Don


Status:   Connecting to x.x.x.x:2121…
Status:   Connection established, waiting for welcome message…
Response:   220 FTP server ready
Command:   USER dmennerich
Response:   331 User name okay, need password for ME
Command:   PASS ********
Response:   230 User logged in, proceed
Command:   OPTS UTF8 ON
Response:   200 OPTS UTF8 ON
Status:   Connected
Status:   Retrieving directory listing…
Command:   PWD
Response:   257 "/"
Command:   TYPE I
Response:   200 Command OK
Command:   PASV
Response:   227 Entering Passive Mode (xx,xxx,xx,xxx,186,250)
Status:   Server sent passive reply with unroutable address. Using server address instead.
Command:   MLSD
Response:   150 File status okay, about to open data connection

mrogers
Star Contributor
Star Contributor
Please check your alfresco.log file for errors.  

dm_nypl
Champ in-the-making
Champ in-the-making
Thanks, nothing is being logged to alfresco.log. I've used multiple clients and im getting essentially the same result. The client connecting but the directory structure never listing.

Are there any potential configurations im missing on the server? I have the port open to incoming traffic, I didn't install any other ftp servers on it.

Don

mrogers
Star Contributor
Star Contributor
Is your data port blocked?  Clearly 2121 is ok but FTP uses more than one port.   Also note the 227 error reported when entering passive mode.

You may need to set FTP.dataPortFrom and FTP.dataPortTo and open up more ports in your firewall and or port mapper.

dm_nypl
Champ in-the-making
Champ in-the-making
Is there a set range of data ports that Alfresco uses by default? I went into my global settings file and set  FTP.dataPortFrom=8081 and FTP.dataPortTo=8999 and then opened the corresponding range on my server. After trying to reconnect I got more of the same.

Response:   227 Entering Passive Mode (xx,xxx,xx,xxx,187,94)


Doing some reading on passive ports (I know nothing beyond the basics of ftp) is that the last two numbers of the list that server responds with can be used to calculate the data port the server is listening on. (p1 * 256) + p2, in the example above this would be port 47966. I'm getting different ports everytime i try to connect to the server, and the port range I set in the global properties files does not seem to have an effect on the range. I've tried opening up the port its listening on using the formula above, but that seems to do little.

Thanks!

Don

Don,
Those settings do indeed work. But normally they are "ftp.dataPortFrom" and "ftp.dataPortTo". I just set up FTP and specified the ports on Alfresco 4.1.4 Enteprise Edition. Can you try changing FTP to ftp and see if that helps?

Michael

dm_nypl
Champ in-the-making
Champ in-the-making
I apologize for bumping, I could really use some help getting my ftp working.

Don

anandmahajan
Champ in-the-making
Champ in-the-making
Hello,

I'm new to administering Alfresco. I'm trying to connect to the server using the FTP configuration on port 2121. I seem to be able to connect but while listing the directories the server times out on me. I've got this running on an linux instance and it is alfresco version 3.4d, if that is of any consequence. I'm wondering if anyone can diagnose what's going on here. Here is what a filezilla session looks like.



Status:   Connecting to xxx.xx.xxx.xxx(serverIP):2121…
Status:   Connection established, waiting for welcome message…
Response:   220 FTP server ready
Command:   AUTH TLS
Response:   234 Switching to TLS secure session
Status:   Initializing TLS…
Command:   USER admin
Status:   Verifying certificate…
Status:   TLS/SSL connection established.
Response:   331 User name okay, need password for admin
Command:   PASS *****
Response:   230 User logged in, proceed
Command:   OPTS UTF8 ON
Response:   200 OPTS UTF8 ON
Command:   PBSZ 0
Response:   200 Buffer size ok
Command:   PROT P
Response:   534 Protected data connections not supported
Status:   Connected
Status:   Retrieving directory listing…
Command:   PWD
Response:   257 "/"
Command:   TYPE I
Response:   200 Command OK
Command:   PORT 172,21,134,94,194,144
Response:   200 Port OK
Command:   LIST
Response:   150 File status okay, about to open data connection
Response:   226 Closing data connection
Status:   Directory listing successful
Status:   Retrieving directory listing…
Command:   CWD Alfresco
Response:   250 Requested file action OK
Command:   PWD
Response:   257 "/Alfresco"
Command:   PORT 172,21,134,94,194,145
Response:   200 Port OK
Command:   LIST
Response:   150 File status okay, about to open data connection

Error:   Disconnected from server
Error:   Failed to retrieve directory listing


when I see my alfresco.log

at java.lang.Thread.run(Unknown Source)
10:40:03,842 ERROR [org.alfresco.fileserver] java.io.IOException: No free data session ports
java.io.IOException: No free data session ports
   at org.alfresco.jlan.ftp.FTPServer.allocateDataSession(FTPServer.java:247)
   at org.alfresco.jlan.ftp.FTPSrvSession.procPort(FTPSrvSession.java:1074)
   at org.alfresco.jlan.ftp.FTPSrvSession.run(FTPSrvSession.java:4891)
   at java.lang.Thread.run(Unknown Source)
10:41:02,999 ERROR [org.alfresco.fileserver] java.io.IOException: No free data session ports
java.io.IOException: No free data session ports
   at org.alfresco.jlan.ftp.FTPServer.allocateDataSession(FTPServer.java:247)


this error has come

I set ftp.dataPortFrom=1433 and ftp.dataPortTo=1434 and then opened the corresponding range on my server

Can any one suggest why I m getting this error