Odd isolated directory retrieval issue

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
hvymetal86
500 Command not understood
Posts: 5
Joined: 2008-12-14 07:46
First name: Bryan

Odd isolated directory retrieval issue

#1 Post by hvymetal86 » 2008-12-14 08:04

Hello everyone,

I just downloaded the newest versions of the FileZilla Server and client. Installed the server on my computer, and the client on mine as well and a remote computer I control via LogMeIn. I first set up my server and account and tested it locally without SSL/TLS, and after a bit of tinkering it worked fine. I then set up SSL/TLS and again connected locally tested opening a few directories, still worked fine. I set up passive mode and opened the range of ports on my router (running NAT) for it. I also opened the port for SSL/TLS in the router as well. I then configured the client on the remote computer for these settings and got it to connect and transfer files. It can browse most directories, but has one weird error with a certain one. When I try to open said directory, I get the following error in the client of the remote computer:
--------------------------------------------------------------------------------------------------------------------
Status: Server did not properly shut down TLS connection
Error: Transfer connection interrupted: ECONNABORTED - Connection aborted
Error: Failed to retrieve directory listing
-------------------------------------------------------------------------------------------------------------------
Here's the log of the client from connection to the failed directory retrieval:
-------------------------------------------------------------------------------------------------------------------
Status: Connecting to 68.63.164.120:17790...
Status: Connection established, waiting for welcome message...
Response: 220-FileZilla Server version 0.9.29 beta
Response: 220 Welcome to the HvyMtlChaos FTP server.
Command: AUTH TLS
Response: 234 Using authentication type TLS
Status: Initializing TLS...
Status: Verifying certificate...
Command: USER hvymetal86
Status: TLS/SSL connection established.
Response: 331 Password required for hvymetal86
Command: PASS **********
Response: 230 Logged on
Command: PBSZ 0
Response: 200 PBSZ=0
Command: PROT P
Response: 200 Protection level set to P
Status: Connected
Status: Retrieving directory listing...
Command: PWD
Response: 257 "/" is current directory.
Status: Directory listing successful
Status: Retrieving directory listing...
Command: CWD /Hatebreed(F:)/Bittorrent Downloads
Response: 250 CWD successful. "/Hatebreed(F:)/Bittorrent Downloads" is current directory.
Command: TYPE I
Response: 200 Type set to I
Command: PASV
Response: 227 Entering Passive Mode (68,63,164,120,225,233)
Command: LIST
Response: 150 Connection accepted
Response: 226 Transfer OK
Status: Server did not properly shut down TLS connection
Error: Transfer connection interrupted: ECONNABORTED - Connection aborted
Error: Failed to retrieve directory listing
-------------------------------------------------------------------------------------------------------------------
This is what the server's log shows at the same time this is done:
--------------------------------------------------------------------------------------------------------------------
(000033) 12/14/2008 2:56:10 AM - (not logged in) (66.71.56.154)> Connected, sending welcome message...
(000033) 12/14/2008 2:56:10 AM - (not logged in) (66.71.56.154)> 220-FileZilla Server version 0.9.29 beta
(000033) 12/14/2008 2:56:10 AM - (not logged in) (66.71.56.154)> 220 Welcome to the HvyMtlChaos FTP server.
(000033) 12/14/2008 2:56:10 AM - (not logged in) (66.71.56.154)> AUTH TLS
(000033) 12/14/2008 2:56:10 AM - (not logged in) (66.71.56.154)> 234 Using authentication type TLS
(000033) 12/14/2008 2:56:10 AM - (not logged in) (66.71.56.154)> SSL connection established
(000033) 12/14/2008 2:56:10 AM - (not logged in) (66.71.56.154)> USER hvymetal86
(000033) 12/14/2008 2:56:10 AM - (not logged in) (66.71.56.154)> 331 Password required for hvymetal86
(000033) 12/14/2008 2:56:10 AM - (not logged in) (66.71.56.154)> PASS **********
(000033) 12/14/2008 2:56:10 AM - hvymetal86 (66.71.56.154)> 230 Logged on
(000033) 12/14/2008 2:56:11 AM - hvymetal86 (66.71.56.154)> PBSZ 0
(000033) 12/14/2008 2:56:11 AM - hvymetal86 (66.71.56.154)> 200 PBSZ=0
(000033) 12/14/2008 2:56:11 AM - hvymetal86 (66.71.56.154)> PROT P
(000033) 12/14/2008 2:56:11 AM - hvymetal86 (66.71.56.154)> 200 Protection level set to P
(000033) 12/14/2008 2:56:11 AM - hvymetal86 (66.71.56.154)> PWD
(000033) 12/14/2008 2:56:11 AM - hvymetal86 (66.71.56.154)> 257 "/" is current directory.
(000033) 12/14/2008 2:56:20 AM - hvymetal86 (66.71.56.154)> CWD /Hatebreed(F:)/Bittorrent Downloads
(000033) 12/14/2008 2:56:20 AM - hvymetal86 (66.71.56.154)> 250 CWD successful. "/Hatebreed(F:)/Bittorrent Downloads" is current directory.
(000033) 12/14/2008 2:56:20 AM - hvymetal86 (66.71.56.154)> TYPE I
(000033) 12/14/2008 2:56:20 AM - hvymetal86 (66.71.56.154)> 200 Type set to I
(000033) 12/14/2008 2:56:20 AM - hvymetal86 (66.71.56.154)> PASV
(000033) 12/14/2008 2:56:20 AM - hvymetal86 (66.71.56.154)> 227 Entering Passive Mode (68,63,164,120,225,233)
(000033) 12/14/2008 2:56:21 AM - hvymetal86 (66.71.56.154)> LIST
(000033) 12/14/2008 2:56:21 AM - hvymetal86 (66.71.56.154)> 150 Connection accepted
(000033) 12/14/2008 2:56:21 AM - hvymetal86 (66.71.56.154)> SSL connection for data connection established
(000033) 12/14/2008 2:56:21 AM - hvymetal86 (66.71.56.154)> 226 Transfer OK
------------------------------------------------------------------------------------------------------------------

The thing I've found really weird is that so far no other directory has this problem and the server log shows no error.... Other directories with spaces in the paths work fine. I thought maybe since a program on the server computer constantly reads/writes to the folder in question that that might cause the issue, but after stopping that program it still happened. I also tested it locally, and the directory encounters the same problem as remotely. I wasn't sure which section of the forums to put this in, client or server, so sorry if I chose the wrong one. Any help with this would be greatly appreciated!

Thanks,
Bryan

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

Re: Odd isolated directory retrieval issue

#2 Post by botg » 2008-12-14 09:31

Status: Server did not properly shut down TLS connection
Your server is broken, it is violating RFC 2246. Read the sticky. You need to upgrade to a proper server.

User avatar
boco
Contributor
Posts: 26935
Joined: 2006-05-01 03:28
Location: Germany

Re: Odd isolated directory retrieval issue

#3 Post by boco » 2008-12-14 14:47

Status: Connection established, waiting for welcome message...
Response: 220-FileZilla Server version 0.9.29 beta
Response: 220 Welcome to the HvyMtlChaos FTP server.
Hello!? botg? :P
No support requests over PM! You will NOT get any reply!!!
FTP connection problems? Please read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
FileZilla Pro support: https://customerforum.fileZilla-project.org

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

Re: Odd isolated directory retrieval issue

#4 Post by botg » 2008-12-14 16:30

Ah, in that case, broken router and/or firewall. I don't actually read these topics fully anymore, I just search for some keywords.

hvymetal86
500 Command not understood
Posts: 5
Joined: 2008-12-14 07:46
First name: Bryan

Re: Odd isolated directory retrieval issue

#5 Post by hvymetal86 » 2008-12-14 20:29

botg wrote:Ah, in that case, broken router and/or firewall. I don't actually read these topics fully anymore, I just search for some keywords.
Is that the case even though it was happening locally when I accessed it from inside the LAN with the Filezilla client on the same computer as the server? And I'm confused as to why it would only happen for the one folder consistently, and not with any others...

User avatar
boco
Contributor
Posts: 26935
Joined: 2006-05-01 03:28
Location: Germany

Re: Odd isolated directory retrieval issue

#6 Post by boco » 2008-12-14 23:04

Yes, even then it can happen, depending on the software on you server, right down to the TCP stack. It could even be flaky hardware, some problems show under special conditions only.
No support requests over PM! You will NOT get any reply!!!
FTP connection problems? Please read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
FileZilla Pro support: https://customerforum.fileZilla-project.org

hvymetal86
500 Command not understood
Posts: 5
Joined: 2008-12-14 07:46
First name: Bryan

Re: Odd isolated directory retrieval issue

#7 Post by hvymetal86 » 2008-12-15 04:16

boco wrote:Yes, even then it can happen, depending on the software on you server, right down to the TCP stack. It could even be flaky hardware, some problems show under special conditions only.
Ok, so is there any way to go about figuring out what is causing it and fixing the problem?

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

Re: Odd isolated directory retrieval issue

#8 Post by botg » 2008-12-15 07:59

First step is to uninstall all firewalls on the client and the server machine. Next step is to eliminate all NAT devices, security solutions and consumer-grade networking equipment.

hvymetal86
500 Command not understood
Posts: 5
Joined: 2008-12-14 07:46
First name: Bryan

Re: Odd isolated directory retrieval issue

#9 Post by hvymetal86 » 2008-12-15 13:29

botg wrote:First step is to uninstall all firewalls on the client and the server machine. Next step is to eliminate all NAT devices, security solutions and consumer-grade networking equipment.
The only firewall on the client or server computer is windows firewall, which is off, and I can't uninstall that, at least not that I know of. By security solutions I'm assuming you mean antivirus software? I can't operate without the NAT router I have, and can't afford enterprise grade equipment... There aren't any settings to look to change or anything?

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

Re: Odd isolated directory retrieval issue

#10 Post by botg » 2008-12-15 13:48

I don't have any easy answer for that one. I'm not using firewalls or NAT devices myself, I only know from others that they cause all sorts of problems.

pepparmint
500 Command not understood
Posts: 2
Joined: 2009-01-05 09:45

Re: Odd isolated directory retrieval issue

#11 Post by pepparmint » 2009-01-05 10:24

The issue with ECONNABORTED seems to be an infected one on these forums. 8)

Just like the OP I was getting this error in one single directory only. The others list just fine and transfer just fine with my 1024-bit certificate generated by FZ server. I am using fresh, clean installs of both products:

FileZilla Server version 0.9.29 beta
FileZilla Client 3.1.6

I got these errors while running through the default 127.0.0.1 localhost connection.

I tried moving the folder to a different harddrive, removing aliases, renaming the folder etc. What made it work in the end was to simply take all the contents out of the folder into a temp dir. From there I started cutting and pasting each item back in to the original folder, refreshing my client after each paste, looking for the error to reoccur. A lot of the contents were rubbish and old versions of free/shareware so I ended up not moving everything back but deleting a few items aswell. (Therefor I can't tell you which file(s) caused the error or if it would have worked simply cutting and pasting everything in and out).

The good news is I can now list that directory and the error hasn't reoccured. So without doubt, in my case this error was caused by some content of the folder rather than the client/server/hardware.

Hopefully this might help others with the same issue.

Best Regards!
R

hvymetal86
500 Command not understood
Posts: 5
Joined: 2008-12-14 07:46
First name: Bryan

Re: Odd isolated directory retrieval issue

#12 Post by hvymetal86 » 2009-01-05 23:24

Thanks for adding your own information to this. The developments on my end also support the theory that the cause was the contents of the folder and not anything to do with the client or the server. That directory no longer causes issues, and I have not experienced any issues with other directories. While I didn't systematically empty and re-fill the directory like pepparmint did, the contents of the directory have changed greatly since I last attempted to access it via FTP simply due to my organizing and moving of files and folders in it. Its very possible the content that was causing the issue was moved, deleted, re-named, or otherwise changed. If this happens again with any directory, I will do a complete systematic removal and replacement of everything in the folder so we can discover exactly what causes this problem.

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

Re: Odd isolated directory retrieval issue

#13 Post by botg » 2009-01-05 23:38

Directory contents shouldn't make any difference.

The fact that they do indicates that it could be length related. For example an exact multiple of the buffer length or so.

To illustrate this hypothetical scenario: Let's say buffer length is 65536. Sending listings of 100 bytes works, sending listings of 1000 bytes works, listings of 65535 work and of 65537 work. Just 65537 fail. Now consider the chance of it happening. Assuming that an average file uses about 45 bytes of listing data, it would need roughly 1450 files. Notice the 45 bytes on average. Different length of filesize, filename and such. Hitting the buffer size exactly has a quite low chance.

Now in reality this gets _much_ more complicated. There are multiple buffers (application buffer, SSL buffers, socket buffers) and how much data is in them depends on how fast the peer receives it.

In other words, incredibly hard to reproduce. Even if personally had such a directory with precisely the right contents, I'm almost certain the error would not happen if I run FZS in a debugger due to the different timings.


Guess I need to do another manual code review. :(

Post Reply