LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Akonadi and MariaDB 10.2.8 (https://www.linuxquestions.org/questions/slackware-14/akonadi-and-mariadb-10-2-8-a-4175612895/)

denydias 08-30-2017 02:54 AM

Akonadi and MariaDB 10.2.8
 
Hi there,

I have just upgraded to slackware64 current changes for Wed, 30 Aug 2017 02:41:28 GMT.

Now akonadi says:

Code:

$ akonadictl start
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QSQLITE3 QMYSQL QMYSQL3
org.kde.pim.akonadiserver: Invalid database object during database server startup
org.kde.pim.akonadiserver: Failed to remove runtime connection config file
org.kde.pim.akonadicontrol: Application 'akonadiserver' exited normally...

Is there something I can do to update Akonadi's database before starting it?

gmgf 08-30-2017 05:07 AM

Probably qt4 and akonadi need rebuild with the new mariadb, i use plasma5 here and qt5, need also rebuild.

ponce 08-30-2017 08:13 AM

looking a little around seems like these are the rebuild candidates
Code:

amarok                                                                                   
calligra                                                                                 
perl                                                                                     
qt                                                                                       
redland                                                                                   
ulogd

I had to modify the ulogd.SlackBuild because sgml2html is not able to process the file anymore :( (but we still have the *.txt doc)
Code:

--- ./ulogd.SlackBuild.orig    2015-12-06 21:28:26.000000000 +0100
+++ ./ulogd.SlackBuild  2017-08-30 15:06:41.999702802 +0200
@@ -82,7 +82,6 @@
 
 cd doc
  sgml2txt ulogd.sgml
-  sgml2html -s 0 ulogd.sgml
 cd ..
 
 find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | \
@@ -102,7 +101,7 @@
 
 mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION/samples
 cp -a \
-  AUTHORS COPYING* README* TODO doc/ulogd.{txt,html} \
+  AUTHORS COPYING* README* TODO doc/ulogd.txt \
  $PKG/usr/doc/$PKGNAM-$VERSION
 cp -a doc/*.sql doc/*.table $PKG/usr/doc/$PKGNAM-$VERSION/samples


denydias 08-30-2017 10:17 AM

Quote:

Originally Posted by gmgf (Post 5753621)
Probably qt4 and akonadi need rebuild with the new mariadb, i use plasma5 here and qt5, need also rebuild.

Oh! Also in AlienBob's plasma5 and qt5 wagon here. Sorry not to mention that!

gmgf 08-30-2017 11:02 AM

Quote:

Originally Posted by denydias (Post 5753746)
Oh! Also in AlienBob's plasma5 and qt5 wagon here. Sorry not to mention that!

I'm recompiling qt5-5.9.1, but it takes between 4 and 6 hours here, after, I would post a message on Eric's blog.

Chuck56 08-30-2017 11:32 AM

Same issue here on stock 64-current, Akonadi server did not start after the 2017-08-30 updates. My temporary solution is to fall back to the previous mariadb-10.0.32 and jemalloc-3.6.0 packages until the dependencies are ironed out. Akonadi starts now as expected. I'll keep an eye out for breakages I may have introduced with falling back on these 2 packages.

denydias 08-30-2017 12:20 PM

Quote:

Originally Posted by Chuck56 (Post 5753774)
My temporary solution is to fall back to the previous mariadb-10.0.32 and jemalloc-3.6.0 packages until the dependencies are ironed out.

Where did you find these old -current packages?

Chuck56 08-30-2017 12:30 PM

Quote:

Originally Posted by denydias (Post 5753787)
Where did you find these old -current packages?

I checked the https://mirrors.slackware.com/mirrorlist/ and found a mirror that had not updated yet with the latest packages. https://dfw.mirror.rackspace.com/slackware/ was still showing the old packages for slackware64-current.

denydias 08-30-2017 12:43 PM

Quote:

Originally Posted by Chuck56 (Post 5753792)
I checked the https://mirrors.slackware.com/mirrorlist/ and found a mirror that had not updated yet with the latest packages. https://dfw.mirror.rackspace.com/slackware/ was still showing the old packages for slackware64-current.

Tks a lot!

denydias 08-30-2017 01:47 PM

After downgrading to mariadb-10.0.32, it's important to follow these steps to also downgrade databases.

So Akonadi could restart after downgrading, follow this step and then:

Code:

$ cd ~/.local/share/akonadi/
$ rm -rf *.old socket-* db_data/ib_logfile* db_data/*.err db_data/*.old
$ akonadictl start

That should bring your email, calendar and contacts back, although no new entries could be added (even new emails arriving). There will be errors like this in Akonadi's log:

Code:

Connecting to deprecated signal org.kde.pim.akonadiserver: DATABASE ERROR:
org.kde.pim.akonadiserver:  Error code: 1036
org.kde.pim.akonadiserver:  DB error:  "Table 'pimitemtable' is read only"
org.kde.pim.akonadiserver:  Error text: "Table 'pimitemtable' is read only QMYSQL3: Não foi possível executar a expressão"
org.kde.pim.akonadiserver:  Query: "UPDATE PimItemTable SET atime = :0 WHERE ( PimItemTable.collectionId = :1 )"
org.kde.pim.akonadiserver: Unable to update item access time

Removing innodb_force_recovery = 1 from ~/.local/share/akonadi/mysql.conf will lead to Akonadi refusing to start again.

At least this will give you a read only environment so you can access your stuff until more robust fixes arise. Time to use your account web UI for a while.

gmgf 08-30-2017 01:51 PM

Finally i have rebuild qt5 for nothing, because this mariadb version have a problem with akonadi (plasma5) version:

https://www.mail-archive.com/kde-bug...msg168566.html

denydias 08-30-2017 01:59 PM

Quote:

Originally Posted by gmgf (Post 5753831)
Finally i have rebuild qt5 for nothing, because this mariadb version have a problem with akonadi (plasma5) version:

Good to know! This holds me to rm -rf ~/.local/share/akonadi, configure and sync the whole thing again to get into the same conclusion as you. Thanks for sharing.

Chuck56 08-30-2017 02:15 PM

Quote:

Originally Posted by denydias (Post 5753828)
After downgrading to mariadb-10.0.32, it's important to follow these steps to also downgrade databases.

So Akonadi could restart after downgrading, follow this step and then: ...

Just for the record, those steps aren't needed for slackware64-current with the stock KDE 4.14.35. The 2 package downgrades allowed akonadi to work without any other modifications.

gmgf 08-30-2017 03:15 PM

Refinally ;)

i have applied this unofficial patch to akonadi (plasma5 version) i use akonadi-17.08.0.

--- akonadi-17.04.3/src/server/storage/dbconfigmysql.cpp 2017-08-11 23:29:02.088613966 +0800
+++ akonadi-17.04.3/src/server/storage/dbconfigmysql.cpp 2017-08-11 23:22:18.808432643 +0800
@@ -492,7 +492,7 @@
}
}

- QSqlDatabase::removeDatabase(initCon);
+ //QSqlDatabase::removeDatabase(initCon);
return success;
}

akonadi and kmail seem worked correctly ;)

denydias 08-31-2017 01:30 AM

Quote:

Originally Posted by denydias (Post 5753828)
At least this will give you a read only environment...

It turns out that a...

Code:

mv ~/.local/share/akonadi ~/.local/share/akonadi.orig
...worked a lot better than I expected! I thought I was being forced to reconfigure all accounts and settings for Kontact Suite (KMail, KOrganizer and KAddressBook and friends ) from scratch. My mistake! Accounts and settings are kept elsewhere, just their content are sync'ed again (email messages, contacts and calendars).

So if you're bitten by this while in KDE5 and are in a hurry for your precious data, first downgrade to mariadb-10.0.32 as shown above, then run:

Code:

akonadictl stop
rm -rf ~/.local/share/akonadi
akonadictl start

Give the thing some time to sync the whole thing again. Might take hours depending on your data size and connection speed.

A bonus: my +5 years old Akonadi data directory was 8.6GB in size. After this resync it is now 4GB. 4.6GB of what seems pure overhead was gone.

EDIT:
For now, I advise you to put mysql and jemalloc in /etc/slackpkg/blacklist (or greylist if you use slackpkg+).

cwizardone 08-31-2017 03:34 AM

Yesterday's updates,

Quote:

Wed Aug 30 22:34:34 UTC 2017
a/e2fsprogs-1.43.6-x86_64-1.txz: Upgraded.
ap/sqlite-3.20.1-x86_64-1.txz: Upgraded.
d/perl-5.24.0-x86_64-2.txz: Rebuilt.
Recompiled against mariadb-10.2.8.
Upgraded to DBD-mysql-4.043, DBI-1.637, URI-1.72, and XML-Simple-2.24.
kde/amarok-2.8.0-x86_64-4.txz: Rebuilt.
Recompiled against mariadb-10.2.8.
kde/calligra-2.9.11-x86_64-14.txz: Rebuilt.
Recompiled against mariadb-10.2.8.
l/qt-4.8.7-x86_64-7.txz: Rebuilt.
Recompiled against mariadb-10.2.8.
l/redland-1.0.17-x86_64-2.txz: Rebuilt.
Recompiled against mariadb-10.2.8.
n/ulogd-2.0.5-x86_64-2.txz: Rebuilt.
Recompiled against mariadb-10.2.8.
+--------------------------+

ponce 08-31-2017 03:42 AM

yep, Pat (thanks!) also fixed linuxdoc-tools (most probably through the perl updates) so that sgml2html generates the html docs correctly.

EDIT: ah, I just saw the ulogd.SlackBuild: he moved away the "set -e" instead :)

gmgf 08-31-2017 03:44 AM

Quote:

Originally Posted by cwizardone (Post 5754025)
Yesterday's updates,

Yes, but these changes doesn't solve the akonadi problem.:mad:

Darth Vader 08-31-2017 08:45 AM

Code:

ProcessControl: Application 'akonadiserver' returned with exit code 255 (Unknown error)
search paths:  ("/usr/local/sbin", "/usr/sbin", "/sbin", "/usr/local/bin", "/usr/bin", "/bin", "/usr/games", "/usr/lib64/kde4/libexec", "/usr/lib64/qt/bin", "/usr/share/texmf/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:  "/usr/bin/mysql_install_db"
Found mysqlcheck:  "/usr/bin/mysqlcheck"
MySQL version OK (required "5.1" , available "10.2" )
Database error: Cannot open database.
Last driver error: "QMYSQL: Unable to connect"
Last database error: "Plugin pvio_socket could not be loaded: not initialized"

QSqlQuery::exec: database not open
Unable to open database "Plugin pvio_socket could not be loaded: not initialized QMYSQL: Unable to connect"
"[
0: akonadiserver(_Z11akBacktracev+0x39) [0x46ada9]
1: akonadiserver() [0x46b080]
2: /lib64/libc.so.6(+0x36d10) [0x7fa220d72d10]
3: /lib64/libc.so.6(gsignal+0x9f) [0x7fa220d72c9f]
4: /lib64/libc.so.6(abort+0x1a7) [0x7fa220d74717]
5: /usr/lib64/qt/lib/libQtCore.so.4(_Z17qt_message_output9QtMsgTypePKc+0x70) [0x7fa222997d90]
6: akonadiserver(_ZN15FileDebugStream9writeDataEPKcx+0xa0) [0x46d710]
7: /usr/lib64/qt/lib/libQtCore.so.4(_ZN9QIODevice5writeEPKcx+0x159) [0x7fa222a33459]
8: /usr/lib64/qt/lib/libQtCore.so.4(+0x129360) [0x7fa222a40360]
9: /usr/lib64/qt/lib/libQtCore.so.4(_ZN11QTextStreamD2Ev+0x31) [0x7fa222a48e31]
10: akonadiserver(_ZN7Akonadi6Server13AkonadiServer4initEv+0x526) [0x4715e6]
11: akonadiserver() [0x5553d9]
12: /usr/lib64/qt/lib/libQtCore.so.4(_ZN7QObject5eventEP6QEvent+0x1b1) [0x7fa222abde61]
13: /usr/lib64/qt/lib/libQtCore.so.4(_ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent+0x6e) [0x7fa222aa4ffe]
14: /usr/lib64/qt/lib/libQtCore.so.4(_ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData+0x2e2) [0x7fa222aa7e92]
15: /usr/lib64/qt/lib/libQtCore.so.4(+0x1bc16e) [0x7fa222ad316e]
16: /usr/lib64/libglib-2.0.so.0(g_main_context_dispatch+0x2c7) [0x7fa2202381a7]
17: /usr/lib64/libglib-2.0.so.0(+0x493b8) [0x7fa2202383b8]
18: /usr/lib64/libglib-2.0.so.0(g_main_context_iteration+0x2c) [0x7fa22023843c]
19: /usr/lib64/qt/lib/libQtCore.so.4(_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x76) [0x7fa222ad32d6]
20: /usr/lib64/qt/lib/libQtCore.so.4(_ZN10QEventLoop13processEventsE6QFlagsINS_17ProcessEventsFlagEE+0x34) [0x7fa222aa36e4]
21: /usr/lib64/qt/lib/libQtCore.so.4(_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0x196) [0x7fa222aa39f6]
22: /usr/lib64/qt/lib/libQtCore.so.4(_ZN16QCoreApplication4execEv+0x8c) [0x7fa222aa908c]
23: akonadiserver(main+0x200) [0x463e00]
24: /lib64/libc.so.6(__libc_start_main+0xea) [0x7fa220d5d02a]
25: akonadiserver(_start+0x2a) [0x46468a]
]
"
ProcessControl: Application 'akonadiserver' returned with exit code 255 (Unknown error)
"akonadiserver" crashed too often and will not be restarted!

This, on the latest slackware(64)-current, with a clean installation. And yes, it worked fine with previous MySQL package.

To note this pvio_socket plugin tried to be loaded. The fun is that this one is specific to Windows environment, from what I understand... :D

volkerdi 08-31-2017 12:34 PM

Quote:

Originally Posted by gmgf (Post 5754029)
Yes, but these changes doesn't solve the akonadi problem.:mad:

Yes, I know, but at least things are otherwise a little better than without the recompiles. When I moved things to use mariadb 10.2.x I hadn't fully grasped the extent to which the API has become incompatible... and frankly, I still haven't. I'll be looking into what can be done to get things working again (help appreciated, of course). Otherwise reverting back to the older mariadb branch and related packages is still an option, as is dumping the incompatible KDE4 packages and just moving ahead to plasma if things work better there. I'd rather not step onto that treadmill just yet though. IMHO there's still some life left in KDE4.

My apologies for the blunder in first not noticing the library soname bumps and renames and breaking things that linked to the old names, and then for not realizing that it wasn't going to be as simple as just recompiling against the new ones. We'll get to the bottom of this though.

gmgf 08-31-2017 12:54 PM

Quote:

Originally Posted by volkerdi (Post 5754164)
Yes, I know, but at least things are otherwise a little better than without the recompiles. When I moved things to use mariadb 10.2.x I hadn't fully grasped the extent to which the API has become incompatible... and frankly, I still haven't. I'll be looking into what can be done to get things working again (help appreciated, of course). Otherwise reverting back to the older mariadb branch and related packages is still an option, as is dumping the incompatible KDE4 packages and just moving ahead to plasma if things work better there. I'd rather not step onto that treadmill just yet though. IMHO there's still some life left in KDE4.

My apologies for the blunder in first not noticing the library soname bumps and renames and breaking things that linked to the old names, and then for not realizing that it wasn't going to be as simple as just recompiling against the new ones. We'll get to the bottom of this though.

No problem Pat, thanks for your answer, another solution, it seem the mariadb 10.1 Series do not have this problem ;)

this version is used by many other distro but..... ;)

Darth Vader 08-31-2017 01:31 PM

Just to note that looks like even Plasma 5 has problems and struggle with the MariaDB 10.2.x ...

And looks like those nutty scientists who develop MariaDB have a very personal take on the software versioning.

Because that goddamned 10.2.x looks like a freaking ELEVEN all the way! And I think is better us to take it as it is, for real: MariaDB 11.x ;)

BTW, maybe that pvio_socket plugin issue could be a path to follow for fixing the things, at least on KDE4. :D

PS. Looks like there are others who hit on this pvio_socket issue too: https://forums.gentoo.org/viewtopic-p-8102400.html and https://bugs.gentoo.org/show_bug.cgi?id=626464

PS2. Also a bug report there: https://bugs.kde.org/show_bug.cgi?id=383991 and it is taken as UNCONFIRMED.

volkerdi 08-31-2017 03:12 PM

Quote:

Originally Posted by Darth Vader (Post 5754195)
Because that goddamned 10.2.x looks like a freaking ELEVEN all the way! And I think is better us to take it as it is, for real: MariaDB 11.x ;)

I'm with you on that assessment, Darth.

Chuck56 08-31-2017 04:29 PM

Quote:

Originally Posted by Darth Vader (Post 5754195)
...BTW, maybe that pvio_socket plugin issue could be a path to follow for fixing the things, at least on KDE4. :D

https://bugs.gentoo.org/show_bug.cgi?id=626464

Nice find Darth! The quoted link I left above from your post had a patch for akonadi. Specifics listed in #3 below. I now have a fully updated slackware64-current running a recompiled akonadi package.

#1 - I deleted my Akonadi database directory which (may or may not need this step):
Code:

rm ~/.local/share/akonadi/db-data
#2 - modified the /usr/share/config/akonadi/mysql-global.conf to remove a deprecated MariaDB command.
Code:

# memory pool InnoDB uses to store data dictionary information and other internal data structures (default:1M)
# Deprecated in MySQL >= 5.6.3
#innodb_additional_mem_pool_size=1M

#3 - Rebuild the akonadi package in /tmp after applying the change listed below. (Thanks Darth!)
Code:

/tmp/akonadi-1.13.0/server/src/storage/dbconfigmysql.cpp
Code:

        }
    }

-    QSqlDatabase::removeDatabase(initCon);
+    //QSqlDatabase::removeDatabase(initCon);
    return success;
 }

Restarted Akonadi using the System Settings / Personal Information icon in KDE4.

Shazam! Akonadi is working in slackware64-current fully updated to Wed Aug 30 22:34:34 UTC 2017 (plus the recompiled akonadi package)!

cwizardone 08-31-2017 06:46 PM

Quote:

Originally Posted by gmgf (Post 5754029)
Yes, but these changes doesn't solve the akonadi problem.:mad:


Here you go,

Quote:

Thu Aug 31 21:14:43 UTC 2017
l/akonadi-1.13.0-x86_64-5.txz: Rebuilt.
Merged an upstream patch and global config change to allow akonadi to work
properly with mariadb-10.2.8. Thanks to Heinz Wiesinger.
l/glib2-2.52.3-x86_64-2.txz: Rebuilt.
Fixed a race condition bug when using /etc/mtab. Thanks to ChrisVV.
:)

denydias 08-31-2017 06:54 PM

Quote:

Originally Posted by cwizardone (Post 5754283)
Here you go

People in -current with KDE4 should be happy now!

For the ones with KDE5, let's wait for AlienBOB's annoucement.

gmgf 09-01-2017 01:58 AM

Quote:

Originally Posted by denydias (Post 5754288)
People in -current with KDE4 should be happy now!

For the ones with KDE5, let's wait for AlienBOB's annoucement.

I have posted the solution (for akonadi plasma5) on Eric blog yesterday, But he is overworked in this moment...

denydias 09-01-2017 02:08 AM

Quote:

Originally Posted by gmgf (Post 5754377)
I have posted the solution (for akonadi plasma5) on Eric blog yesterday, But he is overworked in this moment...

Yeah, I have read your post there. Thanks for let him now and to provide a patch. Let's give the guy the time he needs.

Right now we have two workarounds:
  1. Users who DON'T upgraded MariaDB: pin some packages (see bellow).
  2. Users who upgraded MariaDB: downgrade MariaDB, rebuild Akonadi's db and pin some packages.
Until a fix for AlienBOB's KDE5 hit the wild, packages in the black/grey list for the moment are:

Code:

mariadb
jemalloc
perl
amarok
calligra
qt
redland
ulogd


denydias 09-11-2017 11:34 PM

Yesterday Eric (aka AlienBOB) released new KDE 5_17.09 packages.

After removing ~/.local/share/akonadi and try to 'akonadictl start', CLI says:

Code:

$ akonadictl start
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
Installing MariaDB/MySQL system tables in '~/.local/share/akonadi/db_data/' ...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
To do so, start the server, then issue the following commands:

'/usr/bin/mysqladmin' -u root password 'new-password'
'/usr/bin/mysqladmin' -u root -h minsky password 'new-password'

Alternatively you can run:
'/usr/bin/mysql_secure_installation'

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the MariaDB Knowledgebase at http://mariadb.com/kb or the
MySQL manual for more instructions.

You can start the MariaDB daemon with:
cd '/usr' ; /usr/bin/mysqld_safe --datadir='~/.local/share/akonadi/db_data/'

You can test the MariaDB daemon with mysql-test-run.pl
cd '/usr/mysql-test' ; perl mysql-test-run.pl

Please report any problems at http://mariadb.org/jira

The latest information about MariaDB is available at http://mariadb.org/.
You can find additional information about the MySQL part at:
http://dev.mysql.com
Consider joining MariaDB's strong and vibrant community:
https://mariadb.org/get-involved/

/usr/bin/mysqlcheck: Got error: 1049: Unknown database 'akonadi' when selecting the database
org.kde.pim.akonadiserver: Database error: Cannot open database.
org.kde.pim.akonadiserver:  Last driver error: "QMYSQL: Unable to connect"
org.kde.pim.akonadiserver:  Last database error: "Plugin pvio_socket could not be loaded: not initialized"
QSqlQuery::exec: database not open
org.kde.pim.akonadiserver: Database error: Cannot open database.
org.kde.pim.akonadiserver:  Last driver error: "QMYSQL: Unable to connect"
org.kde.pim.akonadiserver:  Last database error: "Plugin pvio_socket could not be loaded: not initialized"
QSqlQuery::exec: database not open
org.kde.pim.akonadiserver: Unable to open database "Plugin pvio_socket could not be loaded: not initialized QMYSQL: Unable to connect"
org.kde.pim.akonadicontrol: Application 'akonadiserver' exited normally...

It looks like it came without the patch pointed out by @gmgf to fix the issue.

The ones relying on KDE 5 in -current are still in mud waters with MariaDB 10.2.8. :(

PS: I've already warned Eric about the issue on the release post.

denydias 09-12-2017 03:44 PM

Quote:

Originally Posted by denydias (Post 5757837)
PS: I've already warned Eric about the issue on the release post.

Eric have replied to mine and others comments regarding this issue. The underlying issue is Qt related, not Akonadi itself. There is no solution yet. So we have to wait further.

denydias 09-12-2017 05:30 PM

Good news! Eric has provided a new Akonadi package with the patch proposed by @gmgf! Akonadi is playing nice with MariaDB 10.2. Yay!

Thank you, AlienBOB!


All times are GMT -5. The time now is 12:41 AM.