SOGo - BTS - SOGo
View Issue Details
0004418SOGoBackend Address Bookpublic2018-03-10 01:022018-03-12 14:51
neradp 
ludovic 
normalminoralways
resolvedno change required 
[Server] LinuxRHEL/CentOS7
 
 
0004418: Cannot add user to address book
Im using nightly build version 4 and I cannot add users to adress books.

Im runnig sogo server on mysql(mariadb) ..
when i do clean install run sogod service tables created in sogo db are wrong..
e.g. sogo_quick_connect has only columns
c_folder_id,c_name,c_givenname, c_cn,c_sn,c_screenname, c_l,c_mail,c_o,c_ou,c_telephonenumber,c_categories,c_component
Column c_hascertificate is missing :(

So i run sogo sql upgrade 3.2.10 to 4.0.0 script for mysql to do tables correction..

Now column c_hascertificate is in place... but adding user gave me this error in logs:

Mar 09 23:11:36 sogod [26916]: [ERROR] <0x0x56381d5245d0[GCSFolder]> -[GCSFolder _generateInsertStatementForRow:adaptor:tableName:]: no type found for column name c_hascertificate
2018-03-09 23:11:36.455 sogod[26916:26916] <MySQL4Channel[0x0x56381d46a1f0] connection=0x0x56381d420930> SQL: INSERT INTO sogo_quick_contact (c_folder_id, c_cn, c_component, c_screenname, c_sn, c_name, c_hascertificate, c_categories, c_ou, c_o, c_mail, c_givenName) VALUES (42, 'test', 'vcard', '', 'test', '6923-5AA30680-1-72443C80.vcf', null, '', '', null, 'test');
2018-03-09 23:11:36.455 sogod[26916:26916] <MySQL4Channel[0x0x56381d46a1f0] connection=0x0x56381d420930> ERROR: Column count doesn't match value count at row 1
2018-03-09 23:11:36.455 sogod[26916:26916] <MySQL4Channel[0x0x56381ce53c60] connection=0x0x56381d185270> SQL: ROLLBACK;
2018-03-09 23:11:36.456 sogod[26916:26916] <MySQL4Channel[0x0x56381ce53c60] connection=0x0x56381d185270> query has no results.
2018-03-09 23:11:36.456 sogod[26916:26916] <MySQL4Channel[0x0x56381d46a1f0] connection=0x0x56381d420930> SQL: ROLLBACK;
2018-03-09 23:11:36.456 sogod[26916:26916] <MySQL4Channel[0x0x56381d46a1f0] connection=0x0x56381d420930> query has no results.
Mar 09 23:11:36 sogod [26916]: <0x0x56381d5245d0[GCSFolder]> ERROR(-[GCSFolder writeContent:fromComponent:container:toName:baseVersion:]): cannot insert content : <MySQL4Exception: 0x56381d587660> NAME:ExecutionFailed REASON:Column count doesn't match value count at row 1
Mar 09 23:11:36 sogod [26916]: [ERROR] <0x56381d5dfe50[SOGoContactGCSEntry]:6923-5AA30680-1-72443C80.vcf> write failed: <MySQL4Exception: 0x56381d587660> NAME:ExecutionFailed REASON:Column count doesn't match value count at row 1


No tags attached.
? sogo.conf.bak (5,069) 2018-03-12 13:03
https://sogo.nu/bugs/file_download.php?file_id=1898&type=bug
log sogo.log (41,010) 2018-03-12 14:37
https://sogo.nu/bugs/file_download.php?file_id=1899&type=bug
Issue History
2018-03-10 01:02neradpNew Issue
2018-03-12 09:46ludovicNote Added: 0012650
2018-03-12 09:46ludovicSeverityblock => minor
2018-03-12 13:03neradpFile Added: sogo.conf.bak
2018-03-12 13:04neradpNote Added: 0012651
2018-03-12 13:19ludovicNote Added: 0012652
2018-03-12 13:35neradpNote Added: 0012653
2018-03-12 13:37ludovicNote Added: 0012655
2018-03-12 13:46neradpNote Added: 0012658
2018-03-12 13:56neradpNote Added: 0012659
2018-03-12 13:57ludovicNote Added: 0012660
2018-03-12 14:37neradpFile Added: sogo.log
2018-03-12 14:37neradpNote Added: 0012662
2018-03-12 14:41ludovicNote Added: 0012663
2018-03-12 14:43neradpNote Added: 0012664
2018-03-12 14:43ludovicNote Added: 0012665
2018-03-12 14:47neradpNote Added: 0012666
2018-03-12 14:49ludovicNote Added: 0012667
2018-03-12 14:50neradpNote Added: 0012668
2018-03-12 14:51ludovicNote Added: 0012669
2018-03-12 14:51ludovicNote Added: 0012670
2018-03-12 14:51ludovicStatusnew => resolved
2018-03-12 14:51ludovicResolutionopen => no change required
2018-03-12 14:51ludovicAssigned To => ludovic

Notes
(0012650)
ludovic   
2018-03-12 09:46   
Show your configuration (sogo.conf file).
(0012651)
neradp   
2018-03-12 13:04   
Attached
(0012652)
ludovic   
2018-03-12 13:19   
My guess is that you used the Scripts/mysql-utf8mb4.sql when creating your SOGo environment from scratch. This script did not add by default the c_hascertificate column.
(0012653)
neradp   
2018-03-12 13:35   
no i did not :(

I have no utf8mb4 configuration options in mariadb...
now i have c_hascertificat column...but still cant add user
(0012655)
ludovic   
2018-03-12 13:37   
Then cleanup your sogo.conf file - you have duplicate keys in it.

I've just tested it on a fresh environment with the 9 tables structure and it works perfectly.
(0012658)
neradp   
2018-03-12 13:46   
i did none schema creation for tables... sogod on first run created tables itself... sorry for my bad english :-D
(0012659)
neradp   
2018-03-12 13:56   
oh...yes duplicates folders for mysql..
cleaned..

sogo stoped
deleted sogo tables from databaze..
restarted memcached service
started sogo

sogo_guick_contact table has no column c_hascertificate :(
(0012660)
ludovic   
2018-03-12 13:57   
Enable MySQL4DebugEnabled = YES;

in your config, remove all tables and restart sogod.

Paste the result from your sogo.log file.
(0012662)
neradp   
2018-03-12 14:37   
attached
(0012663)
ludovic   
2018-03-12 14:41   
2018-03-12 19:33:31.915 sogod[31515] <MySQL4Channel[0x0x5602a20466c0] connection=0x0x5602a219a860> SQL: CREATE TABLE sogo_quick_contact (c_folder_id INT NOT NULL, c_name VARCHAR(255) NOT NULL, c_givenname VARCHAR(255) NULL, c_cn VARCHAR(255) NULL, c_sn VARCHAR(255) NULL, c_screenname VARCHAR(255) NULL, c_l VARCHAR(255) NULL, c_mail VARCHAR(255) NULL, c_o VARCHAR(255) NULL, c_ou VARCHAR(255) NULL, c_telephonenumber VARCHAR(255) NULL, c_categories VARCHAR(255) NULL, c_component VARCHAR(10) NOT NULL, CONSTRAINT sogo_quick_contact_pkey PRIMARY KEY(c_folder_id, c_name));

Have you installed SOGo from sources or from packages?
(0012664)
neradp   
2018-03-12 14:43   
"CREATE TABLE sogo_cache_folder" 2x.. in config i have no duplicates..

SQL: CREATE TABLE sogo_quick_contact (c_folder_id INT NOT NULL, c_name VARCHAR(255) NOT NULL, c_givenname VARCHAR(255) NULL, c_cn VARCHAR(255) NULL, c_sn VARCHAR(255) NULL, c_screenname VARCHAR(255) NULL, c_l VARCHAR(255) NULL, c_mail VARCHAR(255) NULL, c_o VARCHAR(255) NULL, c_ou VARCHAR(255) NULL, c_telephonenumber VARCHAR(255) NULL, c_categories VARCHAR(255) NULL, c_component VARCHAR(10) NOT NULL, CONSTRAINT sogo_quick_contact_pkey PRIMARY KEY(c_folder_id, c_name));

No column c_hascertificate :(((
(0012665)
ludovic   
2018-03-12 14:43   
Please answer my question
(0012666)
neradp   
2018-03-12 14:47   
im installing from repository... nightly builds
(0012667)
ludovic   
2018-03-12 14:49   
I think you failed to upgrade the sope gdlcontentstore package.
(0012668)
neradp   
2018-03-12 14:50   
oh shit i forgot for this: i have installed sogo-openchange-backend-2.3.1-1.centos6.x86_64.rpm

Can this package do some errors ?
(0012669)
ludovic   
2018-03-12 14:51   
of course it will
(0012670)
ludovic   
2018-03-12 14:51   
Broken update.