How To Solve?: «ECONNREFUSED — connection refused by server»

  • Tutorial

Chances are that while you've been using FileZilla you've also come across the ECONNREFUSED — connection refused by a server error. If that's the case — great that you've found this tutorial! I am going to show you three methods that might help you with resolving this FTP error.


First Method. Changing FileZilla's Default Port Value


The error could appear due to using the incorrect port while connecting through FileZilla. In this situation, you just need to change the default FTP port to the default SFTP port number. Simply change 21 to 22 on the "Port" input box.


Alt Text


Second Method. Disabling Anti-Virus/Firewall


Sometimes this error can occur when anti-virus software and/or firewall is refusing FileZilla's tries to make a connection.


In the event where anti-virus or firewall is causing ECONNREFUSED, what you need to do is simple. What you need to do: disable anti-virus and firewall and try to connect again. Firstly I'll show you how to do this on macOS :


  • Click the "Apple" icon on the top menu bar. Navigate to "System Preferences".
  • Find the "Security & Privacy" settings.

Alt Text


  • Go to the "Firewall" tab and select "Turn Off Firewall".

Alt Text


If you're using Windows, follow these steps:


  • Hit the "Windows" key and type in "Control Panel".
  • Then go to "System and Security" and find "Windows Defender Firewall".

Alt Text


  • Locate "Turn Windows Defender Firewall on or off" selection on the sidebar on the left.

Alt Text


  • Alter the options to switch off Windows Defender Firewall for public and private networks, in the following window and click "Ok".

For a thorough explanation of how to deactivate various anti-virus software, take a look at this post.


If turning off the anti-virus or firewall doesn't help and you still get the ECONNREFUSED — connection refused by the server error — try the following method.


Third Method. Altering FileZilla's Network Configuration Wizard


What should you do if the previous solutions don't bring the desired result? To fix the error, you can try altering FileZilla's network configurations:



Alt Text


  • When "Firewall and router configuration wizard" window appears, click "Next" to continue.
  • As the Default transfer mode select "Passive (recommended)". Also, tick "Allow fallback to another transfer mode on failure" selection.

Alt Text


  • Choose "Use server's external IP address instead".
  • Select the "Get the external IP address from the following URL". Enter the default value in case the input field is empty and continue (default value is http://ip.filezilla-project.org/ip.php).
  • Do not adjust the port range configuration and then choose the "Ask operating system for a port".

At this point, you need to ensure that you've made correct configurations. Hit the "Test" button to let FileZilla try to make a connection to probe.filezilla-project.org and it will perform some simple benchmarks.


If the test goes without any failures, attempt to connect to your hosting account once more. It should work perfectly well. In case the "ECONNREFUSED" error repeats itself, you should try reaching out to your hosting customer support to get some help.


To Conclude


There you go — three methods of fixing ECONNREFUSED — connection refused by server error. Hopefully, one of these three methods will help you to fix this FileZilla error! If you have questions or more solutions for this error, do not hesitate to leave a comment!

AdBlock has stolen the banner, but banners are not teeth — they will be back

More
Ads

Comments 1

    0

    I deeply appalled by advises to 'turn off firewall' for such mundane problem.


    • How to light the bulb?
    • Method #3: Remove all locks and leave doors open.

    Only users with full accounts can post comments. Log in, please.