1 (edited by gianfry94 2018-09-15 18:01:31)

Topic: Roundcube | MySQL server has gone away

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version:  0.9.8 MYSQL edition
- Linux/BSD distribution name and version: Ubuntu Linux 18.04.1
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? Just with iRedAdmin
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

After a clean installation, i'm wondering why everything works and it is accessible (iRedAdmin and netdata) except for roundcube which gives me this error when i open the page:

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

Checking /var/log/mail.log I get this

Sep 15 09:04:11 server roundcube: <fgspav02> DB Error: SQLSTATE[HY000] [2006] MySQL server has gone away in /opt/www/roundcubemail-1.3.6/program/lib/Roundcube/rcube_db.php on line 175 (GET /mail/)
Sep 15 09:04:11 server roundcube: <fgspav02> DB Error: SQLSTATE[HY000] [2006] MySQL server has gone away (GET /mail/)

PS: I didn't change a single comma about mysql passwords and usernames... everything is fresh!

Any idea which might cause this???

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Roundcube | MySQL server has gone away

- Does restarting MySQL service fix this issue?
- Is SQL username/password stored in /opt/www/roundcubemail/config/config.inc.php correct? Please verify it manually with mysql command line tool.

3

Re: Roundcube | MySQL server has gone away

ZhangHuangbin wrote:

- Does restarting MySQL service fix this issue?
- Is SQL username/password stored in /opt/www/roundcubemail/config/config.inc.php correct? Please verify it manually with mysql command line tool.

- Nope. I even restarted the server!
- Yes they do match. I checked with the password generated and saved in ".my.cnf-roundcube" and the one in in the config.inc.php file. They're the same. I even reset the user password to the same password. Nothing changed!

4

Re: Roundcube | MySQL server has gone away

I'm not sure whether this MySQL parameter is relevant, but please help check its value, and try to increase it, restart mysql service, then try again.

grep -r 'max_allowed_packet' /etc/mysql/*

5 (edited by gianfry94 2018-09-17 02:48:09)

Re: Roundcube | MySQL server has gone away

ZhangHuangbin wrote:

I'm not sure whether this MySQL parameter is relevant, but please help check its value, and try to increase it, restart mysql service, then try again.

grep -r 'max_allowed_packet' /etc/mysql/*

Still nothing changed. I set these lines in my.cnf:

[mysqld]
wait_timeout = 600
max_allowed_packet = 128M

and checked if they were applied to MySQL after restart. Roundcube has still the same error!

PS: I tried also to increase it... i went further than 512... which is crazy... not even a stats web app requires so much big_smile

6

Re: Roundcube | MySQL server has gone away

Could you try to turn on SQL debug in Roundcube config file /opt/www/roundcubemail/config/config.inc.php? FYI: https://docs.iredmail.org/debug.roundcubemail.html

$config['debug_level'] = 4;
$config['sql_debug'] = true;

Let's see any useful info we can get.

Also, any error in Postfix log file (Roundcube logs to same log file)?

7 (edited by gianfry94 2018-09-17 14:48:14)

Re: Roundcube | MySQL server has gone away

Nothing has changed, same error except for the fact that I now get error in the UI web page (check the attachment).

About the mail.log file is always almost the same. There are not anymnore 2 lines of errors, just one, this one:

Sep 17 08:37:01 server roundcube: <ns1q8g4p> DB Error: SQLSTATE[HY000] [2006] MySQL server has gone away (GET /mail/)

I think the other one is not on the mail.log cause it now appears in the UI big_smile

Any other idea??? sad

Post's attachments

Screenshot 2018-09-17 08.41.05.png 12.18 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

8

Re: Roundcube | MySQL server has gone away

Clueless right now, need direct ssh access with root privilege and a testing mail account to reproduce the issue.

9

Re: Roundcube | MySQL server has gone away

If i want to upgrade rouncubemail with 1.3.7 version or the beta version, what files do i need to be careful of? Besides 'config/config.inc.php' and 'plugins/password/config.inc.php'?? Are there more??

Thx in advance smile

10

Re: Roundcube | MySQL server has gone away

FYI: https://github.com/roundcube/roundcubemail/wiki/Upgrade