Difference between revisions of "Plesk Fatal Exception"
Rootadminacc (talk | contribs) |
Rootadminacc (talk | contribs) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 52: | Line 52: | ||
<pre>ERROR 1049 (42000): Unknown database 'psa' | <pre>ERROR 1049 (42000): Unknown database 'psa' | ||
/etc/init.d/psa: line 269: /opt/psa/admin/sbin/websrvmng: No such file or directory</pre> | /etc/init.d/psa: line 269: /opt/psa/admin/sbin/websrvmng: No such file or directory</pre> | ||
The fix is below: | |||
===== Saved admin password fix ===== | ===== Saved admin password fix ===== | ||
Check if there is a psa database. The fix | Check if there is a psa database. The fix when going into MySQL or to Plesk do the following: | ||
<pre>cat /etc/psa/.psa.shadow</pre> | <pre>cat /etc/psa/.psa.shadow</pre> | ||
'''Copy the password including == ''' (This is the Encrypted_Password used later) | '''Copy the password including == ''' (This is the Encrypted_Password used later) | ||
<pre>/etc/init.d/mysql stop (/etc/init.d/mysqld stop for CentOS) | <pre>/etc/init.d/mysql stop (/etc/init.d/mysqld stop for CentOS) | ||
ps aux | grep mysql | ps aux | grep mysql | grep -v grep | ||
kill <process_ID> | kill <process_ID> | ||
mysqld_safe --skip-grant-tables & | mysqld_safe --skip-grant-tables & | ||
mysql -uadmin -p | mysql -uadmin -p</pre> | ||
use mysql | Press enter | ||
<pre>use mysql | |||
select password from mysql.user where user="admin";</pre> | select password from mysql.user where user="admin";</pre> | ||
Copy password beginning with * just in case | Copy password beginning with * just in case |
Latest revision as of 09:51, 23 April 2013
Plesk Fatal Exception
Password File Deleted
If this errors come up in Plesk:
ERROR: PleskFatalException Unable to connect to database: get_admin_password() failed: file_get_contents() failed: Constant PRODUCT_MODE already defined 0: common_func.php3:93 psaerror(string 'Unable to connect to database: get_admin_password() failed: file_get_contents() failed: Constant PRODUCT_MODE already defined') 1: auth.php3:125 ERROR: PleskFatalException Unable to connect to database: get_admin_password() failed: file_get_contents() failed: Constant PRODUCT_MODE already defined 0: common_func.php3:93 psaerror(string 'Unable to connect to database: get_admin_password() failed: file_get_contents() failed: Constant PRODUCT_MODE already defined') 1: auth.php3:125
The Plesk password file /etc/psa/.psa.shadow has been removed thus causing the inability for Plesk to connect to MySQL. Recreate the file and reset the Plesk password.
saved admin password is incorrect (MySQL Entry)
If you receive ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: YES) or:
ERROR: PleskFatalException Unable to connect to database: saved admin password is incorrect. 0: common_func.php3:139 psaerror(string 'Unable to connect to database: saved admin password is incorrect.') 1: auth.php3:125 ERROR: PleskFatalException Unable to connect to database: saved admin password is incorrect. 0: common_func.php3:139 psaerror(string 'Unable to connect to database: saved admin password is incorrect.') 1: auth.php3:125
ERROR: PleskFatalException Unable to connect to database: saved admin password is incorrect. 0: common_func.php3:150 psaerror(string 'Unable to connect to database: saved admin password is incorrect.') 1: auth.php3:107 ERROR: PleskFatalException Unable to connect to database: saved admin password is incorrect. 0: common_func.php3:150 psaerror(string 'Unable to connect to database: saved admin password is incorrect.') 1: auth.php3:107
ERROR 1049 (42000): Unknown database 'psa' /etc/init.d/psa: line 269: /opt/psa/admin/sbin/websrvmng: No such file or directory
The fix is below:
Saved admin password fix
Check if there is a psa database. The fix when going into MySQL or to Plesk do the following:
cat /etc/psa/.psa.shadow
Copy the password including == (This is the Encrypted_Password used later)
/etc/init.d/mysql stop (/etc/init.d/mysqld stop for CentOS) ps aux | grep mysql | grep -v grep kill <process_ID> mysqld_safe --skip-grant-tables & mysql -uadmin -p
Press enter
use mysql select password from mysql.user where user="admin";
Copy password beginning with * just in case
update user set password=password('Encrypted_Password') where user="admin"; flush privileges; quit /etc/init.d/mysql stop (/etc/init.d/mysqld stop for CentOS) kill <process_IDs> /etc/init.d/mysql start (/etc/init.d/mysqld start for CentOS)
Refresh Plesk. If the server does not have the psa database or the fix does not work, rebuild it.
Can't connect to MySQL Database
ERROR: PleskFatalException Unable to connect to database: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
0: common_func.php3:93 psaerror(string 'Unable to connect to database: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)') 1: auth.php3:127
The MySQL service did not load when the server was started.
Solution: stop/start or restart the MySQL service. If you get the below error:
ERROR: PleskFatalException Unable to connect to database: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
0: common_func.php3:150 psaerror(string 'Unable to connect to database: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)') 1: auth.php3:107 ERROR: PleskFatalException Unable to connect to database: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
0: common_func.php3:150 psaerror(string 'Unable to connect to database: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)') 1: auth.php3:107
Check the error log /var/log/mysql/error.log to see if you can see:
120724 10:30:15InnoDB: Warning: difficult to find free blocks from InnoDB: the buffer pool (2299 search iterations)! Consider InnoDB: increasing the buffer pool size. InnoDB: It is also possible that in your Unix version InnoDB: fsync is very slow, or completely frozen inside InnoDB: the OS kernel. Then upgrading to a newer version InnoDB: of your operating system may help. Look at the InnoDB: number of fsyncs in diagnostic info below. InnoDB: Pending flushes (fsync) log: 0; buffer pool: 0 InnoDB: 130 OS file reads, 0 OS file writes, 0 OS fsyncs InnoDB: Starting InnoDB Monitor to print further InnoDB: diagnostics to the standard output.
This generally means a large amount of data is being written to MySQL. Try to confirm which databases use large BLOB or Text fields and if you are importing lots of records.
Increase the innodb_buffer_pool_size entry in my.cnf from 2M to 20M. The ibdata file can be large in size (5-20GB+) however any larger can cause issues. Altering query_cache_size may help too. Restart MySQL.
You may also get the below error when accessing emails:
Database Connection Error DB Error: connect failed Verify the SQL database is running Check the SQL server is listening to the specified socket, IP address Check the global configuration file (/var/www/atmail/libs/Atmail/Config.php) for the correct database details Verify the database server is running correctly Verify the MySQL /etc/my.cnf file has the correct settings for the number of database connections
Disabling Crontab
ERROR: PleskFatalException Crontab->export() failed: crontabmng failed: crontabmng syntax: list to list all users that have modifiable crontab get <username> to show crontab of <username> set <username> <filename> to set crontab of <username> from <filename> allow <username> to allow crontab of <username> deny <username> to deny crontab of <username> remove <username> to remove crontab of <username> System error: crontab execution error Additionally, an exception has occurred while trying to report this error: PleskObjectNotFoundException Object not found: Scheduled tasks 0: CrontabTaskToggleUIPointer.php:51 CrontabTaskToggleUIPointer->accessItem(string 'GET', NULL null) 1: UIPointer.php:595 UIPointer->access(string 'GET') 2: plesk.php:52
Domain cannot be opened
SysUser: unable to select: no such row in the table
Internal error: Unable to load object of type SysUser with id=1: SysUser: unable to select: no such row in the table Message Unable to load object of type SysUser with id=1: SysUser: unable to select: no such row in the table File common_func.php3 Type PleskFatalException
Unable to create SysUser object: SysUser: unable to select: no such row in the table 0: /usr/local/psa/admin/plib/class.DomainControlForm.php:168 DomainControlForm->assign(object of type BsDomain) 1: /usr/local/psa/admin/htdocs/domains/dom_ctrl.php3:149