Akonadi server will not start after upgrade to kubuntu 19.10

Bug #1850162 reported by doctordruidphd
36
This bug affects 7 people
Affects Status Importance Assigned to Milestone
akonadi (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

After upgrading from kubntu-19.04 to 19.10, the akonadi server will not start. This means that knotes, kalarm, etc do not work. Manually trying to start akonadi, as configured for mysql, produces the following:

----------
<email address hidden> ~/.config/akonadi$ akonadictl start
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
<email address hidden> ~/.config/akonadi$ org.kde.pim.akonadiserver: Starting up the Akonadi Server...
org.kde.pim.akonadiserver: database server stopped unexpectedly
org.kde.pim.akonadiserver: Database process exited unexpectedly during initial connection!
org.kde.pim.akonadiserver: executable: "/usr/sbin/mysqld-akonadi"
org.kde.pim.akonadiserver: arguments: ("--defaults-file=/home/greenman/.local/share/akonadi/mysql.conf", "--datadir=/home/greenman/.local/share/akonadi/db_data/", "--socket=/run/user/1000/akonadi/default/mysql.socket", "--pid-file=/run/user/1000/akonadi/default/mysql.pid")
org.kde.pim.akonadiserver: stdout: ""
org.kde.pim.akonadiserver: stderr: ""
org.kde.pim.akonadiserver: exit code: 1
org.kde.pim.akonadiserver: process error: "Unknown error"
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/run/user/1000/akonadi/default/mysql.socket' (2)'
Check that mysqld is running and that the socket: '/run/user/1000/akonadi/default/mysql.socket' exists!
org.kde.pim.akonadiserver: Failed to remove runtime connection config file
org.kde.pim.akonadiserver: Shutting down AkonadiServer...
org.kde.pim.akonadicontrol: Application '/usr/bin/akonadiserver' exited normally...

----------

Switching akonadi to postgresql using the instructions found here (modified for local installation): https://www.enricozini.org/blog/2015/akonadi-install/

----------
<email address hidden> ~/.local/share/akonadi$ akonadictl start
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
<email address hidden> ~/.local/share/akonadi$ org.kde.pim.akonadiserver: Starting up the Akonadi Server...
The files belonging to this database system will be owned by user "greenman".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.UTF-8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are enabled.

fixing permissions on existing directory /home/greenman/.local/share/akonadi/db_data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default timezone ... America/Los_Angeles
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.

Success. You can now start the database server using:

    /usr/lib/postgresql/11/bin/pg_ctl -D /home/greenman/.local/share/akonadi/db_data -l logfile start

org.kde.pim.akonadiserver: Failed to create database
org.kde.pim.akonadiserver: Query error: "ERROR: syntax error at or near \"-\"\nLINE 1: CREATE DATABASE akonadi-greenman\n ^\n(42601) QPSQL: Unable to create query"
org.kde.pim.akonadiserver: Database error: "could not connect to server: No such file or directory\n\tIs the server running locally and accepting\n\tconnections on Unix domain socket \"/run/user/1000/akonadi/default/.s.PGSQL.5432\"?\nQPSQL: Unable to connect"
waiting for server to shut down.... done
server stopped
org.kde.pim.akonadiserver: Failed to remove runtime connection config file
org.kde.pim.akonadiserver: Shutting down AkonadiServer...
org.kde.pim.akonadicontrol: Application '/usr/bin/akonadiserver' exited normally...

----------

Attempting to start the server with the line metioned above:

----------
<email address hidden> ~/.local/share/akonadi$ /usr/lib/postgresql/11/bin/pg_ctl -D /home/greenman/.local/share/akonadi/db_data -l logfile start
waiting for server to start.... stopped waiting
pg_ctl: could not start server
Examine the log output.

----------

And the logfile is:

----------
<email address hidden> ~/.local/share/akonadi$ cat logfile
2019-10-28 07:56:40.520 PDT [3139] LOG: could not bind IPv4 address "127.0.0.1": Address already in use
2019-10-28 07:56:40.520 PDT [3139] HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
2019-10-28 07:56:40.520 PDT [3139] WARNING: could not create listen socket for "localhost"
2019-10-28 07:56:40.531 PDT [3139] FATAL: could not create any TCP/IP sockets
2019-10-28 07:56:40.531 PDT [3139] LOG: database system is shut down
----------

According to lsof there is nothing else using port 5432; I have opened the port with ufw, so there should be no access problem.

Still, it will not start. I have tried deleting both ~/.local/share/akonadi and ~/.config/akonadi, reinstalling and reconfiguring akonadi-server. So far nothing has worked.

----------

<email address hidden> ~/.local/share/akonadi$ lsb_release -rd
Description: Ubuntu 19.10
Release: 19.10

<email address hidden> ~/.local/share/akonadi$ apt-cache policy akonadi-server
akonadi-server:
  Installed: 4:19.04.3-0ubuntu3
  Candidate: 4:19.04.3-0ubuntu3
  Version table:
 *** 4:19.04.3-0ubuntu3 500
        500 http://us.archive.ubuntu.com/ubuntu eoan/universe amd64 Packages
        100 /var/lib/dpkg/status

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in akonadi (Ubuntu):
status: New → Confirmed
Revision history for this message
doctordruidphd (doctordruidphd) wrote :

I was able to get akonadi to work with postgresql using a different set of instructions, located here, modified as necessary for kubuntu:

https://vinzv.de/en/bringing-kmail-and-postgresql-together/

I did have to delete everything in ~/.local/share/akoandi and ~/,config/akonadi

This does not change the fact that it still does not work with mysql-8.x

Revision history for this message
Sébastien Wertz (sebastien-wertz) wrote :

FYI, replacing mysql8 by mariadb also solves it, see https://askubuntu.com/questions/1182115/why-does-akonadi-not-start-after-upgrade-from-ubuntu-19-04-to-19-10

However this might not be an option for everyone...

Revision history for this message
prkos (prkos) wrote :
Download full text (3.3 KiB)

I didn't have any luck with MariaDB either.

I couldn't login to mysql without sudo so I fixed that (the root password I set during installation was too weak but it didn't complain at the time). I set the new password for root, a more secure one, and I can now login into mysql without sudo.

But Akonadi still doesn't start:

__________________

$ akonadictl start
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
myusername@10:39:~$ Invalid Context= "Legacy" line for icon theme: "/usr/share/icons/Adwaita/8x8/legacy/"
Invalid Context= "Legacy" line for icon theme: "/usr/share/icons/Adwaita/16x16/legacy/"
Invalid Context= "Legacy" line for icon theme: "/usr/share/icons/Adwaita/22x22/legacy/"
Invalid Context= "Legacy" line for icon theme: "/usr/share/icons/Adwaita/24x24/legacy/"
Invalid Context= "Legacy" line for icon theme: "/usr/share/icons/Adwaita/32x32/legacy/"
Invalid Context= "Legacy" line for icon theme: "/usr/share/icons/Adwaita/48x48/legacy/"
Invalid Context= "Legacy" line for icon theme: "/usr/share/icons/Adwaita/256x256/legacy/"
Invalid Context= "Legacy" line for icon theme: "/usr/share/icons/Adwaita/512x512/legacy/"
Invalid Context= "Legacy" line for icon theme: "/usr/share/icons/Adwaita/scalable/legacy/"
Invalid Context= "UI" line for icon theme: "/usr/share/icons/Adwaita/scalable/ui/"
org.kde.pim.akonadiserver: Starting up the Akonadi Server...
2020-02-23T09:39:55.440835Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.19-0ubuntu0.19.10.3) initializing of server in progress as process 1641
2020-02-23T09:39:58.480065Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: <SRqEl6J_S9>
org.kde.pim.akonadiserver: database server stopped unexpectedly
org.kde.pim.akonadiserver: Database process exited unexpectedly during initial connection!
org.kde.pim.akonadiserver: executable: "/usr/sbin/mysqld-akonadi"
org.kde.pim.akonadiserver: arguments: ("--defaults-file=/home/myusername/.local/share/akonadi/mysql.conf", "--datadir=/home/myusername/.local/share/akonadi/db_data/", "--socket=/run/user/1000/akonadi/default/mysql.socket", "--pid-file=/run/user/1000/akonadi/default/mysql.pid")
org.kde.pim.akonadiserver: stdout: ""
org.kde.pim.akonadiserver: stderr: ""
org.kde.pim.akonadiserver: exit code: 1
org.kde.pim.akonadiserver: process error: "Unknown error"
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/run/user/1000/akonadi/default/mysql.socket' (2)'
Check that mysqld is running and that the socket: '/run/user/1000/akonadi/default/mysql.socket' exists!
org.kde.pim.akonadiserver: Failed to remove runtime connection config file
org.kde.pim.akonadiserver: Shutting down AkonadiServer...
org.kde.pim.akonadicontrol: Application '/usr/bin/akonadiserver' exited normally...
_________________

I could get Korganizer to start when I first installed the OS Kubuntu 19.10, I'm guessing it stopped working after I installed LAMP/MySQL.

Should I try to purge LAMP and see if it helps?

___________________
$ apt-cache policy akonadi-server
akonadi-server:
  Installed: 4:19.04.3-0ubuntu3
  C...

Read more...

Revision history for this message
prkos (prkos) wrote :

Is this relevant? Some errors below:

~/.local/share/akonadi/db_data/mysql.err

________________________
2020-02-23T09:40:32.871895Z 0 [Warning] [MY-010097] [Server] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.
2020-02-23T09:40:32.871951Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.19-0ubuntu0.19.10.3) starting as process 1727
2020-02-23T09:40:32.873822Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
2020-02-23T09:40:32.873831Z 0 [Warning] [MY-013244] [Server] --collation-server: 'utf8_general_ci' is a collation of the deprecated character set UTF8MB3. Please consider using UTF8MB4 with an appropriate collation instead.
2020-02-23T09:40:33.137526Z 1 [ERROR] [MY-011087] [Server] Different lower_case_table_names settings for server ('1') and data dictionary ('0').
2020-02-23T09:40:33.137827Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2020-02-23T09:40:33.138231Z 0 [ERROR] [MY-010119] [Server] Aborting
2020-02-23T09:40:33.657484Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.19-0ubuntu0.19.10.3) (Ubuntu).
________________________

Revision history for this message
prkos (prkos) wrote :

__________________________
$ /usr/sbin/mysqld-akonadi
2020-02-23T10:00:12.122977Z 0 [Warning] [MY-010091] [Server] Can't create test file /var/lib/mysql/mysqld_tmp_file_case_insensitive_test.lower-test
2020-02-23T10:00:12.123038Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.19-0ubuntu0.19.10.3) starting as process 3278
2020-02-23T10:00:12.125205Z 0 [Warning] [MY-010091] [Server] Can't create test file /var/lib/mysql/mysqld_tmp_file_case_insensitive_test.lower-test
2020-02-23T10:00:12.125214Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
2020-02-23T10:00:12.125239Z 0 [ERROR] [MY-013276] [Server] Failed to set datadir to '/var/lib/mysql/' (OS errno: 13 - Permission denied)
2020-02-23T10:00:12.125295Z 0 [ERROR] [MY-010119] [Server] Aborting
2020-02-23T10:00:12.125392Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.19-0ubuntu0.19.10.3) (Ubuntu).
________________________

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.