Reply to topic

Akonadi won't start after KDE upgrade 4.12 -> 4.14.1

guidow
Registered Member
Posts
10
Karma
0
OS
Hi,

After upgrading from KDE 4.12 to KDE 4.14, Akonadi, and with it, KMail, will no longer start.

After I relogged after the upgrade, KMail started some kind of migration process (sorry, can't recall the exact wording, and I cannot reproduce it either), which went on for a very long time (hours), but eventually failed.

Now when I start kmail, it tells me "The Akonadi personal information management service is not operational".

If I try to start akonadi from the command line, I get this error:

Code: Select all
search paths:  ("/usr/local/bin", "/usr/bin", "/bin", "/opt/bin", "/usr/x86_64-pc-linux-gnu/gcc-bin/4.7.3", "/usr/games/bin", "/usr/sbin", "/usr/local/sbin", "/usr/local/libexec", "/usr/libexec", "/opt/mysql/libexec", "/opt/local/lib/mysql5/bin", "/opt/mysql/sbin")
Found mysql_install_db:  ""
Found mysqlcheck:  "/usr/bin/mysqlcheck"
akonadi.collectionattributetable                   OK
akonadi.collectionmimetyperelation                 OK
akonadi.collectionpimitemrelation                  OK
akonadi.collectiontable                            OK
akonadi.flagtable                                  OK
akonadi.mimetypetable                              OK
akonadi.parttypetable                              OK
akonadi.pimitemflagrelation                        OK
akonadi.pimitemtable                               OK
akonadi.pimitemtagrelation                         OK
akonadi.resourcetable                              OK
akonadi.schemaversiontable                         OK
akonadi.tagattributetable                          OK
akonadi.tagremoteidresourcerelationtable           OK
akonadi.tagtable                                   OK
akonadi.tagtypetable                               OK
mysql.columns_priv                                 OK
mysql.db                                           OK
mysql.event                                        OK
mysql.func                                         OK
mysql.general_log                                  OK
mysql.help_category                                OK
mysql.help_keyword                                 OK
mysql.help_relation                                OK
mysql.help_topic                                   OK
mysql.host                                         OK
mysql.ndb_binlog_index                             OK
mysql.plugin                                       OK
mysql.proc                                         OK
mysql.procs_priv                                   OK
mysql.servers                                      OK
mysql.slow_log                                     OK
mysql.tables_priv                                  OK
mysql.time_zone                                    OK
mysql.time_zone_leap_second                        OK
mysql.time_zone_name                               OK
mysql.time_zone_transition                         OK
mysql.time_zone_transition_type                    OK
mysql.user                                         OK
MySQL version OK (required "5.1" , available "5.5" )
Database "akonadi" opened using driver "QMYSQL"
DbInitializer::run()
checking table  "SchemaVersionTable"
checking table  "ResourceTable"
checking table  "CollectionTable"
checking table  "MimeTypeTable"
checking table  "PimItemTable"
checking table  "FlagTable"
checking table  "PartTypeTable"
checking table  "PartTable"
"CREATE TABLE PartTable (id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, pimItemId BIGINT NOT NULL, partTypeId BIGINT NOT NULL, data LONGBLOB, datasize BIGINT NOT NULL, version INTEGER DEFAULT 0, external BOOL DEFAULT false, FOREIGN KEY (pimItemId) REFERENCES PimItemTable(id) ON UPDATE CASCADE ON DELETE CASCADE, FOREIGN KEY (partTypeId) REFERENCES PartTypeTable(id) ON UPDATE CASCADE ON DELETE CASCADE)  COLLATE=utf8_general_ci DEFAULT CHARSET=utf8"
"
Sql error: Can't create table 'akonadi.parttable' (errno: -1) QMYSQL: Unable to execute query
Query: CREATE TABLE PartTable (id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, pimItemId BIGINT NOT NULL, partTypeId BIGINT NOT NULL, data LONGBLOB, datasize BIGINT NOT NULL, version INTEGER DEFAULT 0, external BOOL DEFAULT false, FOREIGN KEY (pimItemId) REFERENCES PimItemTable(id) ON UPDATE CASCADE ON DELETE CASCADE, FOREIGN KEY (partTypeId) REFERENCES PartTypeTable(id) ON UPDATE CASCADE ON DELETE CASCADE)  COLLATE=utf8_general_ci DEFAULT CHARSET=utf8"
Unable to initialize database.
"[
0: akonadiserver(_Z11akBacktracev+0x34) [0x473204]
1: akonadiserver() [0x473621]
2: /lib64/libc.so.6(+0x387a0) [0x7f2b438ab7a0]
3: /lib64/libc.so.6(gsignal+0x35) [0x7f2b438ab725]
4: /lib64/libc.so.6(abort+0x148) [0x7f2b438acba8]
5: /usr/lib64/qt4/libQtCore.so.4(_Z17qt_message_output9QtMsgTypePKc+0x74) [0x7f2b450906b4]
6: akonadiserver(_ZN15FileDebugStream9writeDataEPKcx+0x9b) [0x4755cb]
7: /usr/lib64/qt4/libQtCore.so.4(_ZN9QIODevice5writeEPKcx+0xb4) [0x7f2b4512a5d4]
8: /usr/lib64/qt4/libQtCore.so.4(+0x11c20f) [0x7f2b4513520f]
9: /usr/lib64/qt4/libQtCore.so.4(_ZN11QTextStreamD1Ev+0x3b) [0x7f2b4513d79b]
10: akonadiserver(_ZN7Akonadi6Server13AkonadiServer4initEv+0x5fc) [0x47929c]
11: akonadiserver() [0x54c7b4]
12: /usr/lib64/qt4/libQtCore.so.4(_ZN7QObject5eventEP6QEvent+0x26e) [0x7f2b451b020e]
13: /usr/lib64/qt4/libQtCore.so.4(_ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent+0x8e) [0x7f2b451969de]
14: /usr/lib64/qt4/libQtCore.so.4(_ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData+0x359) [0x7f2b45199fa9]
15: /usr/lib64/qt4/libQtCore.so.4(+0x1abbde) [0x7f2b451c4bde]
16: /usr/lib64/libglib-2.0.so.0(g_main_context_dispatch+0x244) [0x7f2b43370054]
17: /usr/lib64/libglib-2.0.so.0(+0x4b288) [0x7f2b43370288]
18: /usr/lib64/libglib-2.0.so.0(g_main_context_iteration+0x34) [0x7f2b43370344]
19: /usr/lib64/qt4/libQtCore.so.4(_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x7e) [0x7f2b451c4d7e]
20: /usr/lib64/qt4/libQtCore.so.4(_ZN10QEventLoop13processEventsE6QFlagsINS_17ProcessEventsFlagEE+0x2f) [0x7f2b4519568f]
21: /usr/lib64/qt4/libQtCore.so.4(_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0x138) [0x7f2b45195918]
22: /usr/lib64/qt4/libQtCore.so.4(_ZN16QCoreApplication4execEv+0x88) [0x7f2b4519ab78]
23: akonadiserver(main+0x1cd) [0x46dd8d]
24: /lib64/libc.so.6(__libc_start_main+0xf5) [0x7f2b43897db5]
25: akonadiserver() [0x46e5a1]
]
"
ProcessControl: Application 'akonadiserver' returned with exit code 255 (Unknown error)
"akonadiserver" crashed too often and will not be restarted!


How can I make this work again?

In this particular case, I'm not really worried about losing my emails, because all my mails are on IMAP accounts which I can still access with Thunderbird and K9Mail. However, on another computer where I am also using KDE 4.12 and KMail, I am getting some of my (important) emails via POP3 and storing them locally. After what happened on this computer, I am genuinely concerned that upgrading that computer to 4.14 will make me lose those emails...
User avatar einar
Administrator
Posts
3402
Karma
7
OS
You could try starting the MySQL server directly, connecting to it and try to type in the query to see what kind of error it throws. I'll try to dig up how that can be done.

EDIT: I contacted one of the developers, which will look into it. I'll post update once I get information.


"Violence is the last refuge of the incompetent."
Image
Plasma FAQ maintainer - Plasma programming with Python
User avatar progdan
KDE Developer
Posts
90
Karma
0
OS
This is a weird problem: the PartTable always exists - there is no reason for the updater to try to create it again - errno -1 usually suggests (according to Google) that the table already exists.

Could you please connect to the Akonadi database, run couple queries and past their output here?

Start MySQL server
Code: Select all
mysqld_safe --defaults-file=$HOME/.local/share/akonadi/mysql.conf --datadir=$HOME/.local/share/akonadi/db_data --socket=/tmp/akonaditest.socket &

Connect to it
Code: Select all
mysql --socket=/tmp/akonaditest.socket

Now in the mysql prompt, running following queries:
Code: Select all
USE akonadi;

SHOW TABLES;

CREATE TABLE PartTable (id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, pimItemId BIGINT NOT NULL, partTypeId BIGINT NOT NULL, data LONGBLOB, datasize BIGINT NOT NULL, version INTEGER DEFAULT 0, external BOOL DEFAULT false, FOREIGN KEY (pimItemId) REFERENCES PimItemTable(id) ON UPDATE CASCADE ON DELETE CASCADE, FOREIGN KEY (partTypeId) REFERENCES PartTypeTable(id) ON UPDATE CASCADE ON DELETE CASCADE)  COLLATE=utf8_general_ci DEFAULT CHARSET=utf8

quit

Copy output from each of the queries and past it here please.

Finally you can stop the MySQL server by running:
Code: Select all
mysqladmin --socket=/tmp/akonaditest.socket shutdown


Daniel Vrátil | www.dvratil.cz | [email protected]
IRC: dvratil on Freenode (#kde, #kontact, #akonadi, #fedora-kde)
guidow
Registered Member
Posts
10
Karma
0
OS
progdan wrote:This is a weird problem: the PartTable always exists - there is no reason for the updater to try to create it again - errno -1 usually suggests (according to Google) that the table already exists.

Could you please connect to the Akonadi database, run couple queries and past their output here?

Start MySQL server
Code: Select all
mysqld_safe --defaults-file=$HOME/.local/share/akonadi/mysql.conf --datadir=$HOME/.local/share/akonadi/db_data --socket=/tmp/akonaditest.socket &



That doesn't work. That gives me

Code: Select all
141001 22:31:01 mysqld_safe Logging to '/home/guido/.local/share/akonadi/db_data/mysql.err'.
141001 22:31:01 mysqld_safe A mysqld process already exists


ps says:

Code: Select all
guido     5359  0.0  0.0 283852 22512 ?        Sl   22:30   0:00 /usr/sbin/mysqld --defaults-file=/home/guido/.local/share/akonadi/mysql.conf --datadir=/home/guido/.local/share/akonadi/db_data/ --socket=/tmp/akonadi-guido.H49xC4/mysql.socket
guido     5377  0.0  0.0 283852 22512 ?        Sl   22:30   0:00 /usr/sbin/mysqld --defaults-file=/home/guido/.local/share/akonadi/mysql.conf --datadir=/home/guido/.local/share/akonadi/db_data/ --socket=/tmp/akonadi-guido.H49xC4/mysql.socket
guido     5395  0.0  0.0 283852 22540 ?        Sl   22:30   0:00 /usr/sbin/mysqld --defaults-file=/home/guido/.local/share/akonadi/mysql.conf --datadir=/home/guido/.local/share/akonadi/db_data/ --socket=/tmp/akonadi-guido.H49xC4/mysql.socket
guido     5413  0.0  0.0 283852 22444 ?        Sl   22:30   0:00 /usr/sbin/mysqld --defaults-file=/home/guido/.local/share/akonadi/mysql.conf --datadir=/home/guido/.local/share/akonadi/db_data/ --socket=/tmp/akonadi-guido.H49xC4/mysql.socket


progdan wrote:Connect to it
Code: Select all
mysql --socket=/tmp/akonaditest.socket



I used
Code: Select all
mysql --socket=/tmp/akonadi-guido.H49xC4/mysql.socket

instead.

progdan wrote:Now in the mysql prompt, running following queries:
Code: Select all
USE akonadi;

SHOW TABLES;



This produces
Code: Select all
+----------------------------------+
| Tables_in_akonadi                |
+----------------------------------+
| collectionattributetable         |
| collectionmimetyperelation       |
| collectionpimitemrelation        |
| collectiontable                  |
| flagtable                        |
| mimetypetable                    |
| parttypetable                    |
| pimitemflagrelation              |
| pimitemtable                     |
| pimitemtagrelation               |
| resourcetable                    |
| schemaversiontable               |
| tagattributetable                |
| tagremoteidresourcerelationtable |
| tagtable                         |
| tagtypetable                     |
+----------------------------------+
16 rows in set (0.00 sec)


progdan wrote:
Code: Select all
CREATE TABLE PartTable (id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, pimItemId BIGINT NOT NULL, partTypeId BIGINT NOT NULL, data LONGBLOB, datasize BIGINT NOT NULL, version INTEGER DEFAULT 0, external BOOL DEFAULT false, FOREIGN KEY (pimItemId) REFERENCES PimItemTable(id) ON UPDATE CASCADE ON DELETE CASCADE, FOREIGN KEY (partTypeId) REFERENCES PartTypeTable(id) ON UPDATE CASCADE ON DELETE CASCADE)  COLLATE=utf8_general_ci DEFAULT CHARSET=utf8

quit



No luck:

Code: Select all
ERROR 1005 (HY000): Can't create table 'akonadi.parttable' (errno: -1)


progdan wrote:Copy output from each of the queries and past it here please.

Finally you can stop the MySQL server by running:
Code: Select all
mysqladmin --socket=/tmp/akonaditest.socket shutdown
jkudfkl
Registered Member
Posts
1
Karma
0
guidow wrote:No luck:
Code: Select all
ERROR 1005 (HY000): Can't create table 'akonadi.parttable' (errno: -1)
Yep - I'm getting that too. Looks like it's this error from http://dev.mysql.com/doc/refman/5.5/en/innodb-error-codes.html (emphasis added):
MySQL 5.5 Reference Manual - 14.21.5 InnoDB Error Codes wrote:1005 (ER_CANT_CREATE_TABLE)
Cannot create table. If the error message refers to error 150, table creation failed because a foreign key constraint was not correctly formed. If the error message refers to error –1, table creation probably failed because the table includes a column name that matched the name of an internal InnoDB table.

Notably, changing the query to
Code: Select all
CREATE TABLE blahblahtest (id...
without changing anything else works, so it looks like it's the PartTable bit which already exists, but simultaneously doesn't.
User avatar einar
Administrator
Posts
3402
Karma
7
OS
NIce find. Can you open a bug report with these information? I think they'll be very useful.


"Violence is the last refuge of the incompetent."
Image
Plasma FAQ maintainer - Plasma programming with Python

 
Reply to topic

Bookmarks



Who is online

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