Connection attempt failed with "ECONNREFUSED - Connection refused by server" error.

Created:

2016-11-16 12:49:27 UTC

Modified:

2017-06-19 13:34:36 UTC

5

Was this article helpful?


Have more questions?

Submit a request

Connection attempt failed with "ECONNREFUSED - Connection refused by server" error.

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 11.5 for Linux
  • Plesk 12.0 for Linux
  • Plesk 9.5.2 for Linux

Symptoms

The follwoing error in FTP client appears when accessing with Implicit over FTPS :

Status: Resolving address of server.hostname
Status: Connecting to 1.2.3.4:990...
Status: Connection attempt failed with "ECONNREFUSED - Connection refused by server".

Cause

FTPS does not listen on port 990 permanently as secure connection initiates via port 21 first.After establishing the connection to port 21 to secure an FTP session, a client application sends the command AUTH SSL according to RFC 2228 . Then port 990 is opened and secure connection is established.

Resolution

Set the FTP client to use " Require explicit FTP over TLS " and standard FTP protocol on port 21 for connection.

Then check FTPS connection with following steps:

  1. Initiate FTP session on the server

    # openssl s_client -connect 127.0.0.1:21 -starttls ftp
  2. Connect using secure tunnel:

    # lftp
    lftp :~> set ftp:ssl-force true
    lftp :~> connect ftp.example.com
    lftp ftp.example.com:~> login <username>
  3. Connect via Filezilla:

    ftpes://example.com

Refer to establish Explicit FTPS: https://wiki.filezilla-project.org/SSL/TLS

Have more questions? Submit a request
Please sign in to leave a comment.