Question

Periodically unable to connect to FTP

When trying to connect to FTP using Filezilla, I occasionally get “Error: Could not connect to server”. Then, without doing anything, it will work a few hours later. This has happened a few times now. Each time it fails without any interaction, and then self corrects without any changes.


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

alexdo
Site Moderator
Site Moderator badge
April 4, 2024

Heya @bffe20e2d092407798209addeb821c

FileZilla supports both active and passive FTP modes. If you’re having trouble connecting, try switching between active and passive mode in FileZilla’s settings. Passive mode tends to be more firewall-friendly.

Also FileZilla has logs that can provide valuable information about connection attempts and errors. Check the FileZilla logs to see if there are any specific error messages that might indicate the cause of the connection issues.

If you continue to experience issues with FileZilla, try using a different FTP client to see if the problem persists. This can help determine if the issue is specific to FileZilla or if it’s a more general network or server problem.

Hope that this helps!

Bobby Iliev
Site Moderator
Site Moderator badge
April 2, 2024

Hello,

If you are still seeing this, what I could recommend here is to use SFTP instead of FTP. SFTP provides an additional layer of security but is also typically more reliable. You can set this up in Filezilla using port 22 and your SSH credentials.

If you switch to SFTP and still encounter issues, it’s a good idea to check the SSH logs. To check the SSH logs, you’ll need to access your server via SSH and navigate to the log directory at /var/log/. The primary file you’re looking for is auth.log on Ubuntu systems or secure on RHEL. Use a command like sudo tail -100 /var/log/auth.log to view the logs. In these logs, you’ll find records of all authentication attempts, successful connections, and errors.

Lastly, if you’re still persists, use a tool like MTR to test the network connectivity. To use MTR, you’ll need to run it from the command line on your local machine:

mtr your_server_ip

Change the your_server_ip with the IP address of the server you’re trying to reach. This will display the latency and packet loss for each hop, helping you pinpoint where potential issues might be occurring.

Let me know how it goes!

Best,

Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more