Operating System & Version
CENTOS 7.8 kvm
cPanel & WHM Version
90.0.10

Kent Brockman

Well-Known Member
PartnerNOC
Jan 20, 2008
1,248
50
178
Buenos Aires, Argentina
cPanel Access Level
Root Administrator
Hello guys. Today, sudenly one of the servers showed this error when trying to access Roundcube from any of the accounts.

DATABASE ERROR: CONNECTION FAILED!
Unable to connect to the database!
Please contact your server-administrator.


My current server:
CENTOS 7.8 kvm
cPanel v90.0.10
mariadb 10.2.33
exim 4.93-5

phpmyadmin does not show any "roundcube" database, so I guess it should have been converted to sqlite sometime ago.
Although, in /var/cpanel/roundcube/log/errors.log I see a lot of messages like this:

Code:
[22-Sep-2020 12:21:24 -0300]: <7dfff02e> DB Error: SQLSTATE[42000] [1049] Unknown database 'roundcube' (GET /cpsess0247389971/3rdparty/roundcube/index.php?login=1&post_login=59756966391281)
[22-Sep-2020 12:21:25 -0300]: <82222b00> DB Error: SQLSTATE[42000] [1049] Unknown database 'roundcube' in /usr/local/cpanel/base/3rdparty/roundcube/program/lib/Roundcube/rcube_db.php on line 175 (POST /cpsess9276178062/3rdparty/roundcube/index.php?_task=mail&_action=refresh)
[22-Sep-2020 12:21:25 -0300]: <82222b00> DB Error: SQLSTATE[42000] [1049] Unknown database 'roundcube' (POST /cpsess9276178062/3rdparty/roundcube/index.php?_task=mail&_action=refresh)
[22-Sep-2020 12:21:45 -0300]: <b5a3c411> DB Error: SQLSTATE[42000] [1049] Unknown database 'roundcube' in /usr/local/cpanel/base/3rdparty/roundcube/program/lib/Roundcube/rcube_db.php on line 175 (POST /cpsess0247389971/3rdparty/roundcube/index.php?login=1&post_login=59756966391281)
[22-Sep-2020 12:21:45 -0300]: <b5a3c411> DB Error: SQLSTATE[42000] [1049] Unknown database 'roundcube' (POST /cpsess0247389971/3rdparty/roundcube/index.php?login=1&post_login=59756966391281)
So, it looks like it's searching the "roundcube" mysql db. How come it has vanished suddenly?

Code:
# ls /var/lib/mysql/round*
ls: cannot access /var/lib/mysql/round*: No such file or directory
I tried switching off and on Roundcube from Tweak Settings. Didn't work.
I tried upcp --force to see if it can be reinstalled? Not the path.

In the meantime I've installed Horde so customers can access webmail from there, but it's not the best suited solution.

What I think I need is a way to fully reinstall Roundcube, or at least, force migrating it to sqlite, right? How can I fix this?

Thanks!
 

Attachments

andrew.n

Well-Known Member
Jun 9, 2020
272
55
28
EU
cPanel Access Level
Root Administrator

Kent Brockman

Well-Known Member
PartnerNOC
Jan 20, 2008
1,248
50
178
Buenos Aires, Argentina
cPanel Access Level
Root Administrator
Hello Andrew. I've readed that before I post this. The problem in my server is that THERE IS NO roundcube database to convert to innodb... Maybe it is already converted to sqlite. But I cannot be sure. That's why I expected some ideas from i.e. @cPanelLauren
 

andrew.n

Well-Known Member
Jun 9, 2020
272
55
28
EU
cPanel Access Level
Root Administrator
I hope you also welcome answers from others?! Have you tried to rebuild the database?

/usr/local/cpanel/bin/update-roundcube --force
 
  • Like
Reactions: Kent Brockman

Kent Brockman

Well-Known Member
PartnerNOC
Jan 20, 2008
1,248
50
178
Buenos Aires, Argentina
cPanel Access Level
Root Administrator
Hi there. I'm open to any valid solution, yes!
I tried your script but it is not found, so I did a search in the file system to find a couple similar commands. The one that SOLVED the issue was this:

Code:
/usr/local/cpanel/bin/update-roundcube-db
Didnt' need to use the --force instruction. It just rebuild the database and Roundcube started working again.

Now that the mysql database was in place, I did the conversion to sqlite using the command as explained in How to Convert Roundcube to SQLite - cPanel Knowledge Base - cPanel Documentation

Code:
/usr/local/cpanel/scripts/convert_roundcube_mysql2sqlite
And now it's all ok and using sqlite as expected.
Very thanks for the idea as it lead me to the right path ;-)
 

andrew.n

Well-Known Member
Jun 9, 2020
272
55
28
EU
cPanel Access Level
Root Administrator
Glad you were able to fix it! great work!
 

cPanelLauren

Technical Support Community Manager
Staff member
Nov 14, 2017
13,271
1,243
313
Houston
HI @Kent Brockman

I'm sorry I didn't get to this sooner but I am glad to see you were able to resolve the issue. Thanks for updating here with how you fixed it as well.