Symptoms
-
An FTP connection to the Plesk server with the IP address
203.0.113.2
is dropped randomly when FileZilla client is used. The following error is shown in FileZilla:Error: The data connection could not be established: ECONNREFUSED - Connection refused by server.
-
On failed attempts to connect, the following error can be found in the
/var/log/auth.log
log file:plesk proftpd[10414]: 0.0.0.0 (203.0.113.2[203.0.113.2]) - mod_tls/2.7: unexpected OpenSSL error, disconnecting
Cause
A combination of unstable Internet connection, blocked FTP active mode, and FileZilla's settings:
-
Port 20 is reported to be filtered on the server:
# nmap 203.0.113.3 -p 20
20/tcp filtered ftp-dataThe incoming traffic to port 20/tcp(ftp-data) has to be allowed in order to establish the FTP data transfer while connecting via FTP in
Active Mode
. -
By default, in FileZilla client > Site Manager > Transfer Settings > Transfer mode is set to Default. In this mode, FileZilla first establishes a connection with the FTP server using
Passive mode
. After a short Internet connectivity issue, in an attempt to reconnect to FTP it will try usingActive mode
instead, which is not allowed on the server's side.
Resolution
Use one of the possible solutions:
-
Open port 20 on the server following the steps from the
Resolution
section of the article below: Unable to connect to a Plesk server via FTP when FTP ports are filtered by a firewall: Connection timed out.
-
Use only Passive mode to connect over FTP in the Filezilla client:
- Open FileZilla client.
- Go to Site Manager > Transfer Settings.
- Set Transfer mode value to Passive and apply changes: