1

Topic: SOGo Sync Issue: Table sogo.sogo_cache_folder doesn't exist

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.6 OPENLDAP edition.
- Linux/BSD distribution name and version: CentOS release 6.9 (Final)
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? No
- Related log if you're reporting an issue: /var/log/sogo/sogo.log
====

Heloo, I just setup a new server for a client and everything is working well except Exchange/Android sync. When I turn on sync for the calendar, the following is logged:

Apr 16 09:06:47 sogod [22720]: 192.168.1.1 "OPTIONS /SOGo/Microsoft-Server-ActiveSync HTTP/1.1" 200 0/0 0.009 - - 0
Apr 16 09:06:47 sogod [22720]: <0x7fe3d5ac5ab8[SOGoCacheGCSObject]:androidc255626231> an exception occurred when executing query 'SELECT * FROM sogo_cache_folder WHERE c_path = '/androidc255626231' AND c_uid = 'user@domain.net''
Apr 16 09:06:47 sogod [22720]: <0x7fe3d5ac5ab8[SOGoCacheGCSObject]:androidc255626231> exception is '<MySQL4Exception: 0x7fe3d5ed15b8> NAME:ExecutionFailed REASON:Table 'sogo.sogo_cache_folder' doesn't exist'
Apr 16 09:06:47 sogod [22720]: 192.168.1.1 "POST /SOGo/Microsoft-Server-ActiveSync?Cmd=FolderSync&User=user%40domain.net&DeviceId=androidc255626231&DeviceType=Android HTTP/1.1" 200 13/32 0.007 - - 0

When I turn on sync for the Contacts, many more errors are logged:

Apr 16 09:08:26 sogod [22720]: 192.168.1.1 "OPTIONS /SOGo/Microsoft-Server-ActiveSync HTTP/1.1" 200 0/0 0.002 - - 0
Apr 16 09:08:26 sogod [22720]: <0x7fe3d5ac5ab8[SOGoCacheGCSObject]:androidc255626231> an exception occurred when executing query 'SELECT * FROM sogo_cache_folder WHERE c_path = '/androidc255626231' AND c_uid = 'user@domain.net''
Apr 16 09:08:26 sogod [22720]: <0x7fe3d5ac5ab8[SOGoCacheGCSObject]:androidc255626231> exception is '<MySQL4Exception: 0x7fe3d5f0bc28> NAME:ExecutionFailed REASON:Table 'sogo.sogo_cache_folder' doesn't exist'
Apr 16 09:08:27 sogod [22720]: <0x7fe3d5a1f878[SOGoCacheGCSObject]:androidc255626231+folder71909e1f7c26f258a805000039015100> an exception occurred when executing query 'SELECT * FROM sogo_cache_folder WHERE c_path = '/androidc255626231+folder71909e1f7c26f258a805000039015100' AND c_uid = 'user@domain.net''
Apr 16 09:08:27 sogod [22720]: <0x7fe3d5a1f878[SOGoCacheGCSObject]:androidc255626231+folder71909e1f7c26f258a805000039015100> exception is '<MySQL4Exception: 0x7fe3d6061078> NAME:ExecutionFailed REASON:Table 'sogo.sogo_cache_folder' doesn't exist'
Apr 16 09:08:27 sogod [22720]: [ERROR] <0x7fe3d5a1f878[SOGoCacheGCSObject]:androidc255626231+folder71909e1f7c26f258a805000039015100> could not insert/update record for record '/androidc255626231+folder71909e1f7c26f258a805000039015100' in sogo_cache_folder: <MySQL4Exception: 0x7fe3d601ac88> NAME:ExecutionFailed REASON:Table 'sogo.sogo_cache_folder' doesn't exist
Apr 16 09:08:27 sogod [22720]: <0x7fe3d5f9e428[SOGoCacheGCSObject]:androidc255626231+folderc0171c13e631f2589d0a000039015100> an exception occurred when executing query 'SELECT * FROM sogo_cache_folder WHERE c_path = '/androidc255626231+folderc0171c13e631f2589d0a000039015100' AND c_uid = 'user@domain.net''
Apr 16 09:08:27 sogod [22720]: <0x7fe3d5f9e428[SOGoCacheGCSObject]:androidc255626231+folderc0171c13e631f2589d0a000039015100> exception is '<MySQL4Exception: 0x7fe3d5ffa808> NAME:ExecutionFailed REASON:Table 'sogo.sogo_cache_folder' doesn't exist'
Apr 16 09:08:27 sogod [22720]: [ERROR] <0x7fe3d5f9e428[SOGoCacheGCSObject]:androidc255626231+folderc0171c13e631f2589d0a000039015100> could not insert/update record for record '/androidc255626231+folderc0171c13e631f2589d0a000039015100' in sogo_cache_folder: <MySQL4Exception: 0x7fe3d605e098> NAME:ExecutionFailed REASON:Table 'sogo.sogo_cache_folder' doesn't exist
Apr 16 09:08:27 sogod [22720]: <0x7fe3d6026838[SOGoCacheGCSObject]:androidc255626231+folderc1171c13e631f2589d0a000039015100> an exception occurred when executing query 'SELECT * FROM sogo_cache_folder WHERE c_path = '/androidc255626231+folderc1171c13e631f2589d0a000039015100' AND c_uid = 'user@domain.net''
Apr 16 09:08:27 sogod [22720]: <0x7fe3d6026838[SOGoCacheGCSObject]:androidc255626231+folderc1171c13e631f2589d0a000039015100> exception is '<MySQL4Exception: 0x7fe3d60358a8> NAME:ExecutionFailed REASON:Table 'sogo.sogo_cache_folder' doesn't exist'
Apr 16 09:08:27 sogod [22720]: [ERROR] <0x7fe3d6026838[SOGoCacheGCSObject]:androidc255626231+folderc1171c13e631f2589d0a000039015100> could not insert/update record for record '/androidc255626231+folderc1171c13e631f2589d0a000039015100' in sogo_cache_folder: <MySQL4Exception: 0x7fe3d602ddb8> NAME:ExecutionFailed REASON:Table 'sogo.sogo_cache_folder' doesn't exist
...

It looks like SOGo can not or is not updating the MySQL database but I'm not sure why that is not working. Anyone have any ideas to help troubleshoot this problem? Could it be as easy as creating the table? I need help.

----

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

2

Re: SOGo Sync Issue: Table sogo.sogo_cache_folder doesn't exist

If you don't have any important data in SOGo yet, try this:

- Stop sogo service.
- Drop sogo sql db
- Create it again without specified character set: "CREATE DATABASE sogo;"
- Restart sogo.

iRedMail uses "UTF8" by default, but CentOS 6 ships MySQL 5.1 which is old and doesn't support long index key length (required by SOGo sql template).

CentOS 7 ships newer MariaDB and no problem with standard iRedMail installation.

3

Re: SOGo Sync Issue: Table sogo.sogo_cache_folder doesn't exist

That worked like a charm. Thank you Zhang!