Adrian World Design
  • Services
    • Website Consulting
    • Startup Consulting
    • Zend Development
  • Portfolio
    • My Framework
  • Knowledge
    • Web Standards
    • PHP bare-bones
    • Zend Framework
    • Zend Framework 2
    • Git - Github
    • Search Engine Optimization
    • Web Hosting
    • Linux
    • Microsoft Windows
    • Web Browsers
    • Mobile Devices
  • About
    • Business
    • Professionally
    • Personally
  • Contact
    • Contact Form
    • Phone
    • Email
    • Messaging

Knowledge Base Overview

Connection aborted

Knowledge ⇒ Web Hosting ⇒ Tips and Tricks ⇒ Connection aborted
Tweet
Share on Tumblr

Created: May 11, 2012, 12:06:18 PM CSTLast updated: Sep 19, 2012, 8:02:09 AM CST

The problem I explain here is usually related to FTP in passive mode and when you use VSFTPD on Linux as your FTP server and FileZilla as the FTP client. Your FTP server in this case is usually also behind a firewall.

If you use a command line ftp client or other GUI FTP clients you may be just fine without seeing any problems. Or maybe see other forms of error messages.

In case you face the problem described here while setting up FTP in the Amazon cloud, I have a document Enable FTP for passive mode that has more detailed information specific to AWS EC2.

Connection aborted

When you have a FTP server your FileZilla client may sort of hang like this:

Status: Retrieving directory listing...
Command: PWD
Response: 257 "/"
Command: TYPE I
Response: 200 Switching to Binary mode.
Command: PASV
Error: Disconnected from server: ECONNABORTED - Connection aborted
Error: Failed to retrieve directory listing

Note that the line Command: PASV asked for passive mode but it never completes.

That's because FileZilla is verifying something in the background. Unfortunately you cannot see an error even when you turn on debugging. Because this problem is most likely linked to your own FTP server and you use vsftpd as your FTP server you can turn on ftp logging and then you will find a response that looks somehting like this:

"227 Entering Passive Mode (10,12,35,53,75,191)."

Note the first four numbers in the parenthesis 10,12,35,53. This is the host's local IP address. In this case a private 10.x.x.x range.

If that server is shielded from the Internet with NAT (Network Address Translation) your FileZilla client will receive this number as the IP for passive mode and compare it with its known public address. Because it is not the same address it will terminate, i.e. disconnect from the server. Connection aborted!

Set passive address

The solution is rather simple. You will have to set the public IP address into the VSFTPD configuration. Look in the man pages for pasv_address for more information.

If you don't set the pasv_address which has to be your external IP address vsftpd will submit the local server IP address which is 10.12.35.53 in the example I've shown above.

blog comments powered by Disqus
Prev
Next

Powered by FeedBurner Load our "Knowledge Base" feed in your RSS feeder

Follow us on Twitter
Follow us on Facebook
Follow us on LinkedIn
Follow us on Google+

All rights reserved, Adrian World Design ©2009–2021 Powered by Wejas Framework

Jump to Top