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

Need help restoring broken akonadi database

Tags: None
(comma "," separated)
alvanx
Registered Member
Posts
136
Karma
1
OS
Starting today, akonadi refused to start. I soon found out that postgresql was to blame (I have no idea about databases and only use this one because the other ones had given me constant headaches). Here's a current log from /home/alvanx/.local/share/akonadi/db_data/pg_log/
Code: Select all
2012-05-01 20:33:03 CEST   LOG:  database system shutdown was interrupted; last known up at 2012-05-01 10:53:45 CEST
2012-05-01 20:33:03 CEST   LOG:  could not open file "pg_xlog/0000000100000004000000AC" (log file 4, segment 172): No such file or directory
2012-05-01 20:33:03 CEST   LOG:  invalid primary checkpoint record
2012-05-01 20:33:03 CEST   LOG:  could not open file "pg_xlog/0000000100000004000000AC" (log file 4, segment 172): No such file or directory
2012-05-01 20:33:03 CEST   LOG:  invalid secondary checkpoint record
2012-05-01 20:33:03 CEST   PANIC:  could not locate a valid checkpoint record
2012-05-01 20:33:03 CEST   LOG:  startup process (PID 4296) was terminated by signal 6: Aborted
2012-05-01 20:33:03 CEST   LOG:  aborting startup due to startup process failure

Sure enough, said log file isn't there (anymore). I searched Google and this error occured to many people that had been messing with the log files, but I did not. I learned that the db can be restored but that this would make me lose transactions (I still don't exactly know what this means).

Anyways, before I learned this I thought that maybe the db would fix itself if I switched to mysql and then back to postgresql. This did not work (clearly), but I now know that at the time, mysql was working. However, it isn't anymore after I tried to restore the postgresql database with a command I found: /usr/bin/pg_resetxlog -f /home/alvanx/.local/share/akonadi/db_data/ I got the server up and running again. However, now there's something wrong with the database and Kmail gives me errors about Local Folders and Trash "Unknown Error. (Could not create collection Trash resourceId:2)" and Kmail crashes with an error.

I thought well, you tried it, let's just live with it and use MySQL. However, MySQL is giving me the same error messages. And I'm left with a broken database once again out of nowhere. Can anybody help me out in restoring it? Thanks!

Here's akonadiserver.error:
Code: Select all
Database process exited unexpectedly during initial connection!
executable: "/usr/bin/pg_ctl"
arguments: ("-w", "-t10", "start", "-D/home/alvanx/.local/share/akonadi/db_data")
stdout: "warte auf Start des Servers........ fertig
Server gestartet
"
stderr: ""
exit code: 0
process error: "Process operation timed out"
"[
0: akonadiserver(_Z11akBacktracev+0x36) [0x8092406]
1: akonadiserver() [0x80926c0]
2: [0xffffe400]
3: /lib/libc.so.6(gsignal+0x45) [0xb6e258c5]
4: /lib/libc.so.6(abort+0x175) [0xb6e271d5]
5: /usr/lib/libQtCore.so.4(_Z17qt_message_output9QtMsgTypePKc+0x8a) [0xb74a4c5a]
6: akonadiserver(_ZN15FileDebugStream9writeDataEPKcx+0xd8) [0x80949b8]
7: /usr/lib/libQtCore.so.4(_ZN9QIODevice5writeEPKcx+0xc9) [0xb754d6a9]
8: /usr/lib/libQtCore.so.4(+0x1184bd) [0xb755a4bd]
9: /usr/lib/libQtCore.so.4(_ZN11QTextStreamD1Ev+0x3e) [0xb756401e]
10: akonadiserver(_ZN18DbConfigPostgresql19startInternalServerEv+0x1532) [0x812cc42]
11: akonadiserver(_ZN7Akonadi13AkonadiServer20startDatabaseProcessEv+0xe9) [0x8096009]
12: akonadiserver() [0x8098f89]
13: akonadiserver(_ZN7Akonadi13AkonadiServer8instanceEv+0x2b) [0x809a73b]
14: akonadiserver(main+0x1f2) [0x808a8e2]
15: /lib/libc.so.6(__libc_start_main+0xf3) [0xb6e11003]
16: akonadiserver() [0x808b141]
]
"


And here's akonadiserverrc (disregard which backend is activated):
Code: Select all
[%General]
Driver=QMYSQL

[QPSQL]
StartServer=true
Name=akonadi
Host=/home/alvanx/.local/share/akonadi/socket-alvanx.ichthys
Options=
ServerPath=/usr/bin/pg_ctl
InitDbPath=/usr/bin/initdb
User=
Password=
Port=5432

[QMYSQL]
StartServer=true
ServerPath=/usr/sbin/mysqld
Name=akonadi
Host=
User=
Password=
Options="UNIX_SOCKET=/home/alvanx/.local/share/akonadi/socket-alvanx.ichthys/mysql.socket"

[Debug]
Tracer=null


Thank you for your help.

EDIT: Aaand MySQL works at second attempt, so at least I have a workaround for now.


Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot]