1 (edited by jtd.burton 2022-03-09 22:55:15)

Topic: Sogo webmail login not working - "cannot write record"

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.5
- Deployed with iRedMail Easy or the downloadable installer? not sure
- Linux/BSD distribution name and version: Ubuntu 20.04
- 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'm not sure how long this has been a problem as most of us using this server access our email through IMAP.

I tried to log in to Sogo webmail today and got an "Unhandled error response" message.

The sogo logs on the server register a successful login but then are unable to write that login to the database. Here are the relevant log entries:

Mar 09 09:35:27 sogod [4949]: SOGoRootPage successful login from '[IP address]' for user '[user@server]' - expire = -1  grace = -1
Mar 09 09:35:27 sogod [4949]: [ERROR] <0x0x55cb49da6270[GCSSessionsFolder]> -[GCSSessionsFolder writeRecordForEntryWithID:value:creationDate:lastSeenDate:]: cannot write record: <MySQL4Exception: 0x55cb4a2cbde0> NAME:ExecutionFailed REASON:Data too long for column 'c_value' at row 1

Any idea how I can address this? Thanks.

----

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

2

Re: Sogo webmail login not working - "cannot write record"

Received few reports from other iRedMail users, seems the latest nightly build has a bug.
Please help report to SOGo bug tracker:
https://www.sogo.nu/bugs/

3

Re: Sogo webmail login not working - "cannot write record"

Can either of you create that bug report? I have the same problem, but as a new user, it seems I am not allowed to. Writing the administrator of the site also doesn't work, since the mail address doesn't seem to exist.

4 (edited by selea 2022-03-11 19:33:50)

Re: Sogo webmail login not working - "cannot write record"

Same issue here:


Mar 11 06:27:18 sogod [160938]: [ERROR] <0x0x55ba9f855fb0[GCSSessionsFolder]> -[GCSSessionsFolder writeRecordForEntryWithID:value:creationDate:lastSeenDate:]: cannot write record: <MySQL4Exception: 0x55ba9f9937e0> NAME:ExecutionFailed REASON:Data too long for column 'c_value' at row 1

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| amavisd            |
| iredadmin          |
| iredapd            |
| mysql              |
| opendmarc          |
| performance_schema |
| phpmyadmin         |
| roundcubemail      |
| sogo               |
| sys                |
| vmail              |
+--------------------+
12 rows in set (0.01 sec)

mysql> use sogo;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+------------------------+
| Tables_in_sogo         |
+------------------------+
| sogo_acl               |
| sogo_alarms_folder     |
| sogo_cache_folder      |
| sogo_folder_info       |
| sogo_quick_appointment |
| sogo_quick_contact     |
| sogo_sessions_folder   |
| sogo_store             |
| sogo_user_profile      |
| users                  |
+------------------------+
10 rows in set (0.00 sec)

mysql> describe sogo.sogo_sessions_folder;
+----------------+--------------+------+-----+---------+-------+
| Field          | Type         | Null | Key | Default | Extra |
+----------------+--------------+------+-----+---------+-------+
| c_id           | varchar(255) | NO   | PRI | NULL    |       |
| c_value        | varchar(255) | NO   |     | NULL    |       |
| c_creationdate | int(11)      | NO   |     | NULL    |       |
| c_lastseen     | int(11)      | NO   |     | NULL    |       |
+----------------+--------------+------+-----+---------+-------+
4 rows in set (0.00 sec)

There where no updates to the sogo-schema from what I could see.

5

Re: Sogo webmail login not working - "cannot write record"

Got the same issue here though my email storage backend is PGSQL:

Mar 11 09:28:07 sogod [1102]: [ERROR] <0x0x562fa33f6830[GCSSessionsFolder]> -[GCSSessionsFolder writeRecordForEntryWithID:value:creationDate:lastSeenDate:]: cannot write record: <PostgreSQL72Exception: 0x562fa32c8070> NAME:PostgreSQL72FatalError REASON:fatal pgsql error (channel=<0x0x562fa33d6080[PostgreSQL72Channel]: connection=<0x0x562fa33f8520[PGConnection]:  connection=0x0x562fa33439d0>>): ERROR:  value too long for type character varying(255)

6

Re: Sogo webmail login not working - "cannot write record"

Artim wrote:

Can either of you create that bug report? I have the same problem, but as a new user, it seems I am not allowed to. Writing the administrator of the site also doesn't work, since the mail address doesn't seem to exist.

I see there is a bug report with some ideas on how to resolve but not sure how to implement for PGSQL.

7

Re: Sogo webmail login not working - "cannot write record"

kysh wrote:

I see there is a bug report with some ideas on how to resolve but not sure how to implement for PGSQL.

The mentioned solution in the bug report works for me.

Don't forget to add the proxy-lines also in the sub domain template of sogo if used.

Greets