As posted in Installed Karmic post I was facing an Akonadi error on startup for some weird reason. Dunno since when it surfaced(from jaunty, intrepid or even previous releases too). Anyways I installed the new KDE SC 4.4 (This one rocks. ALL must install KDE SC 4.4 if you want to use a desktop as it should be. Period.) and the Akonadi error hasn’t gone yet. So a quick search on google led me to Curtis Farnham‘s site and saw he too was facing the same problem. I tried following his advice of moving mysql-global.conf but with no success although I haven’t used Akonadi or any Akonadi dependent apps(KMail, Kontact, etc) as yet. Read on…
Even Akonadi configuration control is missing from the new KDE 4.4 and another weird issue I faced is that when doing a dist-upgrade on Kubuntu, which has KDE 4.4 updates, the KDE UI blows up midway and takes me to console. Being a geek and an old time linux user, I can handle the way around but what about newcomers and grannies using linux. Note to KDE Dev: Please have consideration for weak hearted people. Why do you want to be the cause of their death. Please show some nice message and not just blow up X/KDM on KDE updates. You were nice boy before 4.4 came in. Please continue being so. I know you all rock with KDE SC 4.4 but this is not the way to celebrate blowing up KDM and taking the users to console mode that too with no login prompt.
Edit: It seems we have to always do all dist-updates from console mode only. I am surprised as I do a dist-update everyday to fetch all updates to any of the installed packages and I will not know which ones will blow up the system. Anyways few linux distros recommend this way only. It is ironic coz Kubuntu has never blown up like this before only after the new KDE 4.4 upgrade did this X getting killed behaviour came in. So to lay down a proper procedure, here the steps to be taken to “properly” dist-upgrade(atleast if you see KDE packages being updated).
Log out of KDE. Go to Textmode by doing Ctrl+Alt+F1 logon as root, and then type: init 3 apt-get update apt-get dist-upgrade apt-get clean init 5 && exit
So users facing KDE blowup issue, note that the dist-upgrade command hasn’t successfully completed yet. Do a Alt+F1, log into with your username/password and run
'sudo dpkg --configure -a'
in the terminal. This will properly configure the pending updates. Ensure by running
'sudo apt-get -f install'
and restart the machine.
Ok coming back to Akonadi error, after moving mysql-global.conf and still getting same error, I tried to checkout the Akonadi Control in System Settings>Advance and guess what, there is no “Advance” option though I could see “Advance User Settings” option. But no Akonadi option in it!. Seems the KDE blowup or new KDE 4.4 entirely removed it. I do have kdepim-runtime package installed just in case someone wants to know. But no way to control Akonadi from UI. Quick search revealed that it was purposely removed to “Save the User” Ahh yes thanks for the care. So people wanting the GUI although temporarily can run
to configure Akonadi from UI.
So I went commandline and ran ‘akonadictl start’ and got a long list of errors…
[akonadiserver] search paths: ("/usr/lib/jvm/java-6-sun/bin", "/media/sda5/apache-ant-1.6.5/bin", "/usr/local/Adobe/Acrobat7.0/bin", "/usr/local/sbin", "/usr/local/bin", "/usr/sbin", "/usr/bin", "/sbin", "/bin", "/usr/games", "/opt/real/RealPlayer", "/usr/sbin", "/usr/local/sbin", "/usr/local/libexec", "/usr/libexec", "/opt/mysql/libexec", "/opt/local/lib/mysql5/bin") [akonadiserver] Database process exited unexpectedly during initial connection! [akonadiserver] executable: "/usr/sbin/mysqld-akonadi" [akonadiserver] arguments: ("--defaults-file=/home/username/.local/share/akonadi//mysql.conf", "--datadir=/home/username/.local/share/akonadi/db_data/", "--socket=/home/username/.local/share/akonadi/db_misc/mysql.socket") [akonadiserver] stdout: "" [akonadiserver] stderr: "Could not open required defaults file: /home/username/.local/share/akonadi//mysql.conf [akonadiserver] Fatal error in defaults handling. Program aborted [akonadiserver] 100213 5:37:05 [Warning] Can't create test file /home/username/.local/share/akonadi/db_data/jaguar.lower-test [akonadiserver] 100213 5:37:05 [Warning] Can't create test file /home/username/.local/share/akonadi/db_data/jaguar.lower-test [akonadiserver] 100213 5:37:05 [Note] Plugin 'FEDERATED' is disabled. [akonadiserver] /usr/sbin/mysqld-akonadi: Table 'mysql.plugin' doesn't exist [akonadiserver] 100213 5:37:05 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it. [akonadiserver] 100213 5:37:05 InnoDB: Operating system error number 13 in a file operation. [akonadiserver] InnoDB: The error means mysqld does not have the access rights to [akonadiserver] InnoDB: the directory. [akonadiserver] InnoDB: File name ./ibdata1 [akonadiserver] InnoDB: File operation call: 'create'. [akonadiserver] InnoDB: Cannot continue operation. [akonadiserver] " [akonadiserver] exit code: 1 [akonadiserver] process error: "Unknown error" [akonadiserver] "[ [akonadiserver] 0: akonadiserver(_Z11akBacktracev+0x35) [0x8052055] [akonadiserver] 1: akonadiserver [0x8052526] [akonadiserver] 2: [0x5e0400] [akonadiserver] 3: [0x5e0422] [akonadiserver] 4: /lib/tls/i686/cmov/libc.so.6(gsignal+0x51) [0x7d24d1] [akonadiserver] 5: /lib/tls/i686/cmov/libc.so.6(abort+0x182) [0x7d5932] [akonadiserver] 6: /usr/lib/libQtCore.so.4(_Z17qt_message_output9QtMsgTypePKc+0x8c) [0xadf2bc] [akonadiserver] 7: akonadiserver(_ZN15FileDebugStream9writeDataEPKcx+0xc4) [0x80535a4] [akonadiserver] 8: /usr/lib/libQtCore.so.4(_ZN9QIODevice5writeEPKcx+0x8e) [0xb787ae] [akonadiserver] 9: /usr/lib/libQtCore.so.4 [0xb8bce5] [akonadiserver] 10: /usr/lib/libQtCore.so.4(_ZN11QTextStreamD1Ev+0x3d) [0xb8d1fd] [akonadiserver] 11: akonadiserver(_ZN6QDebugD1Ev+0x46) [0x804dd56] [akonadiserver] 12: /usr/lib/libakonadiprivate.so.1(_ZN7Akonadi13AkonadiServer25startMysqlDatabaseProcessEv+0x1a63) [0x370f93] [akonadiserver] 13: /usr/lib/libakonadiprivate.so.1(_ZN7Akonadi13AkonadiServer20startDatabaseProcessEv+0x263) [0x3762d3] [akonadiserver] 14: /usr/lib/libakonadiprivate.so.1(_ZN7Akonadi13AkonadiServerC1EP7QObject+0x7d) [0x37656d] [akonadiserver] 15: /usr/lib/libakonadiprivate.so.1(_ZN7Akonadi13AkonadiServer8instanceEv+0x58) [0x377a28] [akonadiserver] 16: akonadiserver(main+0x32c) [0x804d2ac] [akonadiserver] 17: /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6) [0x7beb56] [akonadiserver] 18: akonadiserver [0x804ceb1] [akonadiserver] ] [akonadiserver] " ProcessControl: Application 'akonadiserver' returned with exit code 255 (Unknown error) "akonadiserver" crashed too often and will not be restarted!
Hmmm….off to another google search when I landed on KDE Akonadi UserBase site and more cross-compare to the error I was getting led me too this gem of knowledge about Apparmor. I saw I was having the same error! Taking heed from it, I ran the following commands.
sudo aa-complain mysqld sudo /etc/init.d/apparmor reload
and for safety sake also
sudo aa-complain mysqld-akonadi sudo /etc/init.d/apparmor reload
and then finally
And Viola! Akonadi came to life and other apps based on Akonadi that runs by default in the new KDE i.e nepomuk(Desktop Search) roared to life. Akonadi however did complain that Nepomuk Agents were not active or something and I enabled it in “Advance User Setting>Desktop Search” along with Strigi File Indexer. No complains!! everything works fine now and I have resolved a long standing Akonadi error/bug!! Hurray.
Thus writing the steps here so that it can help someone who comes searching for a solution to this problem. I have seen so many users facing Akonadi problem but with little or no help. Hope this helps.