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

I'm unable to start Akonadi server

Tags: None
(comma "," separated)
User avatar
Snowhog
Registered Member
Posts
198
Karma
1
OS
Thank you for the clarification. Yes to both questions.

I deleted the ~/.local/share/akonadi/db_data directory again yesterday. After rebooting I had akonadi errors and I had no contacts anymore - clicking on Contacts showed nothing.

I right-clicked in the Address Books pane and clicked on Add Address Book and chose just Personal Contacts. Previously, I had also had a KDE Address Book (Traditional). Currently, when configuring akonadi, I have just the following items:

Personal Contacts /home/paul/.local/share/contacts/
std.ics /home/paul/.local/share/
Local Folders /home/paul/.local/share/local-mail

This mornings cold boot: When desktop was presented, I launched Konqueror and then launched Kontact. Kontact started Mail and KOrganizer. The Akonadi Server Self-Test was not launched. When clicking on Contacts in Kontact, I was presented with my Personal Contacts in the Address Books pane - no akonadi error reported. All appears to be normal.

But, I'm still getting this error in the mysql.err log file:
paul@myotherbrain:~/.local/share/akonadi/db_data$ cat mysql.err
100301 12:06:14 [Note] Plugin 'FEDERATED' is disabled.
100301 12:06:15 InnoDB: Started; log sequence number 0 215798
100301 12:06:15 [Warning] Can't open and lock time zone table: Table 'mysql.time_zone_leap_second' doesn't exist trying to live without them
100301 12:06:15 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
100301 12:06:15 [ERROR] Cannot open mysql.db
100301 12:06:15 [ERROR] Cannot open mysql.user
100301 12:06:15 [ERROR] Cannot open mysql.event
100301 12:06:15 [ERROR] Event Scheduler: An error occurred when initializing system tables.
100301 12:06:15 [Note] /usr/sbin/mysqld-akonadi: ready for connections.
Version: '5.1.37-1ubuntu5-log' socket: '/home/paul/.local/share/akonadi/db_misc/mysql.socket' port: 0 (Ubuntu)
paul@myotherbrain:~/.local/share/akonadi/db_data$


Administrator
Kubuntu Forums . Net - https://kubuntuforums.net
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Odd, however given that Akonadi is apparently functioning, it can probably be ignored.

To fix it you need to install the needed database and tables to Akonadi's db.

Code: Select all
mysql_install_db --datadir ~/.local/share/akonadi/db_data/


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
Snowhog
Registered Member
Posts
198
Karma
1
OS
mysql_install_db --datadir ~/.local/share/akonadi/db_data/ failed - said I didn't a mysql server installed. So I installed mysql-server-5.1 and then reran mysql_install_db --datadir ~/.local/share/akonadi/db_data/ and got:

03-02-2010

paul@myotherbrain:~$ mysql_install_db --datadir ~/.local/share/akonadi/db_data/
Installing MySQL system tables...
100302 22:26:55 [Warning] Can't create test file /home/paul/.local/share/akonadi/db_data/myotherbrain.lower-test
100302 22:26:55 [Warning] Can't create test file /home/paul/.local/share/akonadi/db_data/myotherbrain.lower-test
ERROR: 1049 Unknown database 'mysql'
100302 22:26:55 [ERROR] Aborting

100302 22:26:55 [Warning] Forcing shutdown of 2 plugins
100302 22:26:55 [Note] /usr/sbin/mysqld: Shutdown complete


Installation of system tables failed! Examine the logs in
/var/lib/mysql 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 /var/lib/mysql 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!


Rebooted and the result is the same. Now what?


Administrator
Kubuntu Forums . Net - https://kubuntuforums.net
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Did you have MySQL stopped when you ran that command ( ie. was Akonadi stopped )

Akonadi can be stopped by running:
akonadictl stop

Make sure all your PIM applications are closed first though.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
Snowhog
Registered Member
Posts
198
Karma
1
OS
Yes. Quit Kontact. Stopped Akonadi. Verified by running akonadictl stop. Ran mysql_install_db --datadir ~/.local/share/akonadi/db_data/ and got the same:

paul@myotherbrain:~$ mysql_install_db --datadir ~/.local/share/akonadi/db_data/
Installing MySQL system tables...
100303 21:08:36 [Warning] Can't create test file /home/paul/.local/share/akonadi/db_data/myotherbrain.lower-test
100303 21:08:36 [Warning] Can't create test file /home/paul/.local/share/akonadi/db_data/myotherbrain.lower-test
ERROR: 1049 Unknown database 'mysql'
100303 21:08:36 [ERROR] Aborting

100303 21:08:36 [Warning] Forcing shutdown of 2 plugins
100303 21:08:36 [Note] /usr/sbin/mysqld: Shutdown complete


Installation of system tables failed! Examine the logs in
/var/lib/mysql 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 /var/lib/mysql 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!


Why am I getting the error? Why aren't the db's being created?


Administrator
Kubuntu Forums . Net - https://kubuntuforums.net
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Can you please try the following?
It does the following:

Nukes the Akonadi MySQL databases and configuration.
Starts Akonadi so it can preinitialise the settings.
Shuts Akonadi down, waits for 30 seconds, then kills the server process to ensure it has access.
Performs the Db installation so that mysql is happy, then starts Akonadi again.

Code: Select all
rm -rf ~/.local/share/akonadi/
akonadictl start
sleep 30s
akonadictl stop
sleep 15s
killall -9 mysqld
mysql_install_db --datadir=$HOME/.local/share/akonadi/db_data/
akonadictl start


On my system ( with mysql 5.1.36 ) the mysql_install_db command worked fine.

Code: Select all
ben@grace:~/.local/share/akonadi> mysql_install_db --datadir=/home/ben/.local/share/akonadi/db_data/
Installing MySQL system tables...
100304 21:17:51 [Warning] Forcing shutdown of 2 plugins
OK
Filling help tables...
100304 21:17:52 [Warning] Forcing shutdown of 2 plugins
OK


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
Snowhog
Registered Member
Posts
198
Karma
1
OS
Don't think it goes well.

paul@myotherbrain:~$ rm -rf /home/paul/.local/share/akonadi/
paul@myotherbrain:~$ akonadictl start
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
Starting Akonadi Server...
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
done.
paul@myotherbrain:~$ [akonadiserver] search paths: ("/opt/scripts", "/usr/local/sbin", "/usr/local/bin", "/usr/sbin", "/usr/bin", "/sbin", "/bin", "/usr/games", "/usr/sbin", "/usr/local/sbin", "/usr/local/libexec", "/usr/libexec", "/opt/mysql/libexec", "/opt/local/lib/mysql5/bin")
[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/paul/.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, isVirtual BOOL DEFAULT false);"
[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 NULL REFERENCES CollectionTable(id) ON DELETE CASCADE ON UPDATE CASCADE, resourceId BIGINT NOT NULL REFERENCES ResourceTable(id) ON DELETE CASCADE ON UPDATE CASCADE, 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 CollectionTable(id) ON DELETE CASCADE ON UPDATE CASCADE, mimeTypeId BIGINT REFERENCES MimeTypeTable(id) ON DELETE CASCADE ON UPDATE CASCADE, 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) ON DELETE CASCADE ON UPDATE CASCADE, 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 NOT NULL REFERENCES CollectionTable(id) ON DELETE CASCADE ON UPDATE CASCADE, 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 PimItemTable(id) , Flag_id INTEGER REFERENCES FlagTable(id) , PRIMARY KEY (PimItem_id, Flag_id));"
[akonadiserver] checking relation "CollectionMimeTypeRelation"
[akonadiserver] "CREATE TABLE CollectionMimeTypeRelation (Collection_id INTEGER REFERENCES CollectionTable(id) , MimeType_id INTEGER REFERENCES MimeTypeTable(id) , PRIMARY KEY (Collection_id, MimeType_id));"
[akonadiserver] checking relation "CollectionPimItemRelation"
[akonadiserver] "CREATE TABLE CollectionPimItemRelation (Collection_id INTEGER REFERENCES CollectionTable(id) , PimItem_id INTEGER REFERENCES PimItemTable(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] skipping update 13
[akonadiserver] skipping update 14
[akonadiserver] Database "akonadi" opened using driver "QMYSQL"
[akonadiserver] Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
[akonadiserver] Database "akonadi" opened using driver "QMYSQL"
[akonadiserver] DataStore::unhideAllPimItems()
PLUGINS: "/usr/share/akonadi/agents"
PLUGINS: ("birthdaysresource.desktop", "contactsresource.desktop", "icalresource.desktop", "imapresource.desktop", "kabcresource.desktop", "kcalresource.desktop", "knutresource.desktop", "kolabproxyresource.desktop", "localbookmarksresource.desktop", "maildirresource.desktop", "maildispatcheragent.desktop", "mboxresource.desktop", "microblog.desktop", "mtdummyresource.desktop", "nepomukcalendarfeeder.desktop", "nepomukcontactfeeder.desktop", "nepomuktagresource.desktop", "nntpresource.desktop", "notesresource.desktop", "pop3resource.desktop", "vcarddirresource.desktop", "vcardresource.desktop")
search paths: ("/opt/scripts", "/usr/local/sbin", "/usr/local/bin", "/usr/sbin", "/usr/bin", "/sbin", "/bin", "/usr/games")
PLUGINS inserting: "akonadi_birthdays_resource" 0 ("Resource")
PLUGINS inserting: "akonadi_contacts_resource" 4 ("Resource")
PLUGINS inserting: "akonadi_ical_resource" 1 ("Resource")
PLUGINS inserting: "akonadi_imap_resource" 0 ("Resource")
PLUGINS inserting: "akonadi_kabc_resource" 2 ("Resource")
PLUGINS inserting: "akonadi_kcal_resource" 0 ("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" 4 ("Resource")
PLUGINS inserting: "akonadi_maildispatcher_agent" 0 ("Unique", "Autostart", "NoConfig")
PLUGINS inserting: "akonadi_mbox_resource" 0 ("Resource")
PLUGINS inserting: "akonadi_microblog_resource" 0 ("Resource")
PLUGINS inserting: "akonadi_mailtransport_dummy_resource" 0 ("Resource", "MailTransport")
PLUGINS inserting: "akonadi_nepomuk_calendar_feeder" 0 ("Unique", "NoConfig")
PLUGINS inserting: "akonadi_nepomuk_contact_feeder" 0 ("Unique", "Autostart", "NoConfig")
PLUGINS inserting: "akonadi_nepomuktag_resource" 0 ("Resource", "Virtual", "Unique", "NoConfig")
PLUGINS inserting: "akonadi_nntp_resource" 0 ("Resource")
PLUGINS inserting: "akonadi_notes_resource" 0 ("Resource")
PLUGINS inserting: "akonadi_pop3_resource" 0 ("Resource")
PLUGINS inserting: "akonadi_vcarddir_resource" 0 ("Resource")
PLUGINS inserting: "akonadi_vcard_resource" 2 ("Resource")
PLUGINS: "/usr/share/akonadi/agents"
PLUGINS: ("birthdaysresource.desktop", "contactsresource.desktop", "icalresource.desktop", "imapresource.desktop", "kabcresource.desktop", "kcalresource.desktop", "knutresource.desktop", "kolabproxyresource.desktop", "localbookmarksresource.desktop", "maildirresource.desktop", "maildispatcheragent.desktop", "mboxresource.desktop", "microblog.desktop", "mtdummyresource.desktop", "nepomukcalendarfeeder.desktop", "nepomukcontactfeeder.desktop", "nepomuktagresource.desktop", "nntpresource.desktop", "notesresource.desktop", "pop3resource.desktop", "vcarddirresource.desktop", "vcardresource.desktop")
[akonadiserver] Database "akonadi" opened using driver "QMYSQL"
[/usr/bin/akonadi_ical_resource] Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
[/usr/bin/akonadi_ical_resource] akonadi_ical_resource_0(19515)/kdepimlibs (kcal) KCal::ICalFormat::load: "/home/paul/.local/share/"
[/usr/bin/akonadi_ical_resource] akonadi_ical_resource_0(19515)/kdepimlibs (kcal) KCal::ICalFormat::load: load error
[/usr/bin/akonadi_ical_resource] KDirWatch: "/home/paul/.local/share" is a directory. Use addDir!
[akonadiserver] Database "akonadi" opened using driver "QMYSQL"
[akonadiserver] Database "akonadi" opened using driver "QMYSQL"
[/usr/bin/akonadi_nepomuk_contact_feeder] Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
[/usr/bin/akonadi_nepomuk_contact_feeder] akonadi_nepomuk_contact_feeder(19518)/nepomuk (library) <unnamed>::GlobalModelContainer::init: Connecting to local socket "/home/paul/.kde/share/apps/nepomuk/socket"
[akonadiserver] Database "akonadi" opened using driver "QMYSQL"
[akonadiserver] Database "akonadi" opened using driver "QMYSQL"
[/usr/bin/akonadi_maildispatcher_agent] akonadi_maildispatcher_agent(19517)/libakonadi Akonadi::DefaultResourceJob::slotResult: "Unknown resource"
[/usr/bin/akonadi_maildispatcher_agent] akonadi_maildispatcher_agent(19517)/libakonadi Akonadi::ResourceScanJob::Private::fetchResult: "Unknown resource"
[/usr/bin/akonadi_maildispatcher_agent] akonadi_maildispatcher_agent(19517)/libakonadi Akonadi::SpecialCollectionsRequestJobPrivate::resourceScanResult: Failed to request resource "akonadi_maildir_resource_3" : "Unknown error. (Unknown resource)"
[/usr/bin/akonadi_maildispatcher_agent] akonadi_maildispatcher_agent(19517) OutboxQueue::Private::localFoldersRequestResult: Failed to get outbox folder.
^C
paul@myotherbrain:~$ akonadictl stop
paul@myotherbrain:~$ Application '/usr/bin/akonadi_contacts_resource' exited normally...
Application '/usr/bin/akonadi_nepomuk_contact_feeder' exited normally...
Application '/usr/bin/akonadi_maildispatcher_agent' exited normally...
[/usr/bin/akonadi_ical_resource] akonadi_ical_resource_0(19515)/kio (KDirWatch) KDirWatchPrivate::removeEntry: doesn't know "/home/paul/.local"
[/usr/bin/akonadi_ical_resource] akonadi_ical_resource_0(19515)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
Application '/usr/bin/akonadi_ical_resource' exited normally...
[/usr/bin/akonadi_maildir_resource] akonadi_maildir_resource_3(19516)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
Application '/usr/bin/akonadi_maildir_resource' exited normally...
[akonadiserver] Lost connection to resource "org.freedesktop.Akonadi.Resource.akonadi_contacts_resource_3" , discarding cached interface
[akonadiserver] Lost connection to resource "org.freedesktop.Akonadi.Resource.akonadi_maildir_resource_3" , discarding cached interface
[akonadiserver] Lost connection to resource "org.freedesktop.Akonadi.Resource.akonadi_ical_resource_0" , discarding cached interface
[akonadiserver] terminating service threads
[akonadiserver] Nepomuk QueryServer: Query could not be removed!
[akonadiserver] terminating connection threads
[akonadiserver] stopping db process
Application 'akonadiserver' exited normally...
^C
paul@myotherbrain:~$ killall -9 mysqld
mysqld(1285): Operation not permitted
mysqld: no process found
paul@myotherbrain:~$ sudo killall -9 mysqld
[sudo] password for paul:
paul@myotherbrain:~$ mysql_install_db --datadir=$HOME/.local/share/akonadi/db_data/
Installing MySQL system tables...
100304 19:37:00 [Warning] Can't create test file /home/paul/.local/share/akonadi/db_data/myotherbrain.lower-test
100304 19:37:00 [Warning] Can't create test file /home/paul/.local/share/akonadi/db_data/myotherbrain.lower-test
ERROR: 1005 Can't create table 'db' (errno: 13)
100304 19:37:00 [ERROR] Aborting

100304 19:37:00 [Warning] Forcing shutdown of 2 plugins
100304 19:37:00 [Note] /usr/sbin/mysqld: Shutdown complete


Installation of system tables failed! Examine the logs in
/home/paul/.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/paul/.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!


Administrator
Kubuntu Forums . Net - https://kubuntuforums.net
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
It appears you already have a locally running MySQL instance. In this case, you can create a user and a database for Akonadi to use there ( this is what I have done ) which causes the least problems with regards to getting the SQL server running.

No idea why it failed to create the mysql.db table though...


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
Snowhog
Registered Member
Posts
198
Karma
1
OS
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 /usr/share/akonadi/agents'. The XDG_DATA_DIRS environment variable is set to '/usr/share:/usr/share:/usr/local/share', make sure this includes all paths where Akonadi agents are installed to.


From http://userbase.kde.org/Akonadi#Environment_Setup
Environment Setup
The Akonadi server searches for Akonadi agents and resources in the paths defined in the XDG_DATA_DIRS environment variable. If Akonadi complains about not finding agents or resources, check if this variable is set correctly. Also keep in mind that even if set in a current console session, it might not have been set when starting the server. Starting the server manually in the current console session excludes this cause.


This 'error' in the Akonadi Server Self-Test continues to appear, and I have to close Kontact and restart it before I have access to Contacts.

I do of course, have resource agents installed. But it appears that the XDG_DATA_DIRS environment variable does not include the path to them. These resources are located at:

/usr/share/akonadi/agents

How do I modify the XDG_DATA_DIRS environment variable so that it includes this path after a reboot?


Administrator
Kubuntu Forums . Net - https://kubuntuforums.net
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Add the following script to ~/.kde4/env/set-akonadi-env.sh

Code: Select all
export XDG_DATA_DIRS=/usr/share:$XDG_DATA_DIRS


And mark it as executable.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
Snowhog
Registered Member
Posts
198
Karma
1
OS
bcooksley wrote:Add the following script to ~/.kde4/env/set-akonadi-env.sh

Code: Select all
export XDG_DATA_DIRS=/usr/share:$XDG_DATA_DIRS


And mark it as executable.


I'll beg ignorance here, but that doesn't appear to do anything more than recreate (with duplication) what XDG_DATA_DIRS already contains when akonadi starts, and that is reported by the self-test to be 'the problem' - that the actual path containing the resource agents - /usr/share/akonadi/agents - isn't contained in XDG_DATA_DIRS. Or am I missing/misunderstanding something?

Also, I have no ~/.kde4/env directory -- I'm running Kubuntu 9.10, KDE 4.4.1. I do have a ~/.kde/env directory, but I don't have the file set-aonadi-env.sh anywhere on my system.


Administrator
Kubuntu Forums . Net - https://kubuntuforums.net
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
On my system, $XDG_DATA_DIRS is set as follows
Code: Select all
ben@grace:~/Download> echo $XDG_DATA_DIRS
/opt/trunk-kde/extras/share:/opt/trunk-kde/kde/share:


The akonadi-env-set.sh script is supposed to be created in the location specified. Precisely it should be created in $(kde4-config --localprefix)/env/. A logout is required to activate its effects.

A check to see if Akonadi was functional on my system from a completely clean start ( remove ~/.local/share/akonadi, ~/.config/akonadi, replacing only ~/.config/akonadi/akonadiserverrc so it connects to an external instance ) works fine...


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
charlieapples
Registered Member
Posts
4
Karma
0
It's driving me crazy too.
I've just installed KDE 4.4 on a clean Arch install, to try it out (I'm used to the very minimalist awesome but thought, what the hell, get a new computer, try something pretty) and it looks !amazing!, but I cannot for the life of me figure out what is bugging Akonadi.
I have trawled the forums, tried deleting the configs, reinstalling, modifying and just plain shouting at it but it own't budge.
Nothing that has worked for other people works.
All I ever get is this:
Test 15: ERROR
--------

Current Akonadi server error log found.
Details: The Akonadi server did report error during startup into <a href='/home/harry/.local/share/akonadi/akonadiserver.error'>/home/harry/.local/share/akonadi/akonadiserver.error</a>.

File content of '/home/harry/.local/share/akonadi/akonadiserver.error':
Failed to create database
Query error: "Access denied for user ''@'localhost' to database 'akonadi' QMYSQL: Unable to execute query"
Database error: " "
"[
0: akonadiserver(_Z11akBacktracev+0x35) [0x80522a5]
1: akonadiserver() [0x805276e]
2: [0xb78c7400]
3: [0xb78c7424]
4: /lib/libc.so.6(gsignal+0x51) [0xb71a2571]
5: /lib/libc.so.6(abort+0x182) [0xb71a3d72]
6: /usr/lib/libQtCore.so.4(_Z17qt_message_output9QtMsgTypePKc+0x84) [0xb751fec4]
7: akonadiserver(_ZN15FileDebugStream9writeDataEPKcx+0xc4) [0x80536d4]
8: /usr/lib/libQtCore.so.4(_ZN9QIODevice5writeEPKcx+0x8e) [0xb75b637e]
9: /usr/lib/libQtCore.so.4(+0x1023a5) [0xb75cb3a5]
10: /usr/lib/libQtCore.so.4(_ZN11QTextStreamD1Ev+0x3d) [0xb75cc8cd]
11: akonadiserver(_ZN6QDebugD1Ev+0x43) [0x804d453]
12: /usr/lib/libakonadiprivate.so.1(_ZN7Akonadi13AkonadiServer25startMysqlDatabaseProcessEv+0x3586) [0xb7789bb6]
13: /usr/lib/libakonadiprivate.so.1(_ZN7Akonadi13AkonadiServer20startDatabaseProcessEv+0x263) [0xb778aab3]
14: /usr/lib/libakonadiprivate.so.1(_ZN7Akonadi13AkonadiServerC1EP7QObject+0x7d) [0xb778accd]
15: /usr/lib/libakonadiprivate.so.1(_ZN7Akonadi13AkonadiServer8instanceEv+0x58) [0xb778c178]
16: akonadiserver(main+0x2cf) [0x804c9bf]
17: /lib/libc.so.6(__libc_start_main+0xe6) [0xb718eb86]
18: akonadiserver() [0x804c621]
]
"


Test 16: ERROR
--------

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

File content of '/home/harry/.local/share/akonadi/akonadiserver.error.old':
Failed to create database
Query error: "Access denied for user ''@'localhost' to database 'akonadi' QMYSQL: Unable to execute query"
Database error: " "
"[
0: akonadiserver(_Z11akBacktracev+0x35) [0x80522a5]
1: akonadiserver() [0x805276e]
2: [0xb7776400]
3: [0xb7776424]
4: /lib/libc.so.6(gsignal+0x51) [0xb7051571]
5: /lib/libc.so.6(abort+0x182) [0xb7052d72]
6: /usr/lib/libQtCore.so.4(_Z17qt_message_output9QtMsgTypePKc+0x84) [0xb73ceec4]
7: akonadiserver(_ZN15FileDebugStream9writeDataEPKcx+0xc4) [0x80536d4]
8: /usr/lib/libQtCore.so.4(_ZN9QIODevice5writeEPKcx+0x8e) [0xb746537e]
9: /usr/lib/libQtCore.so.4(+0x1023a5) [0xb747a3a5]
10: /usr/lib/libQtCore.so.4(_ZN11QTextStreamD1Ev+0x3d) [0xb747b8cd]
11: akonadiserver(_ZN6QDebugD1Ev+0x43) [0x804d453]
12: /usr/lib/libakonadiprivate.so.1(_ZN7Akonadi13AkonadiServer25startMysqlDatabaseProcessEv+0x3586) [0xb7638bb6]
13: /usr/lib/libakonadiprivate.so.1(_ZN7Akonadi13AkonadiServer20startDatabaseProcessEv+0x263) [0xb7639ab3]
14: /usr/lib/libakonadiprivate.so.1(_ZN7Akonadi13AkonadiServerC1EP7QObject+0x7d) [0xb7639ccd]
15: /usr/lib/libakonadiprivate.so.1(_ZN7Akonadi13AkonadiServer8instanceEv+0x58) [0xb763b178]
16: akonadiserver(main+0x2cf) [0x804c9bf]
17: /lib/libc.so.6(__libc_start_main+0xe6) [0xb703db86]
18: akonadiserver() [0x804c621]
]
"


It looks like the errors described above, but the "access denied for user""@localhost" is new.
And the worst aprt of it all is that everythign else is rock solid and utterly beautiful. It's like getting to heaven and finding everything perfect except for a pervasive smell of old socks.
I would be *very* grateful for any help.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Try opening Akonadi Tray ( run "akonaditray" ) then select "Configure" from the tray icon's right click menu.

If you are using the external mysql server, then please check the settings. If you are using the internal server I do not know why this error is occurring.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
charlieapples
Registered Member
Posts
4
Karma
0
Thank you bcooksley,

Tried that. No luck. :( It's maddening, and though I like to tweak and tinker, the challenge of learning enough about mysql (very well documented at least) and Akonadi (not so good) just to get a mail programme running is a bit daunting.

Anyway, if anyone has an idea that is not refreshing the configuration files in ~/.local and ~/.config, rebuilding the database, reinstalling dbus, akonadi or everything, or ensuring that the internal server is in use, I'd be very interested to hear about it.


Bookmarks



Who is online

Registered users: Bing [Bot], blue_bullet, Google [Bot], Sogou [Bot]