Error: Connection refused / Connection reset by peer

February 10, 2021

"connection refused" and "connection reset by peer" errors are almost always caused by one of the following:

1. An incorrect port number
2. Firewall rules blocking the connection
3. The sftp/ftp/mysql server daemon not running

There are a few different things we can try:

1. Ask the customer to double check their port number.
2. Ask the customer if they are willing to switch to a more reliable protocol. FTP -> SFTP or MySQL -> MySQL over SSH.
2. Ask the hosting provider to re-whitelist the IP addresses. With some hosts, un-whitelisting, waiting 24 hours, and then re-whitelisting solves the problem.
3. Schedule backups for a different time. If the customer's server gets a lot of traffic, switching to a time when there's less traffic can help.
4. Ask the hosting provider to look into the issue. Hosting providers should know more about their firewall rules than we do. Also, they often keep logs that can be used for troubleshooting.