Author Topic: Zentyal 2.2 - Roundcube - DATABASE ERROR: CONNECTION FAILED!  (Read 12975 times)

Site10

  • Zen Apprentice
  • *
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Zentyal 2.2 - Roundcube - DATABASE ERROR: CONNECTION FAILED!
« on: September 18, 2012, 03:54:09 pm »
DATABASE ERROR: CONNECTION FAILED!
 
Unable to connect to the database!
Please contact your server-administrator.

Any ideias? It was workinh until tomorrow...

hyerk

  • Zen Apprentice
  • *
  • Posts: 25
  • Karma: +2/-0
    • View Profile
Re: Zentyal 2.2 - Roundcube - DATABASE ERROR: CONNECTION FAILED!
« Reply #1 on: October 12, 2012, 05:38:45 am »
I'm also experiencing this problem. 
I'm using core version 3.0.

The following was found at the end of the /var/log/roundcube/error file. 

[12-Oct-2012 03:29:54 UTC] PHP Deprecated:  Assigning the return value of new by reference is deprecated in /usr/share/php/MDB2.php on line 393
[12-Oct-2012 03:29:54 UTC] PHP Deprecated:  Assigning the return value of new by reference is deprecated in /usr/share/php/MDB2.php on line 2647
[12-Oct-2012 03:29:54 UTC] MDB2 Error: connect failed (-24): _doConnect: [Error message: Access denied for user 'roundcube'@'localhost' (using password: YES)]
[Native code: 1045]
[Native message: Access denied for user 'roundcube'@'localhost' (using password: YES)]

[11-Oct-2012 21:29:54 -0600]: DB Error: _doConnect: [Error message: Access denied for user 'roundcube'@'localhost' (using password: YES)]
[Native code: 1045]
[Native message: Access denied for user 'roundcube'@'localhost' (using password: YES)]
 ** mysql(mysql)://roundcube:xxx@localhost/roundcube in /usr/share/roundcube/program/include/rcube_mdb2.php on line 104 (GET /webmail/)
 
I'd be glad to provide more information if requested. 
Thanks for the help in advanced.
« Last Edit: October 12, 2012, 06:13:56 am by hyerk »

jan.rok

  • Zen Apprentice
  • *
  • Posts: 27
  • Karma: +2/-0
    • View Profile
Re: Zentyal 2.2 - Roundcube - DATABASE ERROR: CONNECTION FAILED!
« Reply #2 on: October 12, 2012, 02:35:21 pm »
I have also this problem. My core 3.0.3.

[12-Oct-2012 12:34:05 UTC] MDB2 Error: unknown error (-1): _doQuery: [Error message: Could not execute statement]
[Last executed query: PREPARE mdb2_statement_mysql_2b8993aba2a98583f78fe8761f3db6b76c25f7886 FROM 'INSERT INTO session (sess_id, vars, ip, created, changed) VALUES (?, ?, ?, \'2012-10-12 14:34:05\', \'2012-10-12 14:34:05\')']
[Native code: 1286]
[Native message: Unknown storage engine 'InnoDB']

[12-Oct-2012 14:34:05 +0200]: DB Error: _doQuery: [Error message: Could not execute statement]
[Last executed query: PREPARE mdb2_statement_mysql_2b8993aba2a98583f78fe8761f3db6b76c25f7886 FROM 'INSERT INTO session (sess_id, vars, ip, created, changed) VALUES (?, ?, ?, \'2012-10-12 14:34:05\', \'2012-10-12 14:34:05\')']
[Native code: 1286]
[Native message: Unknown storage engine 'InnoDB']
 in /usr/share/roundcube/program/include/rcube_mdb2.php on line 293 (GET /webmail/)

Please help me! Thanks. J. Rok

FarquahrWindsor

  • Guest
Re: Zentyal 2.2 - Roundcube - DATABASE ERROR: CONNECTION FAILED!
« Reply #3 on: October 12, 2012, 02:48:18 pm »
Hi sorry but are we talking zentyal 2.2 or 3.0 as your core says 3.0.3 ?

jan.rok

  • Zen Apprentice
  • *
  • Posts: 27
  • Karma: +2/-0
    • View Profile
Re: Zentyal 2.2 - Roundcube - DATABASE ERROR: CONNECTION FAILED!
« Reply #4 on: October 12, 2012, 04:01:45 pm »
Yes, 3.0.3.

jsalamero

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1419
  • Karma: +45/-1
    • View Profile

jan.rok

  • Zen Apprentice
  • *
  • Posts: 27
  • Karma: +2/-0
    • View Profile
Re: Zentyal 2.2 - Roundcube - DATABASE ERROR: CONNECTION FAILED!
« Reply #6 on: October 12, 2012, 05:16:47 pm »
Ok, very, very thanks!!!

hyerk

  • Zen Apprentice
  • *
  • Posts: 25
  • Karma: +2/-0
    • View Profile
Re: Zentyal 2.2 - Roundcube - DATABASE ERROR: CONNECTION FAILED!
« Reply #7 on: October 13, 2012, 03:55:23 pm »
I followed what was posted by jsalamero,  http://trac.zentyal.org/ticket/5163 , and I did need to make the modification, but it did not fix things for me.  I'm seeing an access denied error for the roundcube user.  Any Ideas?  I upgraded to 3.0.3 core.  Everything is up to date. 

Thanks.

jsalamero

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1419
  • Karma: +45/-1
    • View Profile
Re: Zentyal 2.2 - Roundcube - DATABASE ERROR: CONNECTION FAILED!
« Reply #8 on: October 14, 2012, 04:11:32 pm »
You need to recreate the webmail database, enabling the module one again to its created using the InnoDB engine. Purge the module, delete the database from MySQL and reinstall back with InnoDB enabled.

hyerk

  • Zen Apprentice
  • *
  • Posts: 25
  • Karma: +2/-0
    • View Profile
Re: Zentyal 2.2 - Roundcube - DATABASE ERROR: CONNECTION FAILED!
« Reply #9 on: October 16, 2012, 05:02:09 am »
Thank you jsalamero  ;)

I did what you said and things are working even after rebooting.  Here's what I did to fix it.

1. Disabled the webmail module through the 'Module Status' section of the admin interface.

2. Deleted the webmail service from the Software Managment - > Zentyal components section of the admin interface.

3. I opened /etc/mysql/conf.d/zentyal.cnf and modified the line to read innodb=on.

4. I found the password to mysql by looking in this file... /var/lib/zentyal/conf/zentyal-mysql.passwd

5. I ran this command and supplied the password.
sudo mysql -p

6. Then I issued the following commands
show databases;  (this will show you the databases)

DROP DATABASE roundcube; (this deletes the roundcube databse)

exit  (this exits the mysql command prompt.

After doing this, I reinstalled the webmail service, enabled it and it all worked!

Thanks again to all that posted to help out.

Then reinstalled the webmail service via the Software Management -> Zentyal Components menu.


Joeg1484

  • Zen Monk
  • **
  • Posts: 68
  • Karma: +2/-0
    • View Profile
Re: Zentyal 2.2 - Roundcube - DATABASE ERROR: CONNECTION FAILED!
« Reply #10 on: February 24, 2013, 07:58:24 pm »
You need to recreate the webmail database, enabling the module one again to its created using the InnoDB engine. Purge the module, delete the database from MySQL and reinstall back with InnoDB enabled.

Hi there,

I followed the instructions here, but reinstalling the roundcube module does not recreate the database. Is there another way to do this?

I'm using:

Core version    3.0.13

Thanks!
Joe

Joeg1484

  • Zen Monk
  • **
  • Posts: 68
  • Karma: +2/-0
    • View Profile
Re: Zentyal 2.2 - Roundcube - DATABASE ERROR: CONNECTION FAILED!
« Reply #11 on: February 26, 2013, 04:45:31 am »
Bump...

Any ideas?

Thanks!

Joeg1484

  • Zen Monk
  • **
  • Posts: 68
  • Karma: +2/-0
    • View Profile
Re: Zentyal 2.2 - Roundcube - DATABASE ERROR: CONNECTION FAILED!
« Reply #12 on: February 26, 2013, 06:03:29 am »
Opened a bug ticket on it and they helped me with the following... Hopefully, it will help others:

To fix your system follow this 3 steps:

 1- Drop the old roundcube database
 2- Unconfigure the webmail module with 'sudo /usr/share/zentyal
 /unconfigure-module webmail '
 3. Go to the interface and enable again the module, a new roundcube
 database will be set

Worked like a charm!

tama

  • Zen Apprentice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: Zentyal 2.2 - Roundcube - DATABASE ERROR: CONNECTION FAILED!
« Reply #13 on: March 19, 2013, 08:03:20 am »
hello there

i am using zentyal core 2.2.7.

i have these error in my roundcube log since upgrade

19-Mar-2013 14:59:34] PHP Deprecated:  Assigning the return value of new by reference is deprecated in /usr/share/php/MDB2.php on line 393
[19-Mar-2013 14:59:34] PHP Deprecated:  Assigning the return value of new by reference is deprecated in /usr/share/php/MDB2.php on line 2647
[19-Mar-2013 14:59:34] MDB2 Error: no such table (-18): prepare: [Error message: Unable to create prepared statement handle]
[Last executed query: DEALLOCATE PREPARE mdb2_statement_pgsql_2a618759728bb12c1e857df54bb7a6402572f0eb6]
[Native message: ERROR:  relation "contactgroups" does not exist
LINE 1: SELECT * FROM contactgroups WHERE del1 AND user_id=$1 ORDE...

i have read some previous post which was solved by deleting the roundcube database in mysql and reactivating the rouncube module
it seems that on version 2.2.7 it use a postgresql database

can someone help me on how to delete the roundcube database in postgesql

thks


coolnezz

  • Zen Apprentice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Zentyal 2.2 - Roundcube - DATABASE ERROR: CONNECTION FAILED!
« Reply #14 on: January 17, 2014, 03:20:20 am »
I'm using the 3.3 Community Edition.
I followed your step-by-step, to the point, instructions and it worked for me.
Thank you!



Thank you jsalamero  ;)

I did what you said and things are working even after rebooting.  Here's what I did to fix it.

1. Disabled the webmail module through the 'Module Status' section of the admin interface.

2. Deleted the webmail service from the Software Managment - > Zentyal components section of the admin interface.

3. I opened /etc/mysql/conf.d/zentyal.cnf and modified the line to read innodb=on.

4. I found the password to mysql by looking in this file... /var/lib/zentyal/conf/zentyal-mysql.passwd

5. I ran this command and supplied the password.
sudo mysql -p

6. Then I issued the following commands
show databases;  (this will show you the databases)

DROP DATABASE roundcube; (this deletes the roundcube databse)

exit  (this exits the mysql command prompt.

After doing this, I reinstalled the webmail service, enabled it and it all worked!

Thanks again to all that posted to help out.

Then reinstalled the webmail service via the Software Management -> Zentyal Components menu.