Roundcube - sqlite DATABASE ERROR: CONNECTION FAILED!

bitpt

Active Member
Sep 28, 2006
43
5
158
Roundcube - sqlite DATABASE ERROR: CONNECTION FAILED!
Unable to connect to the database!
Please contact your server-administrator.

I got this error for a few accounts only and after migrate from a server with roundcube in mysql all accounts migrated with transfer tool.
New server have sqlite roundcube db.
A few email accounts have this issue not all in server.
Fix permissions do nothing.
Create new email in same domain/cpanel user account, work fine.
Delete email account without roundcube access and create newone don't solve this.
Some of this accounts with issues have mdbox before.
Convert to maildir or mdbox don't change nothing.
Horde work fine in all accounts.

Can someone help me with this one?

Thanks
 
Last edited by a moderator:

andrew.n

Well-Known Member
Jun 9, 2020
930
345
63
EU
cPanel Access Level
Root Administrator
It seems you missed to include the error itself :D
 

bitpt

Active Member
Sep 28, 2006
43
5
158
Sorry!!!
Only for a few email accounts

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

andrew.n

Well-Known Member
Jun 9, 2020
930
345
63
EU
cPanel Access Level
Root Administrator
So its only happening for a few email accounts? Can you try to convert the database for those users?

/scripts/convert_roundcube_mysql2sqlite <user>
 
  • Like
Reactions: nlaruelle and cPRex

bitpt

Active Member
Sep 28, 2006
43
5
158
In same cpanel user account (domain.com), some emails [email protected] are ok, others [email protected] fail.
New email account works fine.
/scripts/convert_roundcube_mysql2sqlite <user>
fail with error : all accounts already in sqlite

"warn [convert_roundcube_mysql2sqlite] mysql database roundcube is missing
The optional user argument is to be used only when Roundcube has been converted to sqlite. Use bin/update-roundcube-sqlite-db Exiting."

When email account deleted and create same email after deleting, same error. But, if new email, work fine without any issue.
Changing email password do nothing, error again.
 
Last edited:

andrew.n

Well-Known Member
Jun 9, 2020
930
345
63
EU
cPanel Access Level
Root Administrator
Have you tried the script it says?

bin/update-roundcube-sqlite-db
 
  • Like
Reactions: bitpt

bitpt

Active Member
Sep 28, 2006
43
5
158
Solved!!!
after search for
bin/update-roundcube-sqlite-db

path is
# /home/virtfs/<user>/usr/local/cpanel/bin/update-roundcube-sqlite-db
Roundcube is up to date. Execute '/home/virtfs/<user>/usr/local/cpanel/bin/update-roundcube-sqlite-db --force' to force an update.


# /home/virtfs/<user>/usr/local/cpanel/bin/update-roundcube-sqlite-db --force
/home/virtfs/<user>/usr/local/cpanel/bin/update-roundcube-sqlite-db: running in the background.

all accounts ok
Thanks for your time
 
  • Like
Reactions: andrew.n

nlaruelle

Active Member
Sep 4, 2017
38
16
58
Belgium
cPanel Access Level
Website Owner
Hello,

Sorry, I had this error today for 1 mailbox of 1 user :
Roundcube database error : connection failed. Unable to connect to the database…

I was already on SQLite and all rebuild commands shared around did not the trick.

The solution was for me…

finally archiving / removing the rcube.db files in the /etc/ cPanel user folder…

Code:
/home/$user/etc/example.com/*.rcube.db*
…works and we get back access to Roundcube without any data loss.

Proceed with caution and backup all your files before trying to delete something.
 
  • Like
Reactions: cPRex