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)
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Akonadi acts as merely a cache for your data, so you shouldn't lose anything.

As an extra precaution you can make a backup of its files simply by copying the ~/.local/share/akonadi folder to another location.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Ederico
Registered Member
Posts
19
Karma
0
OS
Ok.

I posted that command in a terminal, and I got the following

Code: Select all
akonadicontrol: no process found
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
That is normal, although it probably stopped the script prematurely, preventing it from completing. Try the following variant instead.

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
sleep 20s
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
Ran the following:

Code: Select all
ederico@ederico-laptop:~$ 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 && sleep 20s && mysql_install_db --datadir=$HOME/.local/share/akonadi/db_data/
- Based on the last code you gave me, I guess they had to be given as one single command line text, right?

And got the same result as above.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
They need to be seperated, executed one after the other when you are returned to the console. The "&&" means execute the next command only if the previous command succeeded ( returns 0 ). In this case, the sending of the signal SIGKILL ( -9 ) to all processes with the name "akonadiconsole" failed, since no process had that name.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Ederico
Registered Member
Posts
19
Karma
0
OS
Ok, I started again. Once I executed the following:

Code: Select all
killall -9 akonadicontrol


I got the following:

Code: Select all
akonadicontrol: no process found
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
That is fine, just continue executing the commands afterward. It is fine to ignore that type of message ( it is actually good you see them, as the commands are there purely to ensure Akonadi has actually stopped after it was requested.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Ederico
Registered Member
Posts
19
Karma
0
OS
OK I executed the command



Code: Select all
ederico@ederico-laptop:~$ akonadictl start                                                                 
Starting Akonadi Server...                                                                                 
   done.


Now I'm getting this and the command line seems stuck, as in the last process seems to be going on and I cannot enter other commands.

Code: Select all
ederico@ederico-laptop:~$ [akonadiserver] Failed to use database "akonadi"                                 
[akonadiserver] Query error: "Unknown database 'akonadi' QMYSQL: Unable to execute query"                   
[akonadiserver] Database error: "Can't connect to local MySQL server through socket '/home/ederico/.local/share/akonadi/db_misc/mysql.socket' (2) QMYSQL: Unable to connect"                                                                                     
[akonadiserver] Trying to create database now...                                                                                 
[akonadiserver] Database "akonadi" opened using driver "QMYSQL"                                                                 
[akonadiserver] DbInitializer::run()                                                                                             
[akonadiserver] checking table  "SchemaVersionTable"                                                                             
[akonadiserver] "CREATE TABLE SchemaVersionTable (version INTEGER NOT NULL);"                                                   
[akonadiserver] checking table  "ResourceTable"                                                                                 
[akonadiserver] "CREATE TABLE ResourceTable (id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT, name VARCHAR(255) BINARY NOT NULL UNIQUE);"                                                                                                                           
[akonadiserver] checking table  "CollectionTable"                                                                               
[akonadiserver] "CREATE TABLE CollectionTable (id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT, remoteId TEXT , name VARCHAR(255) BINARY character set utf8 collate utf8_bin NOT NULL, parentId BIGINT DEFAULT 0 REFERENCES Collection(id), resourceId BIGINT NOT NULL REFERENCES Resource(id), subscribed BOOL NOT NULL DEFAULT true, cachePolicyInherit BOOL NOT NULL DEFAULT true, cachePolicyCheckInterval INTEGER NOT NULL DEFAULT -1, cachePolicyCacheTimeout INTEGER NOT NULL DEFAULT -1, cachePolicySyncOnDemand BOOL NOT NULL DEFAULT false, cachePolicyLocalParts TEXT );"                                                                                   
[akonadiserver] adding index "CREATE UNIQUE INDEX CollectionTable_parentAndNameIndex ON CollectionTable (parentId,name);"       
[akonadiserver] checking table  "MimeTypeTable"                                                                                 
[akonadiserver] "CREATE TABLE MimeTypeTable (id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT, name VARCHAR(255) NOT NULL UNIQUE);"
[akonadiserver] checking table  "PimItemTable"                                                                                   
[akonadiserver] "CREATE TABLE PimItemTable (id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT, rev INTEGER NOT NULL DEFAULT 0, remoteId TEXT , collectionId BIGINT REFERENCES Collection(id), mimeTypeId BIGINT REFERENCES MimeType(id), datetime TIMESTAMP DEFAULT CURRENT_TIMESTAMP, atime TIMESTAMP , dirty BOOL , size BIGINT NOT NULL DEFAULT 0);"                                               
[akonadiserver] adding index "CREATE INDEX PimItemTable_collectionIndex ON PimItemTable (collectionId);"                         
[akonadiserver] checking table  "FlagTable"                                                                                     
[akonadiserver] "CREATE TABLE FlagTable (id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT, name VARCHAR(255) NOT NULL UNIQUE);"     
[akonadiserver] checking table  "PartTable"                                                                                     
[akonadiserver] "CREATE TABLE PartTable (id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT, pimItemId BIGINT NOT NULL REFERENCES PimItemTable(id), name VARCHAR(255) NOT NULL, data LONGBLOB , datasize BIGINT NOT NULL, version INTEGER DEFAULT 0, external BOOL , FOREIGN KEY (pimItemId) REFERENCES PimItemTable(id) ON DELETE CASCADE ON UPDATE CASCADE);"                                         
[akonadiserver] adding index "CREATE UNIQUE INDEX PartTable_pimItemIdNameIndex ON PartTable (pimItemId,name);"                   
[akonadiserver] checking table  "CollectionAttributeTable"                                                                       
[akonadiserver] "CREATE TABLE CollectionAttributeTable (id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT, collectionId BIGINT REFERENCES Collection(id), type LONGBLOB NOT NULL, value LONGBLOB );"                                                                 
[akonadiserver] adding index "CREATE INDEX CollectionAttributeTable_collectionIndex ON CollectionAttributeTable (collectionId);"
[akonadiserver] checking relation  "PimItemFlagRelation"                                                                         
[akonadiserver] "CREATE TABLE PimItemFlagRelation (PimItem_id INTEGER REFERENCES PimItem(id), Flag_id INTEGER REFERENCES Flag(id), PRIMARY KEY (PimItem_id, Flag_id));"                                                                                           
[akonadiserver] checking relation  "CollectionMimeTypeRelation"                                                                 
[akonadiserver] "CREATE TABLE CollectionMimeTypeRelation (Collection_id INTEGER REFERENCES Collection(id), MimeType_id INTEGER REFERENCES MimeType(id), PRIMARY KEY (Collection_id, MimeType_id));"                                                               
[akonadiserver] checking relation  "CollectionPimItemRelation"                                                                   
[akonadiserver] "CREATE TABLE CollectionPimItemRelation (Collection_id INTEGER REFERENCES Collection(id), PimItem_id INTEGER REFERENCES PimItem(id), PRIMARY KEY (Collection_id, PimItem_id));"                                                                   
[akonadiserver] DbInitializer::run() done                                                                                       
[akonadiserver] skipping update 2                                                                                               
[akonadiserver] skipping update 3                                                                                               
[akonadiserver] skipping update 4                                                                                               
[akonadiserver] skipping update 8                                                                                               
[akonadiserver] skipping update 10                                                                                               
[akonadiserver] skipping update 12                                                                                               
[akonadiserver] Nepomuk QueryServer interface not available!                                                                     
PLUGINS:  "/usr/share/akonadi/agents"                                                                                           
PLUGINS:  ("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")
PLUGINS inserting:  "akonadi_birthdays_resource" 0 ("Resource")
PLUGINS inserting:  "akonadi_distlist_resource" 0 ("Resource")
PLUGINS inserting:  "akonadi_ical_resource" 2 ("Resource")
PLUGINS inserting:  "akonadi_imap_resource" 0 ("Resource")
PLUGINS inserting:  "akonadi_kabc_resource" 0 ("Resource")
PLUGINS inserting:  "akonadi_kcal_resource" 1 ("Resource")
PLUGINS inserting:  "akonadi_knut_resource" 0 ("Resource")
PLUGINS inserting:  "akonadi_kolabproxy_resource" 0 ("Resource", "Unique", "NoConfig")
PLUGINS inserting:  "akonadi_localbookmarks_resource" 0 ("Resource")
PLUGINS inserting:  "akonadi_maildir_resource" 0 ("Resource")
PLUGINS inserting:  "akonadi_microblog_resource" 0 ("Resource")
PLUGINS inserting:  "akonadi_nepomuk_contact_feeder" 0 ("Unique", "NoConfig")
PLUGINS inserting:  "akonadi_nepomuk_email_feeder" 0 ("Unique", "NoConfig")
PLUGINS inserting:  "akonadi_nepomuktag_resource" 0 ("Resource")
PLUGINS inserting:  "akonadi_nntp_resource" 0 ("Resource")
PLUGINS inserting:  "akonadi_notes_resource" 0 ("Resource")
QFileSystemWatcher: failed to add paths: /usr/bin/akonadi_ical_resource
PLUGINS inserting:  "akonadi_strigi_feeder" 0 ("Unique")
PLUGINS inserting:  "akonadi_vcarddir_resource" 0 ("Resource")
PLUGINS inserting:  "akonadi_vcard_resource" 4 ("Resource")
PLUGINS:  "/usr/share/akonadi/agents"
PLUGINS:  ("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")
[akonadiserver] Database "akonadi" opened using driver "QMYSQL"
[akonadiserver] Database "akonadi" opened using driver "QMYSQL"
[akonadiserver] Database "akonadi" opened using driver "QMYSQL"
[akonadiserver] Database "akonadi" opened using driver "QMYSQL"
[akonadiserver] Database "akonadi" opened using driver "QMYSQL"
[akonadiserver] Database "akonadi" opened using driver "QMYSQL"
[akonadiserver] Database "akonadi" opened using driver "QMYSQL"
Ederico
Registered Member
Posts
19
Karma
0
OS
Oh wait, I pressed enter and I can enter commands again.
Ederico
Registered Member
Posts
19
Karma
0
OS
Ok I tried the last command and I got the following:

Code: Select all
Installing MySQL system tables...                                                       
091221 12:28:27 [Warning] Can't create test file /home/ederico/.local/share/akonadi/db_data/ederico-laptop.lower-test
091221 12:28:27 [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)                                                                     
091221 12:28:27 [ERROR] Aborting                                                                                     

091221 12:28:27 [Warning] Forcing shutdown of 2 plugins
091221 12:28:27 [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 error being encountered is "file not writable". Since the permissions are correct, please check for and shutdown SELinux or Apparmor if present.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Ederico
Registered Member
Posts
19
Karma
0
OS
I don't seem to be finding anything similar to those in htop. Is there another simpler way to check whether such processes are running? I might be missing them since htop displays commands (I doubt this though).
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
They run as part of the kernel. Try running /etc/init.d/apparmor status


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Ederico
Registered Member
Posts
19
Karma
0
OS
Ok I got this:

Code: Select all
/usr/sbin/tcpdump (enforce)
/usr/sbin/mysqld-akonadi (enforce)
/usr/sbin/mysqld (enforce)
/usr/sbin/cupsd (enforce)
/usr/lib/cups/backend/cups-pdf (enforce)
/usr/lib/connman/scripts/dhclient-script (enforce)
/usr/lib/NetworkManager/nm-dhcp-client.action (enforce)
/sbin/dhclient3 (enforce)
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
As root run /etc/init.d/apparmor stop then try running the mysql_install_db command ( as your normal user )


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

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