This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Kontact - Impossible to save error

Tags: colvern colvern colvern
(comma "," separated)
Ederico
Registered Member
Posts
19
Karma
0
OS

Kontact - Impossible to save error

Wed Dec 09, 2009 1:27 pm
Dear all,

I'm getting a very frustrating error when using Kontact. Basically, when I am trying to save an event or a thing to do I get an error simply stating that it is impossible to save (my Kontact is in Italian, otherwise I would provide a screenshot).

I have 3.55GB free space on my HDD, so I doubt that it is a HDD space problem.

This happened all of a sudden, perhaps it could be a result of a recent update (I update regularly, as soon as I get a notification).

I hope someone can help because frankly I need Kontact to sort my appointments and projects (just when I started to get used to using it, I get this problem!)

Thanks beforehand,
Ederico.
User avatar
JanGerrit
Moderator
Posts
647
Karma
3
OS
Maybe try to run this in Konsole (open Konsole and execute this command):
sudo chown -R <user>:users $(kde4-config --localprefix)
Replace <user> with your user's name
This command will need some time to be executed (it sets the rights of the files in your settings directory to the right ones). If it is finished (there'll appear some text at the beginning of the line probably beginning with a >) execute exit. Then try to add your event.
If this doesn't work maybe check if Akonadi is setup correctly:
Click at the Akonadi-entry in the "Advanced" tab of systemsettings and look if everything seems okay.

I hope it helps, Jan


Image
Ederico
Registered Member
Posts
19
Karma
0
OS
The command didn't work.

I'm not well versed with Akonadi. I tried stopping it and running it again and got this report:


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.
The following drivers are installed: QSQLITE, QMYSQL3, QMYSQL.
Make sure the required driver is installed.

File content of '/home/ederico/.config/akonadi/akonadiserverrc':
[%General]
Driver=QMYSQL
SizeThreshold=4096
ExternalPayload=false

[QMYSQL]
Name=akonadi
User=
Password=
Options="UNIX_SOCKET=/home/ederico/.local/share/akonadi/db_misc/mysql.socket"
ServerPath=/usr/sbin/mysqld-akonadi
StartServer=true

[Debug]
Tracer=null


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

MySQL server found.
Details: You currently have configured Akonadi to use the MySQL server '/usr/sbin/mysqld-akonadi'.
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 locations varies depending on the distribution.

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

MySQL server is executable.
Details: MySQL server found: /usr/sbin/mysqld-akonadi  Ver 5.1.37-1ubuntu5 for debian-linux-gnu on i486 ((Ubuntu))


Test 4:  ERROR
--------

MySQL server log contains errors.
Details: The MySQL server error log file &apos;<a href='/home/ederico/.local/share/akonadi/db_data/mysql.err'>/home/ederico/.local/share/akonadi/db_data/mysql.err</a>&apos; contains errors.

File content of '/home/ederico/.local/share/akonadi/db_data/mysql.err':
091211 10:53:29 [Note] Plugin 'FEDERATED' is disabled.
091211 10:53:29  InnoDB: Started; log sequence number 0 381850
091211 10:53:29 [Warning] Can't open and lock time zone table: Table 'mysql.time_zone_leap_second' doesn't exist trying to live without them
091211 10:53:29 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
091211 10:53:29 [ERROR] Cannot open mysql.db
091211 10:53:29 [ERROR] Cannot open mysql.user
091211 10:53:29 [ERROR] Cannot open mysql.event
091211 10:53:29 [ERROR] Event Scheduler: An error occurred when initializing system tables.
091211 10:53:29 [Note] /usr/sbin/mysqld-akonadi: ready for connections.
Version: '5.1.37-1ubuntu5-log'  socket: '/home/ederico/.local/share/akonadi/db_misc/mysql.socket'  port: 0  (Ubuntu)
091211 10:53:38 [Warning] Aborted connection 5 to db: 'akonadi' user: 'ederico' host: '' (Got an error reading communication packets)
091211 10:54:20 [Note] /usr/sbin/mysqld-akonadi: Normal shutdown

091211 10:54:20  InnoDB: Starting shutdown...
091211 10:54:23  InnoDB: Shutdown completed; log sequence number 0 381860
091211 10:54:23 [Warning] Forcing shutdown of 1 plugins
091211 10:54:23 [Note] /usr/sbin/mysqld-akonadi: Shutdown complete



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

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

File content of '/etc/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 <kris@mysql.com>
#
[mysqld]
skip_grant_tables
skip_networking

# 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

# use InnoDB for transactions and better crash recovery
default_storage_engine=innodb
# case-insensitive table names, avoids trouble on windows
lower_case_table_names=1
character_set_server=latin1
collation_server=latin1_general_ci
table_cache=200
thread_cache_size=3
log_bin=mysql-bin
expire_logs_days=3
#sync_bin_log=0
# error log file name, relative to datadir
log_error=mysql.err
log_warnings=2
# 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
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
# maximum blob size
max_allowed_packet=32M
max_connections=256
# makes sense when having the same query multiple times
# makes no sense with prepared statements and/or transactions
query_cache_type=0
query_cache_size=0

innodb_file_per_table=1
innodb_log_buffer_size=1M
innodb_additional_mem_pool_size=1M
# messure database size and adjust
# SELECT sum(data_length) as bla, sum(index_length) as blub FROM information_schema.tables WHERE table_schema not in ("mysql", "information_schema");
innodb_buffer_pool_size=80M
# size of average write burst, keep Innob_log_waits small, keep Innodb_buffer_pool_wait_free small (see show global status like "inno%", show global variables)
innodb_log_file_size=64M
innodb_flush_log_at_trx_commit=2



Test 6:  SKIP
--------

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

Test 7:  SUCCESS
--------

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

File content of '/home/ederico/.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 <kris@mysql.com>
#
[mysqld]
skip_grant_tables
skip_networking

# 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

# use InnoDB for transactions and better crash recovery
default_storage_engine=innodb
# case-insensitive table names, avoids trouble on windows
lower_case_table_names=1
character_set_server=latin1
collation_server=latin1_general_ci
table_cache=200
thread_cache_size=3
log_bin=mysql-bin
expire_logs_days=3
#sync_bin_log=0
# error log file name, relative to datadir
log_error=mysql.err
log_warnings=2
# 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
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
# maximum blob size
max_allowed_packet=32M
max_connections=256
# makes sense when having the same query multiple times
# makes no sense with prepared statements and/or transactions
query_cache_type=0
query_cache_size=0

innodb_file_per_table=1
innodb_log_buffer_size=1M
innodb_additional_mem_pool_size=1M
# messure database size and adjust
# SELECT sum(data_length) as bla, sum(index_length) as blub FROM information_schema.tables WHERE table_schema not in ("mysql", "information_schema");
innodb_buffer_pool_size=80M
# size of average write burst, keep Innob_log_waits small, keep Innodb_buffer_pool_wait_free small (see show global status like "inno%", show global variables)
innodb_log_file_size=64M
innodb_flush_log_at_trx_commit=2



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

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


Test 9:  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 10:  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 11:  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 12:  SUCCESS
--------

Resource agents found.
Details: At least one resource agent has been found.

Directory listing of '/usr/share/akonadi/agents':
birthdaysresource.desktop
distlistresource.desktop
icalresource.desktop
imapresource.desktop
kabcresource.desktop
kcalresource.desktop
knutresource.desktop
kolabproxyresource.desktop
localbookmarksresource.desktop
maildirresource.desktop
microblog.desktop
nepomukcontactfeeder.desktop
nepomukemailfeeder.desktop
nepomuktagresource.desktop
nntpresource.desktop
notesresource.desktop
strigifeeder.desktop
vcarddirresource.desktop
vcardresource.desktop
Directory listing of '/usr/share/akonadi/agents':
birthdaysresource.desktop
distlistresource.desktop
icalresource.desktop
imapresource.desktop
kabcresource.desktop
kcalresource.desktop
knutresource.desktop
kolabproxyresource.desktop
localbookmarksresource.desktop
maildirresource.desktop
microblog.desktop
nepomukcontactfeeder.desktop
nepomukemailfeeder.desktop
nepomuktagresource.desktop
nntpresource.desktop
notesresource.desktop
strigifeeder.desktop
vcarddirresource.desktop
vcardresource.desktop

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

Test 13:  SUCCESS
--------

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

Test 14:  ERROR
--------

Previous Akonadi server error log found.
Details: The Akonadi server did report error during its previous startup into <a href='/home/ederico/.local/share/akonadi/akonadiserver.error.old'>/home/ederico/.local/share/akonadi/akonadiserver.error.old</a>.

File content of '/home/ederico/.local/share/akonadi/akonadiserver.error.old':
Control process died, committing suicide!


Test 15:  SUCCESS
--------

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

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

No previous Akonadi control error log found.
Details: The Akonadi control process did not report any errors during its previous startup.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Try the fix mentioned here: viewtopic.php?f=20&t=84117&p=139076#p139076


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Ederico
Registered Member
Posts
19
Karma
0
OS
I tried the command provided that, and I got the following:


Code: Select all
Installing MySQL system tables...
091212 13:26:38 [Warning] Can't create test file /home/ederico/.local/share/akonadi/db_data/ederico-laptop.lower-test
091212 13:26:38 [Warning] Can't create test file /home/ederico/.local/share/akonadi/db_data/ederico-laptop.lower-test
ERROR: 1005  Can't create table 'db' (errno: 13)
091212 13:26:38 [ERROR] Aborting

091212 13:26:38 [Warning] Forcing shutdown of 2 plugins
091212 13:26:38 [Note] /usr/sbin/mysqld: Shutdown complete


Installation of system tables failed!  Examine the logs in
/home/ederico/.local/share/akonadi/db_data/ for more information.

You can try to start the mysqld daemon with:

    shell> /usr/sbin/mysqld --skip-grant &

and use the command line tool /usr/bin/mysql
to connect to the mysql database and look at the grant tables:

    shell> /usr/bin/mysql -u root mysql
    mysql> show tables

Try 'mysqld --help' if you have problems with paths.  Using --log
gives you a log in /home/ederico/.local/share/akonadi/db_data/ that may be helpful.

The latest information about MySQL is available on the web at
http://www.mysql.com/.  Please consult the MySQL manual section
'Problems running mysql_install_db', and the manual section that
describes problems on your OS.  Another information source are the
MySQL email archives available at http://lists.mysql.com/.

Please check all of the above before mailing us!  And remember, if
you do mail us, you MUST use the /usr/scripts/mysqlbug script!
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Can you please verify that you have permissions to write on those directories?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Ederico
Registered Member
Posts
19
Karma
0
OS
How do I do that?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Code: Select all
sudo chown -R $(id -un):$(id -gn) $HOME/share/akonadi


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Ederico
Registered Member
Posts
19
Karma
0
OS
bcooksley wrote:
Code: Select all
sudo chown -R $(id -un):$(id -gn) $HOME/share/akonadi


As a terminal response I get that it is impossible to access the directoy, no file or directory.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Oops. Part of the url is missing.

Code: Select all
sudo chown -R $(id -un):$(id -gn) $HOME/.local/share/akonadi


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Ederico
Registered Member
Posts
19
Karma
0
OS
Ok, now I got nothing in the terminal, no error message nor anything else. I guess the command must have worked? If yes, what should I do next? Thanks for everything.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
The previous command ( the mysql_install_db command ) should work now. Make sure to run the following beforehand:

Code: Select all
akonadictl stop && sleep 20s && killall -9 mysqld


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Ederico
Registered Member
Posts
19
Karma
0
OS
Code: Select all
mysql_install_db --datadir=$HOME/.local/share/akonadi/db_data/
Installing MySQL system tables...
091217 21:53:10 [Warning] Can't create test file /home/ederico/.local/share/akonadi/db_data/ederico-laptop.lower-test
091217 21:53:10 [Warning] Can't create test file /home/ederico/.local/share/akonadi/db_data/ederico-laptop.lower-test
ERROR: 1005  Can't create table 'db' (errno: 13)
091217 21:53:10 [ERROR] Aborting

091217 21:53:10 [Warning] Forcing shutdown of 2 plugins
091217 21:53:10 [Note] /usr/sbin/mysqld: Shutdown complete


Installation of system tables failed!  Examine the logs in
/home/ederico/.local/share/akonadi/db_data/ for more information.

You can try to start the mysqld daemon with:

    shell> /usr/sbin/mysqld --skip-grant &

and use the command line tool /usr/bin/mysql
to connect to the mysql database and look at the grant tables:

    shell> /usr/bin/mysql -u root mysql
    mysql> show tables

Try 'mysqld --help' if you have problems with paths.  Using --log
gives you a log in /home/ederico/.local/share/akonadi/db_data/ that may be helpful.

The latest information about MySQL is available on the web at
http://www.mysql.com/.  Please consult the MySQL manual section
'Problems running mysql_install_db', and the manual section that
describes problems on your OS.  Another information source are the
MySQL email archives available at http://lists.mysql.com/.

Please check all of the above before mailing us!  And remember, if
you do mail us, you MUST use the /usr/scripts/mysqlbug script!
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
The weird-ness continues. Lets try going back to scratch....
This will stop Akonadi, Kill any remaining traces, remove the databases, recreate the Akonadi directory, then start it up, shut it down again, then finally install the system tables.

Code: Select all
akonadictl stop && sleep 10s && killall -9 akonadicontrol && killall -9 mysqld && killall -9 akonadiserver && sleep 10s && rm -rf $HOME/.local/share/akonadi/ && mkdir -p $HOME/.local/share/akonadi/ && akonadictl start && sleep 30s && akonadictl stop && mysql_install_db --datadir=$HOME/.local/share/akonadi/db_data/


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Ederico
Registered Member
Posts
19
Karma
0
OS
Just a question before doing that, will I lose any data? I don't know what this Akonadi does at all, so that is why I am asking.


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], Google [Bot], lockheed, Yahoo [Bot]