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

kalarm / akonadi broken again

Tags: None
(comma "," separated)
lynnux
Registered Member
Posts
3
Karma
0

kalarm / akonadi broken again

Mon Dec 11, 2017 12:59 pm
MINT 18.2
KDE Development Platform: 4.14.22
kalarm 2.11.7-5ak
akonadi Akonadi 5.2.2

I keep losing appointments from kalarm.
The problem is always because, on startup from command line, kalarm says:

akonadicore_log: Failed to open external payload: "/home/rob/.local/share/akonadi/file_db_data/64/464_r7" "No such file or directory"

There will be several lines like that.
Always there will be a file /home/rob/.local/share/akonadi/file_db_data/64/464_r8 <-- note the trailing 8 rather than 7

I've had this happen several times over the years but now it's every day.
I ran akonadictl fsck but nothing untoward occurred.

Any ideas gratefully received.
FWIW: I fix the problem every morning after boot with this script:

Code: Select all
#!/bin/bash
# Makes a shell script called fix-kalarm.sh to fix kalarm/akonadi incorrectly indexed files
# eg:
# mv  /home/rob/.local/share/akonadi/file_db_data/64/464_r8 /home/rob/.local/share/akonadi/file_db_data/64/464_r7
# mv  ...

# Usage:
# Quit any running kalarm
# UNCOMMENT 2 LINES BELOW* if necessary.
# Run this script then examine fix-kalarm.sh
# Run fix-kalarm.sh (if it looks good - it will be empty if no akonadicore_log errors were found)

OUTPUT_FILE=fix-kalarm.sh
WORK_FILE=sampleOutput.txt

# * UNCOMMENT THESE 2 LINES
WORK_FILE=kalarmOutput.txt
kalarm > $WORK_FILE 2>&1 

echo "#!/bin/bash" > $OUTPUT_FILE
echo "# *** MAKE SURE YOU HAVE RUN make-$OUTPUT_FILE BEFORE RUNNING THIS SCRIPT ***" >> $OUTPUT_FILE
#move existing _r8 to _r7
gawk -F\" '$1 ~/akonadicore_log: Failed to open external payload: / {split($2,arr,"_r"); print "mv",arr[0],arr[1] "_r" arr[2]+1,$2}' $WORK_FILE  >> $OUTPUT_FILE
chmod +x $OUTPUT_FILE
djarvie
KDE Developer
Posts
103
Karma
0
OS

Re: kalarm / akonadi broken again

Mon Dec 11, 2017 8:19 pm
This is not a problem I've come across before. I'd suggest creating a new alarm resource and hope that that behaves better. The easiest way would be to run akonadiconsole if you have it installed, and delete the akonadi resource. Then, use akonadiconsole to create a new resource using the same calendar file.

Alternatively, in KAlarm,
1) Use View -> Calendars if necessary to display your calendar list.
2) If you only have the one active alarms calendar, create a new one using the Add... button (select a file which doesn't already exist). Then make that calendar your default for active alarms. (This is necessary because you are not allowed to delete your default active alarms calendar.)
3) Use the Remove button to remove the calendar which is causing the problems. This just deletes the akonadi resource, not the actual calendar file.
4) Use the Add... button to add the calendar back again, as a new resource. Then set it as the default for active alarms.
5) Use the Remove button to delete the temporary calendar.


KAlarm author
lynnux
Registered Member
Posts
3
Karma
0

Re: kalarm / akonadi broken again

Mon Dec 18, 2017 12:03 pm
Hi djarvie,
Thank you very much for that detailed reply.
I took a snapshot of my current appointments and then followed your instructions in kalarm as I don't have akonadiconsole.
Very surprising results:
Some old appointments appeared (ones that had been amended) but without the amendments.
Some recently added appointments disappeared.

I made good the errors manually.

So far so good. Reminders etc. are working again and no lost files on startup.

I appreciate your help enormously - so another Thank you.

Regards,

Lynn


Bookmarks



Who is online

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