failuer when updating database from 220.127.116.11.78 to 18.104.22.168.102
After latest update, the kopano-sever doesn’t start anymore.
I am getting the following error message:
Sun Aug 19 21:58:19 2018: [=======] Starting kopano-server version 8.6.81 (pid 17776 uid 0) Sun Aug 19 21:58:20 2018: [error ] SQL  Failed: Doppelter Eintrag '\x86\x03\x02\x00\x00\x00\x00\x00\xC0\x00\x00\x00\x00\x00\x00F-x-' fÃ¼r SchlÃ¼ssel 'gns', Query Size: 46, Query: "ALTER TABLE `names` CONVERT TO CHARSET utf8mb4" Sun Aug 19 21:58:20 2018: [error ] KDatabase::I_Update() query failed: "Doppelter Eintrag '\x86\x03\x02\x00\x00\x00\x00\x00\xC0\x00\x00\x00\x00\x00\x00F-x-' fÃ¼r SchlÃ¼ssel 'gns'", query: ALTER TABLE `names` CONVERT TO CHARSET utf8mb4 Sun Aug 19 21:58:20 2018: [error ] Can't update the database: Unable to upgrade database from version 22.214.171.124.78 to 126.96.36.199.102 Sun Aug 19 21:58:20 2018: [=======] Server shutdown complete.
I have now idea, how to resolve the double entry in the database.
Any idea, what I can do?
Look in table “names” with something like phpMyAdmin
Are there really two records with the same key “gns” ?
If the records are exactly the same then it should be possible to delete one of them.
WARNING: this is the theory, never done by me
I already had a look - but I am not familiar with mysql, so I am not sure what is supposed to be double.
I found “gns” only once (see screenshot)
the doúble entry seems to be related to the guid (0x860…) but there are hundrets entries with same guid - so I am afraid that just deleting would make it worse…
Google on mysql and gns results in this
Thanks for the hint.
I found the same google link and already ran
This worked without failure. But afterwards the same error comes again.
So it seems, that this is a different issue
tjoen last edited by tjoen
gns is a strange index: it is composed of guid and namestring
Does select guid from names gives unique values? or are there double entries.
If there are then you can do select namestring guid from names where guid is that-double-value
(edited modified select namestring to select guid)
Can you provide the mysqldump of the
namestable and send it to development @ kopano.io (or a service ticket) please.
mysqldump kopano names | xz >bla.xz
I sent you the requested dump.
Thanks for your help!
I wonder if my guess is right: there are two guids with the same value.
Solution would be to make guid unique index. Obsoleting gns and gni. Much simpler
The GUIDs are not meant to be unique, not in this case anyway.
tjoen last edited by tjoen
gns is meant to be unique. With two same namestrings with same GUIDs there is a problem. Same with gni
believed to be fixed with kopanocore-8.6.81-158-g352e88092
Yes… I was able to start the kopano-server without any manual changes to the database