Tuesday, January 18, 2011

FTP timing out after login

For some reasons I cant access any of my accounts on my dedicated server via FTP. It simply times out when it tried to display the directories.

Heres a log from FileZila...

Status: Resolving address of testdomain.com
Status: Connecting to 64.237.58.43:21...
Status: Connection established, waiting for welcome message...
Response:   220---------- Welcome to Pure-FTPd [TLS] ----------
Response:   220-You are user number 3 of 50 allowed.
Response:   220-Local time is now 19:39. Server port: 21.
Response:   220-This is a private system - No anonymous login
Response:   220-IPv6 connections are also welcome on this server.
Response:   220 You will be disconnected after 15 minutes of inactivity.
Command:    USER testaccount
Response:   331 User testaccount OK. Password required
Command:    PASS ********
Response:   230-User testaccount has group access to:  testaccount
Response:   230 OK. Current restricted directory is /
Command:    SYST
Response:   215 UNIX Type: L8
Command:    FEAT
Response:   211-Extensions supported:
Response:    EPRT
Response:    IDLE
Response:    MDTM
Response:    SIZE
Response:    REST STREAM
Response:    MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
Response:    MLSD
Response:    ESTP
Response:    PASV
Response:    EPSV
Response:    SPSV
Response:    ESTA
Response:    AUTH TLS
Response:    PBSZ
Response:    PROT
Response:   211 End.
Status: Connected
Status: Retrieving directory listing...
Command:    PWD
Response:   257 "/" is your current location
Command:    TYPE I
Response:   200 TYPE is now 8-bit binary
Command:    PASV
Response:   227 Entering Passive Mode (64,237,58,43,145,153)
Command:    MLSD
Response:   150 Accepted data connection
Response:   226-ASCII
Response:   226-Options: -a -l 
Response:   226 18 matches total
Error:  Connection timed out
Error:  Failed to retrieve directory listing

I have restarted the FTP service serveral times but still It doesnt loads. I only have this problem when my server is reaching it peak usage which is still only 1.0 (4 cores), 40% of 4GB ram.

The ftp connections isnt maxed out because only me and my colleague have access to FTP on the server.

  • You state that this usually works? Can we get a log output of what it looks like when it is functioning correctly?

    How many files are in that directory? Anything over like 10k will bog down the server, and cause timeouts when trying to read the whole list.

    My third guess is that maybe passive mode communications aren't traversing your firewalls correctly. I wouldn't set it to active mode until the other questions are answered (if it usually works, changing settings just adds more variables).

    Brent : I had a similar issue, which I recall related to using PASV mode - but I don't recall the details - I mention it to validate your third point.
  • What do the logs look like on the server at this time?

    Things to try:

    • PASV mode
    • SFTP
    • a different FTP client
    From briealeida
  • I've never seen a system do this myself, but from the log and your other comments it simply looks like your firewall can't handle the second TCP socket used (for data transfer) when it's heavily loaded.

    How many other concurrent TCP sockets are open when this happens?

    FWIW, I'd try active mode instead of passive - it'll cost almost nothing to try it.

    Alnitak : If it's Unix (which your use of Pure-FTP suggests is the case) then you can check the server itself with `netstat -an`.
    From Alnitak
  • I had a similar issue...
    Where my FTP connection inexplicably went into passive mode despite my explicit "active" mode setting.
    I restarted my cable modem and router and fixed it.

    From NEPatriot

0 comments:

Post a Comment