Page 1 of 2

Upload timeout after 80kib when using TLS

Posted: 2012-05-04 00:23
by shadow
After a day of searching I have still not found a solution to my problem: When I try to upload a file to a server while using a TLS secured connection, after 81920 bytes (exactly 80kib) no more data is transfered and the connection times out.
This only happens when having TLS enabled. To me it seems that after the first chunk of data something wents wrong.

I tried filezilla 3.5.3 from the official ubuntu repository as well as today's svn checkout.
The problem began after an upgrade to Ubuntu 12.04, wich introduced an upgrade from filezilla 3.5.0 to 3.5.3. The problem might be somewhere between fz and gnutls, but I am not sure.

Code: Select all

01:57:32	Status:	Connection established, waiting for welcome message...
01:57:32	Response:	220 Hi
01:57:32	Command:	AUTH TLS
01:57:32	Response:	234 AUTH TLS successful
01:57:32	Status:	Initializing TLS...
01:57:32	Status:	Verifying certificate...
01:57:33	Command:	USER schadow
01:57:33	Status:	TLS/SSL connection established.
01:57:33	Response:	331 Password required for schadow
01:57:33	Command:	PASS *********
01:57:33	Response:	230 User schadow logged in
[...]
01:57:34	Command:	OPTS UTF8 ON
01:57:34	Response:	200 UTF8 set to on
01:57:34	Command:	PBSZ 0
01:57:34	Response:	200 PBSZ 0 successful
01:57:34	Command:	PROT P
01:57:34	Response:	200 Protection set to Private
01:57:34	Status:	Connected
01:57:34	Status:	Starting upload of /media/prometheus/Audio1.mp2
01:57:34	Command:	CWD /schadow
01:57:34	Response:	250 CWD command successful
01:57:34	Command:	PWD
01:57:34	Response:	257 "/schadow" is the current directory
01:57:34	Status:	Retrieving directory listing...
01:57:34	Command:	TYPE I
01:57:34	Response:	200 Type set to I
01:57:34	Command:	PASV
01:57:34	Response:	227 Entering Passive Mode (188,165,196,***,234,73).
01:57:34	Command:	MLSD
01:57:34	Response:	150 Opening ASCII mode data connection for MLSD
01:57:34	Response:	226 Transfer complete
01:57:34	Command:	PASV
01:57:35	Response:	227 Entering Passive Mode (188,165,196,***,220,125).
01:57:35	Command:	STOR Audio1.mp2
01:57:35	Response:	150 Opening BINARY mode data connection for Audio1.mp2
01:57:56	Error:	Connection timed out
01:57:56	Error:	File transfer failed after transferring 81,920 bytes in 21 seconds
My setup:
Linux Ubuntu 12.04
gnutls package versions:

Code: Select all

ii  libgnutls-dev         2.12.14-5ubuntu3      GNU TLS library - development files
ii  libgnutls-openssl27   2.12.14-5ubuntu3      GNU TLS library - OpenSSL wrapper
ii  libgnutls26           2.12.14-5ubuntu3      GNU TLS library - runtime library
ii  libgnutlsxx27         2.12.14-5ubuntu3      GNU TLS library - C++ runtime library
openssl version: OpenSSL 1.0.1 14 Mar 2012

Re: Upload timeout after 80kib when using TLS

Posted: 2012-05-04 06:23
by botg
Which FTP software is the server running you are connecting to?

Re: Upload timeout after 80kib when using TLS

Posted: 2012-05-04 09:12
by shadow
One server runs proftpd, another server runs an unknown (to me) daemon. On both servers the problem exists, but I can upload to both with lftp.
Strangely, today 3.5.0 has the same issue.

Update: Asked the admin - The other server runs vsftpd

Re: Upload timeout after 80kib when using TLS

Posted: 2012-05-05 01:42
by boco
Do not take the 80KiB into account - if it's the same value every time it is only a buffer and nothing arrived at the server (unless you see and are able to retrieve the 80KiB stub later).

Unfortunately I have no experience with the Linux incarnation of FileZilla.

Re: Upload timeout after 80kib when using TLS

Posted: 2012-05-05 15:07
by shadow
The 80kib actually arrive at the server. When after the timeout filezilla resumes the transfer, another 80kib get through, then timeout and so on.

Re: Upload timeout after 80kib when using TLS

Posted: 2012-05-08 13:27
by Eeyeech5
Same Problem here.

Using Version 3.5.0 from the Oneiric Respositories didn't resolve the issue for me.

update: Seems to be a GnuTLS bug: http://trac.filezilla-project.org/ticket/7837

Re: Upload timeout after 80kib when using TLS

Posted: 2012-05-09 17:22
by neuropa
I have the same problem! It is impossible to upload files with FileZilla version 3.5.3 bundled with Ubuntu 12.04 LTS to a server with Pure-FTP when TLS is enabled!
I have tried to upload the same file with FileZilla version 3.5.0 from another PC in the same network and did work.

It seems to be a serious bug!
Can you investigate, please?

Re: Upload timeout after 80kib when using TLS

Posted: 2012-06-14 13:58
by DesertF0x
Same problem here on Ubuntu 12.04.

Re: Upload timeout after 80kib when using TLS

Posted: 2012-06-14 14:01
by boco
It seems to be an issue with this GnuTLS feature: https://savannah.gnu.org/support/?107660#comment3 and furthers. Concerning 2.12.x and up.

Re: Upload timeout after 80kib when using TLS

Posted: 2012-06-14 20:11
by botg
Ah, this might explain it. I'll see if this can be fixed easily.

Re: Upload timeout after 80kib when using TLS

Posted: 2012-06-19 13:17
by talion
Affects me, too.

proftpd --version
ProFTPD Version 1.3.3a

filezilla --version
FileZilla 3.5.3, compiled on 2012-03-28

Xubuntu 12.04 LTS (Precise)

openssl version
OpenSSL 1.0.1 14 Mar 2012

Code: Select all

Status:	Connection established, waiting for welcome message...
Response:	220 ProFTPD 1.3.3a Server (ready)
Command:	AUTH TLS
Response:	234 AUTH TLS successful
Status:	Initializing TLS...
Status:	Verifying certificate...
Command:	USER XYZ
Status:	TLS/SSL connection established.
Response:	331 Password required for XYZ
Command:	PASS ************
Response:	230 User XYZ logged in
Command:	OPTS UTF8 ON
Response:	200 UTF8 set to on
Command:	PBSZ 0
Response:	200 PBSZ 0 successful
Command:	PROT P
Response:	200 Protection set to Private
Status:	Connected
Status:	Starting upload of /xyz
Command:	CWD /
Response:	250 CWD command successful
Command:	PWD
Response:	257 "/" is the current directory
Command:	TYPE I
Response:	200 Type set to I
Command:	PASV
Response:	227 Entering Passive Mode ...
Command:	STOR xyz
Response:	150 Opening BINARY mode data connection for /xyz
Error:	Connection timed out
Error:	File transfer failed after transferring 0 B in 21 seconds
... retrying over and over again
When I tried from another network, some small part of the file is actually transferred to the server, like shadow said. Does not seem to be (just) a firewall issue, because it worked before the upgrade. Without TLS, it still works.

Thanks for looking into the problem. If you need any debugging log, just drop me a message.

Re: Upload timeout after 80kib when using TLS

Posted: 2012-06-19 19:04
by boco
Status: Skipping upload of /xyz
What do you have your File exists rules set to? In your case the transfer is skipped by FileZilla on purpose.

Re: Upload timeout after 80kib when using TLS

Posted: 2012-06-19 19:24
by talion
Sorry, seems like I posted the wrong part of the log. The "Skipping upload of ..." was in there because I canceled the transfers when filezilla retried it over and over again. I edited my first post so it contains the relevant part now.

Re: Upload timeout after 80kib when using TLS

Posted: 2012-08-15 09:17
by nubix
same problem here.

- I can also confirm that going back to v3.5.0 doesn't solve the problem
- and that the problem only exists with FTPS (no problem with unsecure FTP)
- from inside the same local network I have the problem on Ubuntu 12.04 with v3.5.x - but I do NOT have the problem on Linux Mint 12 (which is based on Ubuntu 11.10) with v3.5.0
- files stop at about 80k (for me a 114'637 byte file stops always at 81'682 bytes - and a 96'911 bytes file at 81'338 bytes) - and yes, those 80kb do reach the server

Re: Upload timeout after 80kib when using TLS

Posted: 2012-08-15 10:48
by boco
See above, it's a GnuTLS bug/issue. Because Windows clients link GnuTLS statically, they aren't affected, but Linux distros having the buggy version installed suffer.