1 (edited by mikal 2018-01-31 00:20:37)

Topic: Mysql problem with SOGo (Got an error reading communication packets)

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.7
- Linux/BSD distribution name and version: Ubuntu 16.04.3 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): Mysql
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

I started getting an error possibly after a few updates of SOGo nightly builds.

Error from /var/log/mysql/error.log

2018-01-30T16:02:01.570024Z 124 [Note] Aborted connection 124 to db: 'sogo' user: 'sogo' host: 'localhost' (Got an error reading communication packets)

and it keeps on going....

Error from /var/log/sogo/sogo.log

Jan 30 10:57:22 sogod [23480]: IPADDRESS "OPTIONS /SOGo/dav/EMAILADDRESS/ HTTP/1.0" 401 0/0 0.001 - - 0
Jan 30 10:57:22 sogod [23480]: [ERROR] <0x0x563bda21b0b0[SQLSource]> could not run SQL 'c_uid = 'EMAILADDRESS': <MySQL4Exception: 0x563bda572d30> NAME:ExecutionFailed REASON:Access denied for user 'sogo'@'localhost' (using password: YES)

and it keeps on going...

It looks like IMAP is working, but SOGo and Active Sync is not working. It is not possible to logon to sogo with mailaccount. It looks like its not able to connect to authenticate users. I have tried to google similar problems, but I havent got any solutions to work.

I am able to logon to mysql with user sogo and password from sogo.conf

----

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

2

Re: Mysql problem with SOGo (Got an error reading communication packets)

mikal wrote:

Jan 30 10:57:22 sogod [23480]: [ERROR] <0x0x563bda21b0b0[SQLSource]> could not run SQL 'c_uid = 'EMAILADDRESS': <MySQL4Exception: 0x563bda572d30> NAME:ExecutionFailed REASON:Access denied for user 'sogo'@'localhost' (using password: YES)

*) Do you have correct SQL username/password in SOGo config file?
*) If you're running the latest SOGo-3.2.10 nightly build, try to run script shipped in SOGo package to update the SQL structure. On Debian/Ubuntu, you can find it with commands below:

dpkg -L sogo | grep 'sql-update'

In this case, we need script "sql-update-3.2.10_to_4.0.0-mysql.sh".

WARNING: BACKUP YOUR SOGO DATABASE BEFORE RUNNING THIS SCRIPT.

3 (edited by mikal 2018-01-31 18:34:21)

Re: Mysql problem with SOGo (Got an error reading communication packets)

ZhangHuangbin wrote:
mikal wrote:

Jan 30 10:57:22 sogod [23480]: [ERROR] <0x0x563bda21b0b0[SQLSource]> could not run SQL 'c_uid = 'EMAILADDRESS': <MySQL4Exception: 0x563bda572d30> NAME:ExecutionFailed REASON:Access denied for user 'sogo'@'localhost' (using password: YES)

*) Do you have correct SQL username/password in SOGo config file?
*) If you're running the latest SOGo-3.2.10 nightly build, try to run script shipped in SOGo package to update the SQL structure. On Debian/Ubuntu, you can find it with commands below:

dpkg -L sogo | grep 'sql-update'

In this case, we need script "sql-update-3.2.10_to_4.0.0-mysql.sh".

WARNING: BACKUP YOUR SOGO DATABASE BEFORE RUNNING THIS SCRIPT.


I tried to run the sql-update file but got the following error:
ERROR 1060 (42S21) at line 1: Duplicate column name 'c_hascertificate'

The only column I can find is in table=sogo_quick_contact. I can only find one

4

Re: Mysql problem with SOGo (Got an error reading communication packets)

ZhangHuangbin wrote:
mikal wrote:

Jan 30 10:57:22 sogod [23480]: [ERROR] <0x0x563bda21b0b0[SQLSource]> could not run SQL 'c_uid = 'EMAILADDRESS': <MySQL4Exception: 0x563bda572d30> NAME:ExecutionFailed REASON:Access denied for user 'sogo'@'localhost' (using password: YES)

*) Do you have correct SQL username/password in SOGo config file?
*) If you're running the latest SOGo-3.2.10 nightly build, try to run script shipped in SOGo package to update the SQL structure. On Debian/Ubuntu, you can find it with commands below:

dpkg -L sogo | grep 'sql-update'

In this case, we need script "sql-update-3.2.10_to_4.0.0-mysql.sh".

WARNING: BACKUP YOUR SOGO DATABASE BEFORE RUNNING THIS SCRIPT.


I found the problem. I had to set the root password since the user table was using the root mysql user as a definer. The root user did either has a password field. Everything works now as I can see.