Plesk

Plesk for Windows login page shows: No connection could be made because the target machine actively refused it

Symptoms

  1. Plesk login page is showing an error:

    ERROR: PleskMainDBException
    No connection could be made because the target machine actively refused it.

    0: common_func.php3:637
    reconnect()
    1: common_func.php3:600
    db_connect()
    2: auth.php3:134

  2. The following error appears:

    [panel]: Error during product key mode determination, details: No connection could be made because the target machine actively refused it. ;
    trace:
    #0 C:Program Files (x86)ParallelsPleskadminplibdb.php(411): reconnect()
    #1 C:Program Files (x86)ParallelsPleskadminplibfunctions.php(2791): db_connect()
    #2 C:Program Files (x86)ParallelsPleskadminplibfunctions.php(2808): isPpaKeyRequired()
    #3 C:Program Files (x86)ParallelsPleskadminplibcommon_func.php3(7): require_once('C:Program File...')
    #4 C:Program Files (x86)ParallelsPleskadminplibauth.php(93): require_once('C:Program File...')
    #5 {main} ERR (3) [panel]: Unable to get key: error:
    C:Program Files (x86)ParallelsPleskadminrepositorylockrepository: cannot create: Permission denied PHP Warning:mysqli::close():
    Couldn't fetch mysqli in C:Program Files (x86)ParallelsPleskadminplibdb.php on line 491 ERR (3) [panel]: No connection could be made because the target machine actively refused it. :
    0: db.php:451 reconnect()
    1: db.php:411 db_connect()
    2: auth.php:140 PleskMainDBException: No connection could be made because the target machine actively refused it. file: C:Program Files (x86)ParallelsPleskadminplibdb.php line: 451 code:

Cause

Resolution

Note: To apply the solution from this article it is required to have RDP access to the server. Please contact your hosting provider support or server's administrator if you don't have RDP access or ask them to apply the solution.

  1. Make sure that the error is the same as in symptoms.
  2. Connect to the server using RDP.
  3. Fix incorrect
    Plesk SQL Server
    service configuration or state.

    3.1. Restart
    Plesk SQL Server
    service using Plesk Services Monitor.

    3.2. Make sure that
    my.ini
    exists in "
    %plesk_dir%MySQLData
    " and that
    basedir
    and
    datadir
    parameters have the correct values:

    C:> findstr dir "%plesk_dir%Mysqlmy.ini"
    port=8306
    basedir=C:Program Files (x86)ParallelsPleskMySQL
    datadir=C:Program Files (x86)ParallelsPleskMySQLData
    tmpdir=C:Program Files (x86)ParallelsPleskMySQLData

    3.3. Ensure that all options and extensions specified in
    my.ini
    are valid.

  4. If MySQL goes down, again, with error 1067 "The process terminated unexpectedly":

    Check the MySQL error logs in
    %plesk_dir%MySQLData<computer_name>.err
    :

    4.1. If the following error occurs:

    130904 20:23:16 InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    InnoDB: Restoring possible half-written data pages from the doublewrite

    This may mean that PSA or another database is broken, or there is inconsistent information in one of the databases. Please see the following article:

    #213914385 MySQL service fails to start: Can't open and lock privilege tables: Incorrect file format 'host'

    4.2. The other possible errors in the MySQL error log file:

    Version: '5.5.31' socket: '' port: 8306 MySQL…