Akonadi doesn't work properly, KOrganizer fails [Solved]

Discussions Regarding Software

Moderator: Moderators

Post Reply
User avatar
linuxfluesterer
Old Dear Hen
Posts: 873
Joined: Thu Sep 20, 2012 19:47
Location: Germany

Akonadi doesn't work properly, KOrganizer fails [Solved]

Post by linuxfluesterer » Fri Sep 29, 2017 12:27

Hallo guys.
I'm using Plasma v. 5.10.5 with KOrganizer 17.08.1 (5.6.1), Akonadi 17.08.1 and Kernel 4.12.14.
When I start Korganizer I receive a message to start Akonadi with a button. After starting Akonadi then I receive a message, that Akonadi service for PIM doesn't run properly . Most of the KOrganizer-Window is greyed out, so that I just can only close the window.
Here are the messages of akonadiselftest:

Code: Select all

Akonadi Server Self-Test Report
===============================

Test 1:  SUCCESS
--------

Database driver found.
Details: The QtSQL driver 'QMYSQL' is required by your current Akonadi server configuration and was found on your system.

File content of '/home/linuxfluesterer/.config/akonadi/akonadiserverrc':
[Debug]
Tracer=null

[%General]
Driver=QMYSQL

[QMYSQL]
Host=
Name=akonadi
Options="UNIX_SOCKET=/tmp/akonadi-linuxfluesterer.YlBmcp/mysql.socket"
ServerPath=/usr/sbin/mysqld
StartServer=true


Test 2:  SUCCESS
--------

Akonadi is not running as root
Details: Akonadi is not running as a root/administrator user, which is the recommended setup for a secure system.

Test 3:  SUCCESS
--------

MySQL server found.
Details: You have currently configured Akonadi to use the MySQL server '/usr/sbin/mysqld'.
Make sure you have the MySQL server installed, set the correct path and ensure you have the necessary read and execution rights on the server executable. The server executable is typically called 'mysqld'; its location varies depending on the distribution.

Test 4:  SUCCESS
--------

MySQL server is executable.
Details: MySQL server found: /usr/sbin/mysqld  Ver 10.2.8-MariaDB-log for Linux on x86_64 (Source distribution)


Test 5:  SUCCESS
--------

MySQL server log contains no errors.
Details: The MySQL server log file '<a href="/home/linuxfluesterer/.local/share/akonadi/db_data/mysql.err">/home/linuxfluesterer/.local/share/akonadi/db_data/mysql.err</a>' does not contain any errors or warnings.

File content of '/home/linuxfluesterer/.local/share/akonadi/db_data/mysql.err':
2017-09-29 12:01:41 139648083810304 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-09-29 12:01:41 139648083810304 [Note] InnoDB: Uses event mutexes
2017-09-29 12:01:41 139648083810304 [Note] InnoDB: Compressed tables use zlib 1.2.11
2017-09-29 12:01:41 139648083810304 [Note] InnoDB: Using Linux native AIO
2017-09-29 12:01:41 139648083810304 [Note] InnoDB: Number of pools: 1
2017-09-29 12:01:41 139648083810304 [Note] InnoDB: Using SSE2 crc32 instructions
2017-09-29 12:01:41 139648083810304 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2017-09-29 12:01:41 139648083810304 [Note] InnoDB: Completed initialization of buffer pool
2017-09-29 12:01:41 139647653811968 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2017-09-29 12:01:41 139648083810304 [Note] InnoDB: Highest supported file format is Barracuda.
2017-09-29 12:01:41 139648083810304 [Note] InnoDB: 128 out of 128 rollback segments are active.
2017-09-29 12:01:41 139648083810304 [Note] InnoDB: Creating shared tablespace for temporary tables
2017-09-29 12:01:41 139648083810304 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2017-09-29 12:01:41 139648083810304 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2017-09-29 12:01:41 139648083810304 [Note] InnoDB: Waiting for purge to start
2017-09-29 12:01:41 139648083810304 [Note] InnoDB: 5.7.19 started; log sequence number 11917152
2017-09-29 12:01:41 139647413896960 [Note] InnoDB: Loading buffer pool(s) from /home/linuxfluesterer/.local/share/akonadi/db_data/ib_buffer_pool
2017-09-29 12:01:41 139647413896960 [Note] InnoDB: Buffer pool(s) load completed at 170929 12:01:41
2017-09-29 12:01:41 139648083810304 [Note] CONNECT: Version 1.06.0001 April 17, 2017
2017-09-29 12:01:41 139648083810304 [Note] Plugin 'FEEDBACK' is disabled.
2017-09-29 12:01:41 139648083810304 [Note] Reading of all Master_info entries succeded
2017-09-29 12:01:41 139648083810304 [Note] Added new Master_info '' to hash table
2017-09-29 12:01:41 139648083810304 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.2.8-MariaDB'  socket: '/tmp/akonadi-linuxfluesterer.YlBmcp/mysql.socket'  port: 0  Source distribution
2017-09-29 12:01:42 139647954032384 [Note] /usr/sbin/mysqld ([linuxfluesterer] @ localhost []): Normal shutdown

2017-09-29 12:01:42 139647531329280 [Note] InnoDB: FTS optimize thread exiting.
2017-09-29 12:01:42 139647954032384 [Note] InnoDB: Starting shutdown...
2017-09-29 12:01:42 139647413896960 [Note] InnoDB: Dumping buffer pool(s) to /home/linuxfluesterer/.local/share/akonadi/db_data/ib_buffer_pool
2017-09-29 12:01:42 139647413896960 [Note] InnoDB: Buffer pool(s) dump completed at 170929 12:01:42
2017-09-29 12:01:43 139647954032384 [Note] InnoDB: Shutdown completed; log sequence number 11917180
2017-09-29 12:01:43 139647954032384 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2017-09-29 12:01:43 139647954032384 [Note] /usr/sbin/mysqld: Shutdown complete



Test 6:  SUCCESS
--------

MySQL server default configuration found.
Details: The default configuration for the MySQL server was found and is readable at <a href="/etc/xdg/akonadi/mysql-global.conf">/etc/xdg/akonadi/mysql-global.conf</a>.

File content of '/etc/xdg/akonadi/mysql-global.conf':
#
# Global Akonadi MySQL server settings,
# These settings can be adjusted using $HOME/.config/akonadi/mysql-local.conf
#
# Based on advice by Kris Köhntopp <[email protected]>
#
[mysqld]

# strict query parsing/interpretation
# TODO: make Akonadi work with those settings enabled
# sql_mode=strict_trans_tables,strict_all_tables,strict_error_for_division_by_zero,no_auto_create_user,no_auto_value_on_zero,no_engine_substitution,no_zero_date,no_zero_in_date,only_full_group_by,pipes_as_concat
# sql_mode=strict_trans_tables

# DEBUGGING:
# log all queries, useful for debugging but generates an enormous amount of data
# log=mysql.full
# log queries slower than n seconds, log file name relative to datadir (for debugging only)
# log_slow_queries=mysql.slow
# long_query_time=1
# log queries not using indices, debug only, disable for production use
# log_queries_not_using_indexes=1
#
# mesure database size and adjust innodb_buffer_pool_size
# SELECT sum(data_length) as bla, sum(index_length) as blub FROM information_schema.tables WHERE table_schema not in ("mysql", "information_schema");

# NOTES:
# Keep Innob_log_waits and keep Innodb_buffer_pool_wait_free small (see show global status like "inno%", show global variables)

#expire_logs_days=3

#sync_bin_log=0

# Use UTF-8 encoding for tables
character_set_server=utf8
collation_server=utf8_general_ci

# use InnoDB for transactions and better crash recovery
default_storage_engine=innodb

# memory pool InnoDB uses to store data dictionary information and other internal data structures (default:8M)
# Deprecated in MySQL >= 5.6.3, removed in 5.7 (works in MariaDB)
# innodb_additional_mem_pool_size=8M

# memory buffer InnoDB uses to cache data and indexes of its tables (default:128M)
# Larger values means less I/O
innodb_buffer_pool_size=128M

# Create a .ibd file for each table (default:0)
innodb_file_per_table=1

# Write out the log buffer to the log file at each commit (default:1)
innodb_flush_log_at_trx_commit=2

# Buffer size used to write to the log files on disk (default:1M for builtin, 8M for plugin)
# larger values means less I/O
innodb_log_buffer_size=1M

# Size of each log file in a log group (default:5M) larger means less I/O but more time for recovery.
innodb_log_file_size=64M

# # error log file name, relative to datadir (default:hostname.err)
log_error=mysql.err

# print warnings and connection errors (default:1)
log_warnings=2

# Convert table named to lowercase
lower_case_table_names=1

# Maximum size of one packet or any generated/intermediate string. (default:1M)
max_allowed_packet=32M

# Maximum simultaneous connections allowed (default:100)
max_connections=256

# The two options below make no sense with prepared statements and/or transactions
# (make sense when having the same query multiple times)

# Memory allocated for caching query results (default:0 (disabled))
query_cache_size=0

# Do not cache results (default:1)
query_cache_type=0

# Do not use the privileges mechanisms
skip_grant_tables

# Do not listen for TCP/IP connections at all
skip_networking

# The number of open tables for all threads. (default:64)
table_open_cache=200

# How many threads the server should cache for reuse (default:0)
thread_cache_size=3

# wait 365d before dropping the DB connection (default:8h)
wait_timeout=31536000

# We use InnoDB, so don't let MyISAM eat up memory
key_buffer_size=16K

[client]
default-character-set=utf8


Test 7:  SKIP
--------

MySQL server custom configuration not available.
Details: The custom configuration for the MySQL server was not found but is optional.

Test 8:  SUCCESS
--------

MySQL server configuration is usable.
Details: The MySQL server configuration was found at <a href="/home/linuxfluesterer/.local/share/akonadi/mysql.conf">/home/linuxfluesterer/.local/share/akonadi/mysql.conf</a> and is readable.

File content of '/home/linuxfluesterer/.local/share/akonadi/mysql.conf':
#
# Global Akonadi MySQL server settings,
# These settings can be adjusted using $HOME/.config/akonadi/mysql-local.conf
#
# Based on advice by Kris Köhntopp <[email protected]>
#
[mysqld]

# strict query parsing/interpretation
# TODO: make Akonadi work with those settings enabled
# sql_mode=strict_trans_tables,strict_all_tables,strict_error_for_division_by_zero,no_auto_create_user,no_auto_value_on_zero,no_engine_substitution,no_zero_date,no_zero_in_date,only_full_group_by,pipes_as_concat
# sql_mode=strict_trans_tables

# DEBUGGING:
# log all queries, useful for debugging but generates an enormous amount of data
# log=mysql.full
# log queries slower than n seconds, log file name relative to datadir (for debugging only)
# log_slow_queries=mysql.slow
# long_query_time=1
# log queries not using indices, debug only, disable for production use
# log_queries_not_using_indexes=1
#
# mesure database size and adjust innodb_buffer_pool_size
# SELECT sum(data_length) as bla, sum(index_length) as blub FROM information_schema.tables WHERE table_schema not in ("mysql", "information_schema");

# NOTES:
# Keep Innob_log_waits and keep Innodb_buffer_pool_wait_free small (see show global status like "inno%", show global variables)

#expire_logs_days=3

#sync_bin_log=0

# Use UTF-8 encoding for tables
character_set_server=utf8
collation_server=utf8_general_ci

# use InnoDB for transactions and better crash recovery
default_storage_engine=innodb

# memory pool InnoDB uses to store data dictionary information and other internal data structures (default:8M)
# Deprecated in MySQL >= 5.6.3, removed in 5.7 (works in MariaDB)
# innodb_additional_mem_pool_size=8M

# memory buffer InnoDB uses to cache data and indexes of its tables (default:128M)
# Larger values means less I/O
innodb_buffer_pool_size=128M

# Create a .ibd file for each table (default:0)
innodb_file_per_table=1

# Write out the log buffer to the log file at each commit (default:1)
innodb_flush_log_at_trx_commit=2

# Buffer size used to write to the log files on disk (default:1M for builtin, 8M for plugin)
# larger values means less I/O
innodb_log_buffer_size=1M

# Size of each log file in a log group (default:5M) larger means less I/O but more time for recovery.
innodb_log_file_size=64M

# # error log file name, relative to datadir (default:hostname.err)
log_error=mysql.err

# print warnings and connection errors (default:1)
log_warnings=2

# Convert table named to lowercase
lower_case_table_names=1

# Maximum size of one packet or any generated/intermediate string. (default:1M)
max_allowed_packet=32M

# Maximum simultaneous connections allowed (default:100)
max_connections=256

# The two options below make no sense with prepared statements and/or transactions
# (make sense when having the same query multiple times)

# Memory allocated for caching query results (default:0 (disabled))
query_cache_size=0

# Do not cache results (default:1)
query_cache_type=0

# Do not use the privileges mechanisms
skip_grant_tables

# Do not listen for TCP/IP connections at all
skip_networking

# The number of open tables for all threads. (default:64)
table_open_cache=200

# How many threads the server should cache for reuse (default:0)
thread_cache_size=3

# wait 365d before dropping the DB connection (default:8h)
wait_timeout=31536000

# We use InnoDB, so don't let MyISAM eat up memory
key_buffer_size=16K

[client]
default-character-set=utf8


Test 9:  SUCCESS
--------

akonadictl found and usable
Details: The program '/usr/bin/akonadictl' to control the Akonadi server was found and could be executed successfully.
Result:
akonadictl 5.6.1


Test 10:  ERROR
--------

Akonadi control process not registered at D-Bus.
Details: The Akonadi control process is not registered at D-Bus which typically means it was not started or encountered a fatal error during startup.

Test 11:  ERROR
--------

Akonadi server process not registered at D-Bus.
Details: The Akonadi server process is not registered at D-Bus which typically means it was not started or encountered a fatal error during startup.

Test 12:  SKIP
--------

Protocol version check not possible.
Details: Without a connection to the server it is not possible to check if the protocol version meets the requirements.

Test 13:  ERROR
--------

No resource agents found.
Details: No resource agents have been found, Akonadi is not usable without at least one. This usually means that no resource agents are installed or that there is a setup problem. The following paths have been searched: '/usr/share/akonadi/agents'. The XDG_DATA_DIRS environment variable is set to '/usr/local/share:/usr/share'; make sure this includes all paths where Akonadi agents are installed.

Directory listing of '/usr/share/akonadi/agents':
akonadiindexingagent.desktop
akonotesresource.desktop
birthdaysresource.desktop
contactsresource.desktop
davgroupwareresource.desktop
facebookresource.desktop
googlecalendarresource.desktop
googlecontactsresource.desktop
icaldirresource.desktop
icalresource.desktop
imapresource.desktop
invitationsagent.desktop
kalarmdirresource.desktop
kalarmresource.desktop
knutresource.desktop
maildirresource.desktop
maildispatcheragent.desktop
mboxresource.desktop
migrationagent.desktop
mixedmaildirresource.desktop
newmailnotifieragent.desktop
notesresource.desktop
openxchangeresource.desktop
pop3resource.desktop
tomboynotesresource.desktop
vcarddirresource.desktop
vcardresource.desktop

Environment variable XDG_DATA_DIRS is set to '/usr/local/share:/usr/share'

Test 14:  SUCCESS
--------

No current Akonadi server error log found.
Details: The Akonadi server did not report any errors during its current startup.

Test 15:  ERROR
--------

Previous Akonadi server error log found.
Details: The Akonadi server reported errors during its previous startup. The log can be found in <a href="/home/linuxfluesterer/.local/share/akonadi/akonadiserver.error.old">/home/linuxfluesterer/.local/share/akonadi/akonadiserver.error.old</a>.

File content of '/home/linuxfluesterer/.local/share/akonadi/akonadiserver.error.old':
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 openDatabase 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 openUnable to open database "Plugin pvio_socket could not be loaded: not initialized QMYSQL: Unable to connect"

Test 16:  SUCCESS
--------

No current Akonadi control error log found.
Details: The Akonadi control process did not report any errors during its current startup.

Test 17:  ERROR
--------

Previous Akonadi control error log found.
Details: The Akonadi control process reported errors during its previous startup. The log can be found in <a href="/home/linuxfluesterer/.local/share/akonadi/akonadi_control.error.old">/home/linuxfluesterer/.local/share/akonadi/akonadi_control.error.old</a>.

File content of '/home/linuxfluesterer/.local/share/akonadi/akonadi_control.error.old':
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)Application 'akonadiserver' exited normally...

Creating directory: /var/lib/mysql-files did not lead to successfully running akonadi.

Before the last upgrade KOrganizer and akonadi were working properly. I could handle my google account.

Any ideas?
Thank you in advance...

Linuxfluesterer (I love KDE...)
Last edited by linuxfluesterer on Sun Oct 08, 2017 22:32, edited 1 time in total.
Take away Facebook from me and let there be real people again...

Tedel
Growing Hen
Posts: 113
Joined: Sun Mar 10, 2013 5:32
Location: Peru
Contact:

Re: Akonadi doesn't work properly, KOrganizer fails

Post by Tedel » Fri Sep 29, 2017 20:57

I confirm. I also get this result, so mysql may need a configuration fix.

Code: Select all

#systemctl start mysqld
Job for mysqld.service failed because the control process exited with error code.
See "systemctl  status mysqld.service" and "journalctl  -xe" for details.
Trying to start mysql with debug info shows this:

Code: Select all

# mysql -T
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

User time 0.00, System time 0.00
Maximum resident set size 5764, Integral resident set size 0
Non-physical pagefaults 443, Physical pagefaults 0, Swaps 0
Blocks in 0 out 0, Messages in 0 out 0, Signals 0
Voluntary context switches 0, Involuntary context switches 0

User avatar
sabayonino
Sagely Hen
Posts: 3395
Joined: Sun Sep 21, 2008 1:12
Location: Italy
Contact:

Re: Akonadi doesn't work properly, KOrganizer fails

Post by sabayonino » Sat Sep 30, 2017 11:24

by default sabayon uses mariadb as sql server

i

Code: Select all

# systemctl status mariadb
try to activate it or enable at boot

Code: Select all

# systemctl enable mariadb && systemctl start mariadb
if mariadb fails 'cause is missconfigured , try

Code: Select all

# emerge --config $(equo q installed dev-db/mariadb -q)
restart mariadb service

see https://wiki.gentoo.org/wiki/MariaDB

User avatar
linuxfluesterer
Old Dear Hen
Posts: 873
Joined: Thu Sep 20, 2012 19:47
Location: Germany

Re: Akonadi doesn't work properly, KOrganizer fails

Post by linuxfluesterer » Sat Sep 30, 2017 12:27

Hallo guys.
Thank you for quick reply.
I did, what you suggested to execute, Sabayonino. After entering the following line:

Code: Select all

systemctl enable mariadb && systemctl start mariadb
I got errors, which I checked with:

Code: Select all

journalctl -xe
The result of mariadb specific messages was:

Code: Select all

Sep 30 13:14:55 tuxedo-btrfs systemd[1]: Starting MariaDB database server...                                                    
-- Subject: Unit mariadb.service has begun start-up                                                                             
-- Defined-By: systemd                                                                                                          
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel                                                        
--                                                                                                                              
-- Unit mariadb.service has begun starting up.                                                                                  
Sep 30 13:14:55 tuxedo-btrfs mysqld[4295]: 2017-09-30 13:14:55 140606377375744 [Note] /usr/sbin/mysqld (mysqld 10.2.8-MariaDB-lo
Sep 30 13:14:55 tuxedo-btrfs systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Sep 30 13:14:55 tuxedo-btrfs systemd[1]: Failed to start MariaDB database server.
-- Subject: Unit mariadb.service has failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit mariadb.service has failed.
-- 
-- The result is failed.
Sep 30 13:14:55 tuxedo-btrfs systemd[1]: mariadb.service: Unit entered failed state.
Sep 30 13:14:55 tuxedo-btrfs systemd[1]: mariadb.service: Failed with result 'exit-code'.
I assume, the reason is not because of 'misconfigured'. Am I right?

Thank you for joining.

Linuxfluesterer (I love KDE...)
Take away Facebook from me and let there be real people again...

Tedel
Growing Hen
Posts: 113
Joined: Sun Mar 10, 2013 5:32
Location: Peru
Contact:

Re: Akonadi doesn't work properly, KOrganizer fails

Post by Tedel » Sat Sep 30, 2017 14:56

mm… It didn't help much…

emerge --config $(equo q installed dev-db/mariadb -q) gives an error message. There is already a database in /var/lib/mysql. I went there and erased that folder. Now the command worked, but then…

Code: Select all

systemctl restart mariadb
Job for mariadb.service failed because the control process exited with error code.
See "systemctl  status mariadb.service" and "journalctl  -xe" for details.
While…

Code: Select all

$ kontact
(…)
org.kde.pim.akonadicore: "QLocalSocket::connectToServer: Connection refused" "/tmp/akonadi-tedel.SIYGk6/akonadiserver-cmd.socket"
(…)
…gives many errors.

I found this on Gentoo… https://forums.gentoo.org/viewtopic-t-1067376.html

…and there is a block in Portage too…

Code: Select all

# emerge akonadi
Calculating dependencies... done!
[ebuild     U  ] kde-apps/akonadi-17.08.1-r1 [17.08.1] USE="-tools*" 
[blocks B      ] >=dev-db/mariadb-10.2 (">=dev-db/mariadb-10.2" is blocking kde-apps/akonadi-17.08.1-r1)
I can't check my e-mail :'(

joost
Sagely Hen
Posts: 2752
Joined: Fri Nov 17, 2006 12:11
Location: The Netherlands
Contact:

Re: Akonadi doesn't work properly, KOrganizer fails

Post by joost » Sun Oct 08, 2017 18:05

My blog | Mastodon | Please support Sabayon: Become a Patron

User avatar
linuxfluesterer
Old Dear Hen
Posts: 873
Joined: Thu Sep 20, 2012 19:47
Location: Germany

Re: Akonadi doesn't work properly, KOrganizer fails

Post by linuxfluesterer » Sun Oct 08, 2017 22:32

Hallo Joost.
Thank you for telling us the good good news. I just upgraded the last packages as of today and the KOrganizer/Akonadi problem seems to be solved.

-Linuxfluesterer (I love KDE...)
Take away Facebook from me and let there be real people again...

Post Reply