Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: [EN] [fixed] kmail terminates after a fatal error  (Read 3504 times)

Offline 10toe

  • User
  • Posts: 159
[EN] [fixed] kmail terminates after a fatal error
« on: 2016/09/27, 11:05:26 »
Hi siductioners,


my kmail does not start any more. Instead I get this message:
 
Quote
The Email program encountered a fatal error and will terminate now.
The error was:
Failed to fetch the resource collection.
 
Code: [Select]
~$ apt-cache policy kmail kmail:
  Installiert:           4:16.04.3-1
  Installationskandidat: 4:16.04.3-1
  Versionstabelle:
 *** 4:16.04.3-1 500
        500 http://httpredir.debian.org/debian unstable/main amd64 Packages
        100 /var/lib/dpkg/status
[size=78%]Anybody with the same problem? Does anybody have a tip for me?
Thanks a lot!
Cheers
Hans
[/size]
« Last Edit: 2016/10/08, 16:37:07 by bluelupo »

Offline devil

  • Administrator
  • User
  • *****
  • Posts: 4.844
Re: kmail terminates after a fatal error
« Reply #1 on: 2016/09/27, 11:07:15 »
What does akonadictl say?
Seems to be a known bug: http://osdir.com/ml/kdepim-bugs/2016-09/msg00472.html
« Last Edit: 2016/09/27, 12:36:36 by devil »

Offline 10toe

  • User
  • Posts: 159
Re: kmail terminates after a fatal error
« Reply #2 on: 2016/09/27, 11:28:17 »
Code: [Select]
~$ akonadictl status
Akonadi Control: running
Akonadi Server: running
akonadiprivate_log: search paths:  ("lib/x86_64-linux-gnu", "lib/x86_64-linux-gnu/qt5/p
lugins/", "lib/x86_64-linux-gnu/kf5/", "lib/x86_64-linux-gnu/kf5/plugins/", "/usr/lib/q
t5/plugins/", "/usr/lib/x86_64-linux-gnu/qt5/plugins", "/usr/bin")
Akonadi Server Search Support: available (Remote Search)
Available Agent Types: akonadi_akonotes_resource, akonadi_archivemail_agent, akonadi_ba
loo_indexer, akonadi_birthdays_resource, akonadi_contacts_resource, akonadi_davgroupwar
e_resource, akonadi_followupreminder_agent, akonadi_googlecalendar_resource, akonadi_go
oglecontacts_resource, akonadi_ical_resource, akonadi_icaldir_resource, akonadi_imap_re
source, akonadi_invitations_agent, akonadi_kalarm_dir_resource, akonadi_kalarm_resource
, akonadi_kolab_resource, akonadi_maildir_resource, akonadi_maildispatcher_agent, akona
di_mailfilter_agent, akonadi_mbox_resource, akonadi_migration_agent, akonadi_mixedmaild
ir_resource, akonadi_newmailnotifier_agent, akonadi_notes_agent, akonadi_notes_resource
, akonadi_openxchange_resource, akonadi_pop3_resource, akonadi_sendlater_agent, akonadi
_vcard_resource, akonadi_vcarddir_resource

Offline bluelupo

  • User
  • Posts: 2.068
    • BluelupoMe
Re: kmail terminates after a fatal error
« Reply #3 on: 2016/09/27, 16:34:07 »
Hi 10toe,
change the SQL-Backend. Sqlite is the causative agent of some problems in the kdepim package.

from the bugreport ;-)
Code: [Select]
I switched to MariaDB from SQLITE3 and it seemed to eliminate most of the problems after rebuilding.
« Last Edit: 2016/09/27, 18:36:57 by bluelupo »

Offline 10toe

  • User
  • Posts: 159
Re: kmail terminates after a fatal error
« Reply #4 on: 2016/09/27, 19:02:42 »
Great, thank you!


Ok... how is that to be done... bluelupo, do you have a link for me how to change the sql-backend?

Offline bluelupo

  • User
  • Posts: 2.068
    • BluelupoMe
Re: kmail terminates after a fatal error
« Reply #5 on: 2016/09/27, 20:35:17 »
Hi 10toe,

My preferred solution is to rebuild the entire .kde directory of the user.

Simple it would be if one were to delete the configuration directory (the KDE user) uses the Akonadi. Unfortunately, I do not know the straight.

It is probably best to start again be a new user profile ($HOME/.kde).

Here are steps (do a backup before these steps):

1. install akonadi-backend-mysql
2. Purge akonadi-backend-sqlite
3. Log out of the KDE desktop
4. Rename the directory $HOME/.kde in $HOME/.kde.OLD
5. Renewed Login using the KDE desktop


https://techbase.kde.org/KDE_PIM/Akonadi

Offline 10toe

  • User
  • Posts: 159
Re: kmail terminates after a fatal error
« Reply #6 on: 2016/09/27, 20:51:06 »
Alright, thanks a lot, bluelupo! I will try... and report! ;-)

Offline 10toe

  • User
  • Posts: 159
Re: kmail terminates after a fatal error
« Reply #7 on: 2016/10/05, 17:58:35 »
Ok, now here's the report... and I need further help, I'm afraid.


The akonadi-backend-mysql is now installed and the sqlite backend purged. I renamed the old .kde folder, and I only rescued the app folder of "basket" because there are all of my personal notes saved. Reboot.


Now at the startup of kmail I get the error message:
Quote
The Akonadi personal information management service is not operational.


Akonadi says:
Code: [Select]
~$ akonadictl status
Akonadi Control: stopped
Akonadi Server: stopped
akonadiprivate_log: search paths:  ("lib/x86_64-linux-gnu", "lib/x86_64-linux-gnu/qt5/plugins/", "lib/x86_64-linux-gnu/kf5/", "lib/x86_64-linux-gnu/kf5
/plugins/", "/usr/lib/qt5/plugins/", "/usr/lib/x86_64-linux-gnu/qt5/plugins", "/usr/bin")
Akonadi Server Search Support: available (Remote Search)
Available Agent Types: akonadi_akonotes_resource, akonadi_archivemail_agent, akonadi_baloo_indexer, akonadi_birthdays_resource, akonadi_contacts_resour
ce, akonadi_davgroupware_resource, akonadi_followupreminder_agent, akonadi_googlecalendar_resource, akonadi_googlecontacts_resource, akonadi_ical_resou
rce, akonadi_icaldir_resource, akonadi_imap_resource, akonadi_invitations_agent, akonadi_kalarm_dir_resource, akonadi_kalarm_resource, akonadi_kolab_re
source, akonadi_maildir_resource, akonadi_maildispatcher_agent, akonadi_mailfilter_agent, akonadi_mbox_resource, akonadi_migration_agent, akonadi_mixed
maildir_resource, akonadi_newmailnotifier_agent, akonadi_notes_agent, akonadi_notes_resource, akonadi_openxchange_resource, akonadi_pop3_resource, akon
adi_sendlater_agent, akonadi_vcard_resource, akonadi_vcarddir_resource


I try to start Akonadi but I get:
Code: [Select]
~$ akonadictl start
Starting Akonadi Server...
   done.
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
hans@thinkboxX201:~$ QSqlDatabase: QSQLITE3 driver not loaded
QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3
Invalid database object during initial database connection
terminating service threads
terminating connection threads
stopping db process
Failed to remove Unix socket
Failed to remove runtime connection config file
Application 'akonadiserver' exited normally...


Ok... digikam does not start any more either, with the same issue of the missing database:
 
Quote
Details: Could not start database initializer.
Executable: mysql_install_db

[/size]Can you help me starting the mysql backend? Thanks a lot in advance!!![size=78%]
[/size]Cheers[size=78%]
[/size]Hans[size=78%]

Offline bluelupo

  • User
  • Posts: 2.068
    • BluelupoMe
Re: kmail terminates after a fatal error
« Reply #8 on: 2016/10/05, 18:23:58 »
Hi 10toe,

Have you installed all the packages?

Code: [Select]
dpkg -l|egrep -i '(sql|akonadi)'
ii  akonadi-backend-mysql                         4:16.04.3-2                          all          MySQL storage backend for Akonadi
ii  akonadi-server                                4:16.04.3-2                          amd64        Akonadi PIM storage service
ii  akonadiconsole                                4:16.04.3-1                          amd64        management and debugging console for akonadi
ii  kdepim-runtime                                4:16.04.2-2                          amd64        runtime components for Akonadi KDE
ii  libkf5akonadiagentbase5:amd64                 4:16.04.3-2                          amd64        Akonadi agent base library
ii  libkf5akonadicalendar5:amd64                  16.04.2-2                            amd64        library providing calendar helpers for Akonadi items
ii  libkf5akonadicontact5:amd64                   4:16.04.2-2                          amd64        Akonadi contacts access library
ii  libkf5akonadicore-bin                         4:16.04.3-2                          amd64        Tools for Akonadi core library
ii  libkf5akonadicore5:amd64                      4:16.04.3-2                          amd64        Akonadi core library
ii  libkf5akonadimime5:amd64                      4:16.04.2-2                          amd64        Akonadi MIME handling library
ii  libkf5akonadinotes5:amd64                     4:16.04.2-2                          amd64        Akonadi notes access library
ii  libkf5akonadiprivate5                         4:16.04.3-2                          amd64        libraries for the Akonadi PIM storage service
ii  libkf5akonadisearchdebug5:amd64               16.04.2-2+b1                         amd64        Akonadi search debug library
ii  libkf5akonadisearchpim5:amd64                 16.04.2-2+b1                         amd64        Akonadi search library
ii  libkf5akonadiwidgets5:amd64                   4:16.04.3-2                          amd64        Akonadi widgets library
ii  libmysqlclient18:amd64                        5.6.30-1                             amd64        MySQL database client library
ii  libqt4-sql:amd64                              4:4.8.7+dfsg-9                       amd64        Qt 4 SQL module
ii  libqt5sql5:amd64                              5.6.1+dfsg-3+b1                      amd64        Qt 5 SQL module
ii  libqt5sql5-mysql:amd64                        5.6.1+dfsg-3+b1                      amd64        Qt 5 MySQL database driver
ii  libqt5sql5-sqlite:amd64                       5.6.1+dfsg-3+b1                      amd64        Qt 5 SQLite 3 database driver
ii  libsqlite3-0:amd64                            3.14.2-1                             amd64        SQLite 3 shared library
ii  mysql-client-core-5.6                         5.6.30-1                             amd64        MySQL database core client binaries
ii  mysql-common                                  5.8+1.0.0                            all          MySQL database common files, e.g. /etc/mysql/my.cnf
ii  mysql-server-core-5.6                         5.6.30-1                             amd64        MySQL database server binaries

What's in the directory?
Code: [Select]
$ ls -ld /home/<$USER>/.local/share/akonadi/*

Is there a configuration file /home/<$USER>/.local/share/akonadi/mysql.conf?

Code: [Select]
#
# Global Akonadi MySQL server settings,
# These settings can be adjusted using $HOME/.config/akonadi/mysql-local.conf
#
# Based on advice by Kris Köhntopp <kris@mysql.com>
#
[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=80M

# 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


Thus, a similar process should run if mySQL backend is used.
Code: [Select]
# ps -ef|grep -i sql
michael   1912  1907  0 18:11 ?        00:00:01 /usr/sbin/mysqld --defaults-file=/home/michael/.local/share/akonadi/mysql.conf --datadir=/home/michael/.local/share/akonadi/db_data/ --socket=/tmp/akonadi-michael.TTvGS7/mysql.socket
« Last Edit: 2016/10/05, 18:30:20 by bluelupo »

Offline 10toe

  • User
  • Posts: 159
Re: kmail terminates after a fatal error
« Reply #9 on: 2016/10/05, 21:17:33 »
Hey bluelupo!


Quote
Have you installed all the packages?
Yes.


Quote
[size=0px]What's in the directory?[/size][/size][size=0px]
Code: [/size]$ ls -ld /home/<$USER>/.local/share/akonadi/*
[/size][size=0px]

It's empty, although ls without -ld isn't:
Code: [Select]
.local/share/akonadi# ls
akonadi.db           akonadiserver.error.old  db_misc       socket-siduction
akonadiserver.error  db_data                  file_db_data  socket-thinkboxX201
Quote
Is there a configuration file /home/<$USER>/.local/share/akonadi/mysql.conf?

No, it isn't.
 



Offline bluelupo

  • User
  • Posts: 2.068
    • BluelupoMe
Re: kmail terminates after a fatal error
« Reply #10 on: 2016/10/05, 22:13:23 »
Hi 10toe,

you have to create the file /home/<$USER>/.local/share/akonadi/mysql.conf and then again try to start kmail. Before that, please backup the directory /home/<$USER>/.local/share/akonadi.

Code: [Select]
$ cp -par /home/<$USER>/.local/share/akonadi /home/<$USER>/.local/share/akonadi.ORIG

Please replace the identifier <$USER> with your real username.

Offline 10toe

  • User
  • Posts: 159
Re: kmail terminates after a fatal error
« Reply #11 on: 2016/10/06, 22:51:52 »
Hmmm... bad news: Creating the mysql.conf does not work either.. Akonadi still resists to start:


Code: [Select]
$ akonadictl start
Starting Akonadi Server...
   done.
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
hans@thinkboxX201:~$ QSqlDatabase: QSQLITE3 driver not loaded
QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3
Invalid database object during initial database connection
terminating service threads
terminating connection threads
stopping db process
Failed to remove Unix socket                                                                                                                                                       
Failed to remove runtime connection config file                                                                                                                                   
Application 'akonadiserver' exited normally... 

Offline bluelupo

  • User
  • Posts: 2.068
    • BluelupoMe
Re: kmail terminates after a fatal error
« Reply #12 on: 2016/10/07, 14:50:45 »
Hi 10toe,

can you come into siduction IRC there you can solve the problem better and there are more people present who can solve the problem.

Offline 10toe

  • User
  • Posts: 159
SOLVED - Re: kmail terminates after a fatal error
« Reply #13 on: 2016/10/08, 14:27:32 »
 

Hey bluelupo,


thanks, the problem is solved: Akonadi with the mysql backend is running!


Thanks to agaida at the irc! Here are the steps:


1. Edit /etc/xdg/akonadi/akonadiserverrc and delete anything with *sqlite*
2. Delete any akonadi* files from /home/USER/.config/
3. Install akonadi-backend-mysql and purge akonadi-backend-sqlite
4. Restart the session


Alright, kmail starts again - but there's just another problem right away... emails won't be received nor sended any more. But that'll be another thread.  Also digikam does not start as user due of lack of permission to mysql_install_db. Still some way to go!


Thanks so long! :-)
Hans


PS: Strange... I'm not able to edit my first post in order to set the topic als SOLVED... Can a moderator do that, please? Thx! :-)

Offline bluelupo

  • User
  • Posts: 2.068
    • BluelupoMe
Re: [fixed] kmail terminates after a fatal error
« Reply #14 on: 2016/10/08, 16:38:13 »
I have edit with "[fixed]"