A connection attempt failed with "econnrefused - connection refused by server"
With this error, you’ll surely be frustrated. But we have a nice and simple solution to the connection attempt failed with the "econnrefused - connection refused by server" error that won’t take much of your time and will resolve your issue as well.
Ways to fix connection attempt failed with "econnrefused - connection refused by server" error:
Because of the several possible reasons for the existence of this error, we have highlighted multiple ways to resolve this issue too. So, let’s discuss each one of them here.
Wrong Port usage:
The most common issue while encountering this error is the wrong port usage. A simple fix here is to change the port from 21 to 22 or vice versa, and there is a chance that you’ll be able to access your websites normally.
You can add the port number numerically in the Filezilla control panel.
The main cause of the issue is the reliance on FTP and SFTP on different ports by default.
Issues in the explicit or implicit FTPS Ports:
The explicit FTPS uses port 21 as default, whereas the implicit one uses 900 and considers the connection to be encrypted from the beginning. There could be a situation where the site administrator has changed the default settings. So, contacting the administer might help resolving the "econnrefused - connection refused by server" error. Or you can continue with the solution below and leave this as your last resort.
A connection block:
There can be a connection block, which could be causing all this issue. So, here is the method for checking if your ports are blocked:
- Check if the firewalls allow the outbound traffic
- Inbound connections to TCP ports 21 and 22 are fully functional; check it from the server’s end
- Check if the file server is listening to the right ports.
- Check if your windows firewalls and other security software on your systems aren’t interfering with “filezilla.exe.”
Add FTP To FQDN:
If you have encountered this error on your website and want a solution, then the first thing to check is for the addition of FTP. to the beginning of your fully qualified domain name. This is a must thing to do if you are using applications like SiteLock.
Fixing this error will make the connection complete, and thus your visitors won’t have to face this issue.
Switch between Passive/Active transfer modes:
- If the above solutions haven’t been successful for you, then you can use the active/passive transfer mode switching, and it can help. Here’s how to do it:
- Open Filezilla
- Click Edit, hover to settings.
- In the connection tab, you’ll find FTP.
- Now select the active or passive mode that you want to switch to.
- Besides, also check the box with "Allow fall back to another transfer mode on failure".
- Click Okay and check if you have resolved your issue.
There is a high chance that the connection attempt failed with "econnrefused - connection refused by server" would be resolved using any of the above methods. But if the problem still exists, contact the site administrator as they might have something faulty at their end, which requires fixing.
Also Check: How to add Favicon