This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Akonadi server problem...

Tags: None
(comma "," separated)
piedro
Registered Member
Posts
374
Karma
1
OS

Akonadi server problem...

Tue Feb 10, 2015 2:41 pm
Everytime my akonadi server starts the protocoll shows around many of theses messages below:

DATABASE ERROR:
Error code: 1452
DB error: "Cannot add or update a child row: a foreign key constraint fails (`akonadidb`.`CollectionPimItemRelation`, CONSTRAINT `CollectionPimItemRelation_ibfk_2` FOREIGN KEY (`PimItem_id`) REFERENCES `PimItemTable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE)"
Error text: "Cannot add or update a child row: a foreign key constraint fails (`akonadidb`.`CollectionPimItemRelation`, CONSTRAINT `CollectionPimItemRelation_ibfk_2` FOREIGN KEY (`PimItem_id`) REFERENCES `PimItemTable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) QMYSQL3: Unable to execute statement"
Query: "INSERT INTO CollectionPimItemRelation (Collection_id, PimItem_id) VALUES (:0, :1)"


Do I have to rebuild the akonadi database (and how to do that without deleting my configurations) or how can I solve this?

This is on KDE 4.14.12 on ARCH...

Thanks for help,
piedro
User avatar
progdan
KDE Developer
Posts
90
Karma
0
OS

Re: Akonadi server problem...

Wed Feb 11, 2015 7:36 am
Hi,

please start by removing agents change journals:

rm ~/.config/akonadi/agent_config_akonadi_*_changes.dat

It's possible that some of the journals contains request to perform a change to an Akonadi item (email, contact, etc.) which has already been written to Akonadi, causing the constraint to fail.


Daniel Vrátil | www.dvratil.cz | dvratil@kde.org
IRC: dvratil on Freenode (#kde, #kontact, #akonadi, #fedora-kde)
piedro
Registered Member
Posts
374
Karma
1
OS

Re: Akonadi server problem...

Wed Feb 11, 2015 8:11 am
Thanks progdan!

This might have been the solution! I do not get this error anymore at the moment. Since I deleted a lot of mails and copied them around I am not completely positive it's been that but this sound sound and it is gone.

So: fixed for the moment I guess and I will keep that in mind if it happens again...


cheers, piedro
piedro
Registered Member
Posts
374
Karma
1
OS

Re: Akonadi server problem...

Mon Apr 06, 2015 10:19 pm
Well, spoke too soon!

Among still many emails with empty bodies ( I am sure this is due to bogofilter - happens on the imap server - mails really are corrupted!),
after disbaling bogofilter completely, using spambayes now,
stll I get these errors - sometimes more, sometimes less in the akonadi server error file:

DATABASE ERROR:
Error code: 1452
DB error: "Cannot add or update a child row: a foreign key constraint fails (`akonadidb`.`CollectionPimItemRelation`, CONSTRAINT `CollectionPimItemRelation_ibfk_2` FOREIGN KEY (`PimItem_id`) REFERENCES `PimItemTable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE)"
Error text: "Cannot add or update a child row: a foreign key constraint fails (`akonadidb`.`CollectionPimItemRelation`, CONSTRAINT `CollectionPimItemRelation_ibfk_2` FOREIGN KEY (`PimItem_id`) REFERENCES `PimItemTable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) QMYSQL3: Unable to execute statement"
Query: "INSERT INTO CollectionPimItemRelation (Collection_id, PimItem_id) VALUES (:0, :1)"

So I deleted the changes.dat files many times - it still doesn't work.

thx for reading,
piedro


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], Yahoo [Bot]