Archive:Http://userbase.kde.org/Akonadi 4.4/Troubleshooting/uk: Difference between revisions

From KDE UserBase Wiki
(Created page with 'У системі перевірки адрес Nepomuk виявлено вади, які спричиняють величезні затримки. Вади виправлен...')
(Created page with 'Закрийте вікно Kontact або вікна KMail і KAddressbook, якщо було запущено окремі програми. Вимкніть Strigi у «Сис...')
Line 95: Line 95:
У системі перевірки адрес Nepomuk виявлено вади, які спричиняють величезні затримки. Вади виправлено у KDE 4.4.1. Якщо ви не оновили систему до версії 4.4.1, можете скористатися тимчасовим вирішенням:
У системі перевірки адрес Nepomuk виявлено вади, які спричиняють величезні затримки. Вади виправлено у KDE 4.4.1. Якщо ви не оновили систему до версії 4.4.1, можете скористатися тимчасовим вирішенням:


Close Kontact or KMail and KAddressbook if you are running
Закрийте вікно Kontact або вікна KMail і KAddressbook, якщо було запущено окремі програми. Вимкніть Strigi у «Системних параметрах». Завершіть роботу Nepomuk, вилучіть базу даних і перезапустіть ''nepomukserver''. Для цього слід виконати команди (від імені звичайного користувача):
stand-alone apps. Disable Strigi in SystemSettings. Stop Nepomuk, delete the
database and restart ''nepomukserver''. The actual commands you need are (as
user)


{|style="width:98%; border:2px dotted #BCBCBC; background:#EEEEEE;"
{|style="width:98%; border:2px dotted #BCBCBC; background:#EEEEEE;"

Revision as of 14:25, 8 June 2010

Template:I18n/Language Navigation Bar


Вступ

Цю сторінку в основному присвячено усуванню проблем, пов’язаних з Akonadi, оскільки на початкових кроках переходу до нової системи завжди виникають труднощі. Більшість користувачів вперше зіткнуться з роботою Akonadi у KDE 4.4, багато з них залишаться незадоволені роботою системи. Короткий опис призначення Akonadi можна знайти у цьому записі глосарія. Крім того, у тексті статті ви знайдете інші корисні посилання. Після подолання прикрих проблем з Akonadi ця система стане справжнім рушієм роботи багатьох програм.

Про структуру даних системи

Звичайно ж, ви можете скористатися Kontact для керування всіма вашими адресними книгами, але якщо ви користуєтеся, наприклад, системою резервного копіювання даних, вам варто знати, де зберігаються ваші дані, та як програма їх обробляє. У цьому вам допоможе сторінка Akonadi_and_AddressBook.

Підказки з усування проблем

  • Якщо ви повідомляєте про помилки, пов’язані з сервером Akonadi, завжди додавайте до повідомлень звіти з автоматично самотестування системи. Дані цього звіту можна отримати за допомогою діалогового вікна автоматичного тестування, яке сервер Akonadi відкриває у разі невдалої спроби запуску. Крім того, доступ до діалогового вікна автоматичного тестування можна отримати за допомогою модуля Центру керування, доступ до якого можна отримати за допомогою команди 'kcmshell4 kcm_akonadi'.
  • Запуск сервера Akonadi вручну за допомогою командного рядка може надати вам додаткову корисну інформацію. Здійснити подібний запуск можна за допомогою команди akonadictl start, відданої з консолі. Зупинити роботу сервера Akonadi можна за допомогою команди akonadictl stop. Команда akonadictl status виведе додаткову корисну інформацію.

Типові проблеми

Не запускається Kontact — при цьому програма не повідомляє ні про які помилки

Якщо Kontact не запускається і не повідомляє ні про які помилки, перевірте, чи запущено Akonadi. За запитом Akonadi має бути запущено, але у поточній версії (січень 2010 року) цього не відбувається. Вам доведеться запустити сервер до запуску Kontact, якщо ресурси вашої системи було перетворено (найімовірніше, ресурси KAddressBook). Для запуску сервера скористайтеся піктограмою системного лотка AkonadiTray.

Kontact не запускається, інша причина

Оновлення роблять Kontact непрацездатним. Якщо таке сталося з вашою копією програми, спробуйте запустити KMail, KOrganizer або будь-яку іншу складову за допомогою KRunner (або Konsole). Ймовірно, ці програми залишаться працездатними, і ви зможете перечекати до наступного оновлення, яке може виправити ситуацію. Все це, в основному стосується, версії 4.4.0.

Не знайдено теки: «/Local»

Про таку помилку повідомляють багато користувачів, яким не вдалося запустити Kontact. Ймовірно, під час перетворення даних сталася помилка, і KMail шукає локальні дані пошти у /home/користувач/.local/share/Local, каталозі, який не було заповнено даними. Щоб позбутися проблеми не намагайтеся виправити її вручну. Закрийте вікна KMail/Kontact, відкрийте консоль Akonadi (за допомогою команди 'akonadiconsole' у інструменті запуску команд (Alt-F2) або у konsole) і вилучіть ресурс, який призначено для локальних поштових даних. Після цього Kontact або KMail мають запускатися у звичайному режимі, має бути створено новий ресурс, що вказує на каталог /home/користувач/.local/share/local-mail

У ~/.local/share/ з’являються якісь нові теки

Так і має бути. Якщо вашу адресну книгу перетворено належним чином, буде створено новий ресурс у ~/.local/share/contacts/.

Для чого призначено програми /usr/bin/akonadi_maildir_resource і /usr/bin/akonadi_maildispatcher_agent?

The akonadi_maildir_resource is created automatically by the akonadi_maildispatcher_agent, while the latter is always started together with the Akonadi server as it provides basic functionality (e.g. sending mail) that is used by all mail applications that are (and will be) based on Akonadi. So it is ok that these two are running, as a user you can simply ignore them. This autogenerated akonadi_maildir_resource will always point to ~/.local/share/local-mail/ which is your 'Local folders' account where your local folders and emails will be stored.

У поточній версії, KDE 4.4, поштові дані ще не перетворюються.

Допоміжні програми індексування Nepomuk вимкнено

Kontact працює, але ви бачите вікно з таким повідомленням:

Найпоширенішою причиною є те, що Nepomuk вимкнено у «Системних параметрах». Будь ласка, спробуйте увімкнути систему на вкладці «Додатково»->«Стільничний пошук»->«Основні параметри». Позначте пункт «Увімкнути семантичну стільницю Nepomuk» і натисніть кнопку «Застосувати».

Якщо вмикання не допомагає (систему вже увімкнено), і ви користувалися тестовими випусками KDE 4.4, ймовірно причиною є зміна компонування бази даних (через оновлення сервера бази даних Virtuoso з версії 5 до версії 6). Змусити програми знову працювати можна такими командами:

qdbus org.kde.NepomukServer /nepomukserver org.kde.NepomukServer.quit
rm -r .kde/share/apps/nepomuk
rm -r ~/.kde4/share/apps/nepomuk
nepomukserver

Зауважте, що наведені команди не призведуть до запуску системи після кожного перезавантаження. Для запуску системи вам варто скористатися «Системними параметрами».

Для роботи Akonadi потрібен Nepomuk, а без Akonadi не працюватиме Kontact. Але для роботи зовсім не потрібен індексатор Strigi. Strigi використовується лише для пошуку файлів, його роботу не пов’язано з Kontact. Для належної роботи Kontact достатньо запуску Nepomuk.

У Kontact Nepomuk виконує різні функції від показу даних щодо днів народжень до обробки списку зайнятого часу і показу фотографій контактів. Якщо Nepomuk не буде запущено, деякими з функціональних можливостей Kontact не можна буде скористатися. Це зауваження наведено тут з метою попередити вас про те, що вимикання Nepomuk звузить можливості програм.

Перевірити, чи запущено Nepomuk, можна за допомогою команди akonadictl status.

Я хочу користуватися своїми старими адресною книгою та програмою керування особистими даними. Чи можу я це зробити?

Так. Якщо для додавання ресурсу ви скористалися консоллю Akonadi, ви зможете обрати варіант «Стандартна адресна книга» — вкажіть ваш файл std.vcf, і все запрацює. Перетворення цього файла не знищить дані вашої старої адресної книги. Ви можете продовжити користуватися нею, хоча втратите всі переваги, які колись зможе надати вам Akonadi. Крім того, ви можете користуватися одночасно адресною книгою Akonadi та вашою адресною книгою протягом перехідного періоду, якщо це надасть вам почуття безпеки.

Моя нова адресна книга не показує жодних додаткових даних записів

У поточній версії причину такої поведінки ще не вдалося виявити, але впоратися з цим дуже просто. Закрийте вікно Kontact і запустіть KAddressBook як окрему програму. Після закриття вікна адресної книги ви зможете користуватися нею і у Kontact. Здається, під час запуску Kontact не виконується якась додаткова дія, будемо сподіватися, що це буде виправлено найближчим часом.

Після натискання кнопки «Вибрати» записи контактів KMail не з’являються

Перейдіть на сторінку «Системних параметрів» «Додатково», «Ресурси KDE». Переконайтеся, що Akonadi керує вказаними там адресними книгами, додайте потрібні адресні книги. Якщо хочете, створіть основну адресну книгу Akonadi, яка називається, зазвичай, «Особисті контакти», і зробіть її типовою. Докладніше про налаштування можна дізнатися зі сторінки тут.

Як відновити мою адресну книгу для групової роботи?

Можливі два вирішення: користуватися попередньою версією комплекту або перейти на нову.

Працездатний комплект. У консолі Akonadi додайте «Адресну книгу KDE (традиційну)». Вибір цього пункту означає, що для роботи у Akonadi буде налаштовано старі ресурси. У налаштуваннях пункту «Адресна книга KDE (традиційна)», ви можете вказати ресурс «IMAP через KMail» (у KMail має бути увімкнено можливості групової роботи). Подібні налаштування мають працювати для Kolab, eGroupware і подібних адресних книг, — вам слід уважно вивчити варіанти, щоб переконатися у правильності вибору.

Новий комплект (не перевірялося для серверів, відмінних від Kolab). У модулі налаштувань Akonadi (його вікно можна відкрити командою «kcmshell4 kcm_akonadi») додайте ресурс «Сервер пошти IMAP», вкажіть назву поштового сервера, ваше ім’я користувача і пароль, а потім натисніть кнопку автоматичного виявлення. Додайте ресурс Kolab. Дочекайтеся завершення синхронізації ресурсу imap, яка може тривати досить довго. Повідомлення про завершення можна буде бачити у модулі налаштувань Akonadi. Якщо нічого не станеться, спробуйте перезапустити akonadiserver. Якщо все вийде, адресні книги Kolab мають з’явитися у списку KAddressBook.

Під час надсилання пошти виникають тривалі затримки

Затримки супроводжуються зависаннями KMail на час до завершення обробки пошти.

У системі перевірки адрес Nepomuk виявлено вади, які спричиняють величезні затримки. Вади виправлено у KDE 4.4.1. Якщо ви не оновили систему до версії 4.4.1, можете скористатися тимчасовим вирішенням:

Закрийте вікно Kontact або вікна KMail і KAddressbook, якщо було запущено окремі програми. Вимкніть Strigi у «Системних параметрах». Завершіть роботу Nepomuk, вилучіть базу даних і перезапустіть nepomukserver. Для цього слід виконати команди (від імені звичайного користувача):

qdbus org.kde.NepomukServer /nepomukserver org.kde.NepomukServer.quit
rm -r ~/.kde/share/apps/nepomuk
rm -r ~/.kde4/share/apps/nepomuk
nepomukserver

This will, of course, wipe out all the database, including any tags you've added. In theory, I understand that it's possible to do a more selective wipe of the database. If this matters to you you can find the instructions at this page

Some Technical Issues

Nepomuk

Starting with KDE 4.4, it is required that Nepomuk is running in order for Akonadi to work correctly. Akonadi will check this and display an error dialog on startup if this is not the case.

Nepomuk only works with the Virtuoso backend. You can check whether the Nepomuk is running with the correct backend by using the Akonadi self-test dialog, as described above.

Although Nepomuk is required to be running, you can still disable Strigi file indexing, which is usually the most resource-intensive part of the Nepomuk framework.

Apparmor

Some distributions using Apparmor have it set up in a way that prevents Akonadi from running its internal database server. This can result in a variety of fuzzy error messages, including but not limited to the following:

  • unknown error 255 when running akonadictl
  • "DB error: 'Could not open required defaults file: /home/$username/.local/share/akonadi/mysql.conf"

You can solve this by running aa-complain mysqld with root privileges then reload apparmor. On Kubuntu this is:

sudo aa-complain mysqld
sudo /etc/init.d/apparmor reload

Note that you might be using Apparmor even if it does not show up in the process list.

Also note that some distributions ship an additional mysqld binary called mysqld-akonadi which has AppArmor set up correctly. If that's the case on your system and you see this problem nevertheless, there are two possible reasons:

  • Akonadi still uses mysqld instead of mysqld-akonadi. You can change that in Systemsettings -> Advanced -> Akonadi -> Server configuration.
  • AppArmor is not setup correctly for mysqld-akonadi either. Try running the aa-complain command noted above with mysqld-akonadi instead of mysqld.

---

You will also experience this problem if you are running an encrypted home directory using encryptfs combined with AppArmor as the Akonadi apparmor profile currently does not account for an ecrypted home (common with Ubuntu Jaunty users). Error messages with include:

  • dmesg produces:
     ecryptfs_do_create: Failure to create dentry in lower fs; rc = [-13]
     ecryptfs_create: Failed to create file inlower filesystem
  • Akonadi will list the following errors:
     Akonadi server process not registered at D-Bus

The fix is to edit the following file "/etc/apparmor.d/usr.sbin.mysqld-akonadi". Below the line:

      @{HOME}/.local/share/akonadi/** rwk,

Add a new line:

      @{HOME}/.Private/** rwk,

Restart apparmor and restart akonadi.


Missing Prerequisite

To use Akonadi you need to have the following packages installed (names might differ depending on your distribution):

  • The MySQL server (called mysql on openSUSE)
  • The Qt4 MySQL plugin (called libqt4-sql-mysql on openSUSE)

If you compile Qt4 yourself, make sure to tell the configure script to build in MySQL support by passing it the '-plugin-sql-mysql' option. If configure cannot locate the necessary MySQL client code (i.e, says "MySQL support cannot be enabled due to functionality tests") then ensure that the corresponding package is installed (typically called [lib]mysql[client]-dev[el]). Also, depending on the install location of the MySQL headers, additional parameters to configure might be needed (eg. -I /usr/include/mysql on OpenSuse).

If you get the Qt4 direct from Nokia, such as a download of

 qt-sdk-linux-x86_64-opensource-2009.05.bin

you will ( by the command "akonadictl start") get an error at Test 1:

 Database driver not found.
 Details: The QtSQL driver 'QMYSQL' is required by your current Akonadi server configuration.
 The following drivers are installed: QSQLITE.
 Make sure the required driver is installed.

The driver you need is libqsqlmysql.so

Unfortunately this driver is not part of the distribution (until january 2010). You need to compile the source. Download it

 qt-everywhere-opensource-src-4.6.0.tar.bz

configure and make as above. But the make install doesn't copy the driver. So you have to copy it by yourself:

cp <qt-src-dir>/qt-everywhere-opensource-src-4.6.0/plugins/sqldrivers/libqsqlmysql.so /usr/local/bin/sqldrivers/

But the Revision 4.6.1, such as qt-sdk-linux-x86_64-opensource-2010.xx.bin has the driver you needed.

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.

mysqld: unknown variable 'innodb_file_per_table=1'

If the MySQL server log contains the following error: [ERROR] /usr/libexec/mysqld: unknown variable 'innodb_file_per_table=1' [ERROR] Aborting

then your MySQL server was built without the InnoDB support which is required by Akonadi.


Table 'mysql. servers' doesn't exist

If MySQL server log contains the following error: [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist [ERROR] Cannot open mysql.db [ERROR] Cannot open mysql.user [ERROR] Cannot open mysql.event then, most probably, you don't have your MySQL configuration file in place. Copy it from /usr/share/config/akonadi/mysql-global.conf into ~/.config/akonadi/mysql-local.conf. (For debian and openSuSE users the file ist located in /etc/akonadi/mysql-global.conf). Then open it and uncomment the line sql_mode=strict_trans_tables. If, after that, you get the following errors: [ERROR] Plugin 'InnoDB' init function returned error. [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. [ERROR] Unknown/unsupported table type: innodb [ERROR] Aborting then in the same file find the line that starts just like the one above (which you have uncommented), but has additional parameters, separated by commas (something like sql_mode=strict_trans_tables,strict_all_tables, ...etc). Comment the shorter sql_mode=... line and uncomment the longer one.

On openSUSE 11.2 running the command mysql_install_db --datadir=$HOME/.local/share/akonadi/db_data/ will fix this problem.

Kubuntu 10.4 Upgrade

This is a summary of other entries here for those upgrading from Kubuntu 9.10 to 10.4 who may have been using a personal package archive (PPA) for KDE 4.3 for bug fixes.

Install missing prerequisites. Remove previous akonadi cache. Start the akonadi service. Install the database. Upgrade the database. Stop and restart the akonadi service.

sudo apt-get install virtuoso-server mysql-server-5.1
rm -r $HOME/.local/share/akonadi
akonadictl start
mysql_install_db --datadir=$HOME/.local/share/akonadi/db_data/
mysql_upgrade --socket=$HOME/.local/share/akonadi/db_misc/mysql.socket
akonadictl stop
akonadictl start

The mysql_install_db command above will report something like what follows, which you can safely ignore: Installing MySQL system tables... 100501 18:04:30 [Warning] Can't create test file /home/[userid]/.local/share/akonadi/db_data/[hostname].lower-test

Reference: forum.kde.org Akonadi 1.2.1 - some issues

KAddressBook upgrade

In addition to the Kubuntu 10.4 remedy above, problems trying to add a Vcard directory may require

rm -rf $HOME/.config/akonadi

while Akonadi is not running.

Can't initialize character set latin1

If you get the following error when starting Akonadi:

Character set 'latin1' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index.xml' file Nepomuk QueryServer interface not available! Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString) DataStore::unhideAllPimItems() Character set 'latin1' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index.xml' file Database error: Cannot open database. Last driver error: "QMYSQL: Unable to connect" Last database error: "Can't initialize character set latin1 (path: /usr/share/mysql/charsets/)" Database error: Cannot open database. Last driver error: "QMYSQL: Unable to connect" Last database error: "Can't initialize character set latin1 (path: /usr/share/mysql/charsets/)"

then you're probably using a MySQL server which has a version > 5.1.42. There is a known regression in MySQL 5.1.43 and 5.1.44 which prevents MySQL from starting.

See the bug report for more details.


Restarting after a previous error

If you had problems starting Akonadi and fixed those (such as a missing package or the Apparmor problem) make sure that the Akonadi server is completely shut down before trying to start it again, by calling akonadictl stop on the command line. You can confirm that it was indeed shut down completely by running akonadictl status.

Under some circumstances the Akonadi server can be stuck in a partially running state after a failure which will prevent the next attempt to start it to fail as well. Please file a bug report if you run into this problem including the self-test report of the initial problem.

The so-called "Gentoo-Assert"

That's an especially nasty problem that so far only affects users of source-based distributions, most prominently Gentoo. It is named after MySQL assertions like the following example and is most likely caused by a MySQL protocol mismatch between the MySQL server and the client library or the Qt MySQL driver.

akonadiserver: libmysql.c:4301: setup_one_fetch_function: Assertion
`param->buffer_length != 0' failed.

It is extremely hard to diagnose as the assertion mentioned above are only triggered sometimes. Instead you'll get a wide range of weird symptoms:

  • ASAP protocol logs show successful creation of objects which are supposedly no longer available when the next commands accesses them again.
  • SQL protocol logs show INSERT or UPDATE commands with values that mismatch the corresponding column types and nevertheless succeed.
  • SQL protocol logs showing large apparently random record ids which are nevertheless considered valid.

References:

Possible solution: Rebuild the Qt MySQL driver after upgrading MySQL (which most likely caused this problem in the first place).