Applicable to:
- Plesk for Linux
Symptoms
-
Roundcube webmail fails to open with one of the following error messages showing up in the browser:
PLESK_INFO: Database error: connection failed!
Unable to connect to database!
Please contact your server-administrator.OR
PLESK_INFO: Oops... something went wrong!
An internal error has occurred. Your request cannot be processed at this time.
For administrators: Please check the application and/or server error logs for more information. -
When removing an email address in Plesk, the operation fails with the following error message:
PLESK_ERROR: DB query failed: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'roundcubemail.users' doesn't exist, query was: DELETE FROM `roundcubemail`.`users` WHERE (username = 'jdoe@example.com)
-
Error messages that are similar to the following are logged in
/var/log/plesk-roundcube/errors
:CONFIG_TEXT: [02-Aug-2024 15:03:23 +0000]: <q93si64j> DB Error: SQLSTATE[HY000] [1049] Unknown database 'roundcubemail' in /usr/share/psa-roundcube/program/lib/Roundcube/rcube_db.php on line 201 (GET /roundcube/index.php?_user=plesktest%40chaheko.com)
[02-Aug-2024 15:03:38 +0000]: <rbh6cg56> DB Error: SQLSTATE[HY000] [1049] Unknown database 'roundcubemail' in /usr/share/psa-roundcube/program/lib/Roundcube/rcube_db.php on line 201 (GET /)CONFIG_TEXT: DB Error: [1146] Table ‘roundcubemail.session’ doesn’t exist (SQL Query: INSERT INTO `session` ...
Cause
The
roundcubemail
database has become corrupted (most often due to hardware failures, sudden server shutdowns and interrupted updates).
Resolution
Depending on your exact situation, restore the Roundcube database by using one of the following solutions:
-
Connect to the Plesk server via SSH
-
Switch to the directory with daily dumps:
# cd /var/lib/psa/dumps
-
List all available Plesk daily dumps:
# ls -l mysql.daily*
-rw------- 1 root root 236253 Feb 3 01:51 mysql.daily.dump.0.gz
-rw------- 1 root root 229653 Feb 2 01:48 mysql.daily.dump.1.gz
-rw------- 1 root root 222485 Feb 1 01:56 mysql.daily.dump.2.gzNote: The file
mysql.daily.dump.0.gz
is the most recent dump. -
Restore the
roundcubemail
database from the most recent daily dump (mysql.daily.dump.0.gz
in this command):# zcat mysql.daily.dump.0.gz | sed -n '/-- Current Database: `roundcubemail`/,/-- Current Database:*/p' | MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -uadmin --default-character-set=utf8
- Connect to the Plesk server via SSH
-
Create a copy of the
roundcubemail
database directory:# cp -a /var/lib/mysql/roundcubemail /var/lib/mysql/roundcubemail_bak
-
Uninstall Roundcube webmail:
# plesk installer remove plesk --components roundcube
-
Remove any Roundcube leftovers:
# dpkg --purge plesk-roundcube
# rm -rf /usr/share/psa-roundcube
# rm -rf /etc/psa-webmail/roundcube
-
Drop the
roundcubemail
database:# plesk db "drop database roundcubemail"
-
Install Roundcube:
# plesk installer add plesk --components roundcube
Comments
0 comments
Please sign in to leave a comment.