Applicable to:
- Plesk for Windows
Symptoms
-
Plesk login page is showing an error:
PLESK_INFO: 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 -
The following error appears:
PLESK_INFO: [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)\\Parallels\\Plesk\\admin\\plib\\db.php(411): reconnect()
#1 C:\\Program Files (x86)\\Parallels\\Plesk\\admin\\plib\\functions.php(2791): db_connect()
#2 C:\\Program Files (x86)\\Parallels\\Plesk\\admin\\plib\\functions.php(2808): isPpaKeyRequired()
#3 C:\\Program Files (x86)\\Parallels\\Plesk\\admin\\plib\\common_func.php3(7): require_once('C:\\Program File...')
#4 C:\\Program Files (x86)\\Parallels\\Plesk\\admin\\plib\\auth.php(93): require_once('C:\\Program File...')
#5 {main} ERR (3) [panel]: Unable to get key: error:
C:\\Program Files (x86)\\Parallels\\Plesk\\admin\\repository\\lock\\repository: cannot create: Permission denied PHP Warning:mysqli::close():
Couldn't fetch mysqli in C:\\Program Files (x86)\\Parallels\\Plesk\\admin\\plib\\db.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)\\Parallels\\Plesk\\admin\\plib\\db.php line: 451 code:
Cause
- The Plesk MySQL server is stopped.
- MySQL databases are corrupted.
- Incorrect permissions on some Plesk directories (Read-only attribute).
- Incorrect parameters in configuration file.
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.
- Make sure that the error is the same as in symptoms.
- Connect to the server using RDP.
-
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%\\MySQL\\Data\\
" and thatbasedir
anddatadir
parameters have the correct values:C:\> findstr dir "%plesk_dir%\\Mysql\\my.ini"
port=8306
basedir=C:\\Program Files (x86)\\Parallels\\Plesk\\MySQL
datadir=C:\\Program Files (x86)\\Parallels\\Plesk\\MySQL\\Data
tmpdir=C:\\Program Files (x86)\\Parallels\\Plesk\\MySQL\\Data3.3. Ensure that all options and extensions specified in
my.ini
are valid. -
If MySQL goes down, again, with error 1067 "The process terminated unexpectedly":
Check the MySQL error logs in
%plesk_dir%\\MySQL\\Data\\<computer_name>.err
:4.1. If the following error occurs:
CONFIG_TEXT: 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 doublewriteThis 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:
CONFIG_TEXT: Version: '5.5.31' socket: '' port: 8306 MySQL Community Server (GPL)
1 1 1 IInnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.Sometimes, it does not mean the database has been corrupted. Make sure that the files in
%plesk_dir%\\MySQL\\Data\\
do not have "Read-only" attribute (sub-directories can have this attribute). -
If the files are read-only, it is needed to to right-click on
%plesk_dir%\\Plesk\\MySQL\\Data
, go toProperties
, un-check "Read-only" attribute and click OK. Then, try to start "Plesk SQL Server" service again.5.1 Check
Event Viewer
logs for errors inApplication
logs section.5.2. In case of the following error, change the
innodb_log_file_size
value in%plesk_dir%\\MySQL\\Data\\my.ini
according to the error. In this case, it is needed to specify the file size as10M
CONFIG_TEXT: InnoDB: Error: log file .\\ib_logfile0 is of different size 0 10485760 bytes
InnoDB: than specified in the .cnf file 0 5242880 bytes! -
If Plesk shows an error like above in Case 2 :
This means incorrect file permissions on some files are set in
%plesk_dir%\\admin
. It is possible to restore the default permissions using thePlesk Reconfigurator
.- Run the Plesk Reconfigurator as administrator:
%plesk_bin%\\reconfigurator.exe
-
Check component and folder permissions > Browse , select
C:\\Program Files (x86)\\Parallels\\Plesk\\admin
and press Check
- Run the Plesk Reconfigurator as administrator:
Comments
0 comments
Please sign in to leave a comment.