Not able to connect to FTP server

Not able to connect to FTP server. when i use the FileZilla to login, the following messages are shown

FileZilla Report:

Status: Resolving address of ftpupload.net
Status: Connecting to 185.27.134.11:21…
Error: Connection timed out after 20 seconds of inactivity
Error: Could not connect to server
Status: Waiting to retry…
Trace: CFileZillaEnginePrivate::ContinueConnect called without pending Command::connect

I have hosted my site 3 months back and I was not able to login to FTP server not even once.
I had tried the help topics by changing the password for hosting account. but still no luck.

The connection simply timed out after 20 seconds of you doing nothing, while being connected.

If there is actually an error, it’s not in those logs and you will need to provide the full logs.

Here the Log in Debug mode:
Status: Resolving address of ftpupload.net
Status: Connecting to 185.27.134.11:21…
Error: Connection timed out after 20 seconds of inactivity
Error: Could not connect to server
Status: Waiting to retry…
Trace: CFileZillaEnginePrivate::ContinueConnect called without pending Command::connect
20:49:01 Trace: CControlSocket::SendNextCommand()
20:49:01 Trace: CFtpLogonOpData::Send() in state 0
20:49:01 Status: Resolving address of ftpupload.net
20:49:01 Status: Connecting to 185.27.134.11:21…
20:49:21 Error: Connection timed out after 20 seconds of inactivity
20:49:21 Trace: CRealControlSocket::DoClose(2050)
20:49:21 Trace: CControlSocket::DoClose(2050)
20:49:21 Trace: CFtpControlSocket::ResetOperation(2114)
20:49:21 Trace: CControlSocket::ResetOperation(2114)
20:49:21 Trace: CFtpLogonOpData::Reset(2114) in state 1
20:49:21 Error: Could not connect to server
20:49:21 Trace: CFileZillaEnginePrivate::ResetOperation(2114)
20:49:21 Status: Waiting to retry…
20:49:26 Trace: CRealControlSocket::DoClose(66)
20:49:26 Trace: CControlSocket::DoClose(66)
20:49:26 Trace: CFtpControlSocket::ResetOperation(66)
20:49:26 Trace: CControlSocket::ResetOperation(66)
20:49:26 Trace: CFileZillaEnginePrivate::ResetOperation(66)
20:49:26 Trace: CControlSocket::DoClose(66)
20:49:26 Trace: CControlSocket::ResetOperation(66)
20:49:26 Trace: CFileZillaEnginePrivate::ResetOperation(66)
20:49:26 Trace: CFileZillaEnginePrivate::ContinueConnect called without pending Command::connect
20:49:26 Trace: CFileZillaEnginePrivate::ResetOperation(130)
20:49:26 Trace: CFileZillaEnginePrivate::ResetOperation(130)

After searching for Error codes in FileZilla [networking - Filezilla timeout after 20 seconds of inactivity - Super User], I realized something to do with my ISP settings. and After Enabling FTP ALG(Application Level GateWay) Pass through under NAT(Network Address Translation) in ISP modem settings then it worked

Before Changing the Flag:
2020-05-26 21:52:27 17296 1 Status: Resolving address of ftpupload.net
2020-05-26 21:52:27 17296 1 Status: Connecting to 185.27.134.11:21…
2020-05-26 21:52:48 17296 1 Status: Connection attempt failed with “ETIMEDOUT - Connection attempt timed out”.
2020-05-26 21:52:48 17296 1 Error: Could not connect to server
2020-05-26 21:52:48 17296 1 Status: Waiting to retry…

After Enabling FTP in NAT ALG pass through, Log:
2020-05-26 21:56:39 17296 1 Status: Resolving address of ftpupload.net
2020-05-26 21:56:39 17296 1 Status: Connecting to 185.27.134.11:21…
2020-05-26 21:56:40 17296 1 Status: Connection established, waiting for welcome message…
2020-05-26 21:56:40 17296 1 Response: 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
2020-05-26 21:56:40 17296 1 Response: 220-You are user number 787 of 6900 allowed.
2020-05-26 21:56:40 17296 1 Response: 220-Local time is now 12:26. Server port: 21.
2020-05-26 21:56:40 17296 1 Response: 220-This is a private system - No anonymous login
2020-05-26 21:56:40 17296 1 Response: 220 You will be disconnected after 60 seconds of inactivity.
2020-05-26 21:56:40 17296 1 Command: AUTH TLS
2020-05-26 21:56:40 17296 1 Response: 234 AUTH TLS OK.
2020-05-26 21:56:40 17296 1 Status: Initializing TLS…
2020-05-26 21:56:40 17296 1 Status: Verifying certificate…
2020-05-26 21:56:40 17296 1 Status: TLS connection established.
2020-05-26 21:56:40 17296 1 Command: USER XXXXXXXXXXXX
2020-05-26 21:56:40 17296 1 Response: 331 User XXXXXXXXXXXX OK. Password required
2020-05-26 21:56:40 17296 1 Command: PASS *********
2020-05-26 21:56:41 17296 1 Response: 230-Your bandwidth usage is restricted
2020-05-26 21:56:41 17296 1 Response: 230 OK. Current restricted directory is /
2020-05-26 21:56:41 17296 1 Command: SYST
2020-05-26 21:56:41 17296 1 Response: 215 UNIX Type: L8
2020-05-26 21:56:41 17296 1 Command: FEAT
2020-05-26 21:56:41 17296 1 Response: 211-Extensions supported:
2020-05-26 21:56:41 17296 1 Response: EPRT
2020-05-26 21:56:41 17296 1 Response: IDLE
2020-05-26 21:56:41 17296 1 Response: MDTM
2020-05-26 21:56:41 17296 1 Response: SIZE
2020-05-26 21:56:41 17296 1 Response: REST STREAM
2020-05-26 21:56:41 17296 1 Response: MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
2020-05-26 21:56:41 17296 1 Response: MLSD
2020-05-26 21:56:41 17296 1 Response: AUTH TLS
2020-05-26 21:56:41 17296 1 Response: PBSZ
2020-05-26 21:56:41 17296 1 Response: PROT
2020-05-26 21:56:41 17296 1 Response: UTF8
2020-05-26 21:56:41 17296 1 Response: ESTA
2020-05-26 21:56:41 17296 1 Response: PASV
2020-05-26 21:56:41 17296 1 Response: EPSV
2020-05-26 21:56:41 17296 1 Response: SPSV
2020-05-26 21:56:41 17296 1 Response: ESTP
2020-05-26 21:56:41 17296 1 Response: 211 End.
2020-05-26 21:56:41 17296 1 Command: OPTS UTF8 ON
2020-05-26 21:56:41 17296 1 Response: 200 OK, UTF-8 enabled
2020-05-26 21:56:41 17296 1 Command: PBSZ 0
2020-05-26 21:56:41 17296 1 Response: 200 PBSZ=0
2020-05-26 21:56:41 17296 1 Command: PROT P
2020-05-26 21:56:42 17296 1 Response: 200 Data protection level set to “private”
2020-05-26 21:56:42 17296 1 Status: Logged in
2020-05-26 21:56:42 17296 1 Status: Retrieving directory listing…
2020-05-26 21:56:42 17296 1 Command: PWD
2020-05-26 21:56:42 17296 1 Response: 257 “/” is your current location
2020-05-26 21:56:42 17296 1 Command: TYPE I
2020-05-26 21:56:42 17296 1 Response: 200 TYPE is now 8-bit binary
2020-05-26 21:56:42 17296 1 Command: PASV
2020-05-26 21:56:42 17296 1 Response: 227 Entering Passive Mode (185,27,134,11,201,105)
2020-05-26 21:56:42 17296 1 Command: MLSD
2020-05-26 21:56:42 17296 1 Response: 150 Accepted data connection
2020-05-26 21:56:43 17296 1 Response: 226-Options: -a -l
2020-05-26 21:56:43 17296 1 Response: 226 6 matches total
2020-05-26 21:56:43 17296 1 Status: Directory listing of “/” successful

This kind of debugging is difficult for Non-Technical guys. I would like to suggest @Admin to add connection issue also to Help/FAQ doc so that it will help beginers.

Thank you @Magnus for your time.

1 Like

I know about ALGs and about how horrible they can be. But I would not have imagined that router manufacturers would be so stupid to use them on FTP connections as well.

But thank you so much for sharing your findings, I’ll be sure to add it to the relevant KB article!

3 Likes

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.