Announcement

Collapse
No announcement yet.

Akonadi does not want to start after upgrade from 16.04 to 16.10

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Akonadi does not want to start after upgrade from 16.04 to 16.10

    With every upgrade I seem to have problems with getting Akonadi running.

    I recently upgraded from Kubuntu 16.04 to 16.10.

    Akonadi refuses again to start.
    I solved it last time but don't remember what I did.
    I removed (purged) and reinstalled all Akonadi and mysql related packages but the problem is still there.

    "(sudo) akonadictl start" results in the following "akonadiserver.error" file:
    "
    Database process exited unexpectedly during initial connection!
    executable: "/usr/sbin/mysqld-akonadi"
    arguments: ("--defaults-file=/home/jo/kubuntu_16_04/.local/share/akonadi/mysql.conf", "--datadir=/home/jo/kubuntu_16_04/.local/share/akonadi/db_data/", "--socket=/tmp/akonadi-root.dicPFm/mysql.socket")
    stdout: ""
    stderr: "mysqld: [ERROR] Could not open required defaults file: /home/jo/kubuntu_16_04/.local/share/akonadi/mysql.conf\nmysqld: [ERROR] Fatal error in defaults handling. Program aborted!\n"
    exit code: 1
    process error: "Unknown error"
    Failed to remove Unix socket
    Failed to remove runtime connection config file
    "





    #2
    Try running "akonadictl start" without sudo. It should run as user using it not root.
    Also, that is strange homedir there /home/jo/kubuntu_16_04/

    Comment


      #3
      I did run "akonadictl start" without and with sudo. I tried it also with sudo because based on the error message I expected a permission issue.
      I tried again now without sudo, same info in the error file.


      Regarding the homedir, I have (or had) multiple linux distributions (Kubuntu, Debian, Sidux, ...) or versions installed at the same time.
      From time to time I don't do an upgrade but a complete fresh install without removing the previous installation to be able to go back.
      The homedir for these installations becomes "/home/jo/kubuntu_15_10/", "/home/jo/kubuntu_16_04/", ...
      The directories for my data like "Documents", "Downloads", "Pictures", "Videos", ... are directly under "home/jo" and are shared by all distributions/versions.
      Under every distribution/version homedir there are links towards the data directories.
      And to be complete, the "/home" is an NFS file system located on a NAS.

      Comment


        #4
        akonadi is starting mysql server which is looking for file which does not exists.
        /home/jo/kubuntu_16_04/.local/share/akonadi/mysql.conf

        If I understand you correctly, your home, while in ubuntu 16.10 should be /home/jo/kubuntu_16_10
        What do you get when you just type this?
        echo $HOME

        Comment


          #5
          You are right, my home, while in kubuntu 16.10 should be /home/jo/kubuntu_16_10.
          But it is not. :- I did run a dist-upgrade from 16.04 to 16.10 and forgot to change the name of the homedir, so it still is /home/jo/kubuntu_16_04
          echo $HOME results in
          /home/jo/kubuntu_16_04
          pwd
          /home/jo/kubuntu_16_04/.local/share/akonadi
          ls -al
          totaal 32
          drwxrwxr-x 5 jo jo 4096 Nov 2 22:26 .
          drwxr-xr-x 49 jo jo 4096 Nov 2 11:07 ..
          -rw-rw-r-- 1 jo jo 634 Nov 2 22:26 akonadiserver.error
          -rw-rw-r-- 1 jo jo 634 Nov 2 08:43 akonadiserver.error.old
          drwxrwxr-x 6 jo jo 4096 Okt 15 18:24 db_data
          drwxrwxr-x 2 jo jo 4096 Mai 31 18:55 db_misc
          drwxrwxr-x 102 jo jo 4096 Jun 4 08:55 file_db_data
          -rw-rw-r-- 1 jo jo 3422 Okt 15 18:24 mysql.conf
          lrwxrwxrwx 1 jo jo 22 Nov 2 22:26 socket-Targa-8521-16-04 -> /tmp/akonadi-jo.w9eoCk



          Comment


            #6
            That looks fine to me.

            /home/jo/kubuntu_16_04/.local/share/akonadi/mysql.conf is there.

            It is owned by the same user you use when you start akonadi - which is required in order for mysqld to access it.

            Are you sure you are still getting the same error about missing mysql.conf file?

            Comment


              #7
              Yes, still the same eror.
              I tried to find some notes from the past when I was able to solve the issues.
              I'm not sure that they are all related with the current issue, but it could maybe help:

              It used to be an apparmor related (or solvable) problem around Kubuntu 14.04.
              It could be solved then by "sudo aa-complain mysqld" and "sudo aa-complain mysqld-akonadi".
              There was some explanation about a problem with "mknod" restriction in creating mysql sockets.

              I noted at some point later:
              Issue seems to be locking by NFS.
              Seems solved by mounting NFS with nolock option in fstab"

              I think the last time I solved it by coping
              /usr/sbin/mysqld-akonadi to somewhere else following some advice from this link:
              http://tech.zarmory.com/2013/06/fixi...up-in-kde.html

              But this time I would like to find the root cause and probably have it corrected to avoid to have to go to the hassle with every upgrade.

              Because it seems to be a very uncommon issue I assume that it must be caused by something uncommon I'm doing.
              Having the home partition on a NAS with NFS seems to be one those uncommon things.

              Comment


                #8
                I am also trying out Yakkety and I cannot get akonadi to start. In desperation I removed ~/.local after copying it to ~/.local_bk and I still get the same error, ie
                Code:
                ~$ akonadictl start
                Starting Akonadi Server...
                   done.
                Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
                aurora@sybil:~$ akonadiprivate_log: search paths:  ("/usr/local/sbin", "/usr/local/bin", "/usr/sbin", "/usr/bin", "/sbin", "/bin", "/usr/games", "/usr/local/games", "/snap/bin", "/usr/sbin", "/usr/local/sbin", "/usr/local/libexec", "/usr/libexec", "/opt/mysql/libexec", "/opt/local/lib/mysql5/bin", "/opt/mysql/sbin")
                Found mysql_install_db:  "/usr/bin/mysql_install_db"
                Found mysqlcheck:  "/usr/bin/mysqlcheck"
                Using mysqld: "/usr/sbin/mysqld-akonadi"
                mysqld reports version 5.7.16 (Oracle MySQL)
                Executing:  "/usr/sbin/mysqld-akonadi" "--defaults-file=/etc/xdg/akonadi/mysql-global.conf --initialize --datadir=/home/aurora/.local/share/akonadi/db_data/"
                mysqld: [ERROR] Could not open required defaults file: /etc/xdg/akonadi/mysql-global.conf
                mysqld: [ERROR] Fatal error in defaults handling. Program aborted!
                Executing: "/usr/sbin/mysqld-akonadi" "--defaults-file=/home/aurora/.local/share/akonadi/mysql.conf --datadir=/home/aurora/.local/share/akonadi/db_data/ --socket=/tmp/akonadi-aurora.Woture/mysql.socket"
                Database process exited unexpectedly during initial connection!
                executable: "/usr/sbin/mysqld-akonadi"
                arguments: ("--defaults-file=/home/aurora/.local/share/akonadi/mysql.conf", "--datadir=/home/aurora/.local/share/akonadi/db_data/", "--socket=/tmp/akonadi-aurora.Woture/mysql.socket")
                stdout: ""
                stderr: "mysqld: Error on realpath() on '/var/lib/mysql-files' (Error 2 - No such file or directory)\n2016-11-15T01:40:16.680288Z 0 [Warning] The syntax '--log_warnings/-W' is deprecated and will be removed in a future release. Please use '--log_error_verbosity' instead.\n2016-11-15T01:40:16.680400Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).\n2016-11-15T01:40:16.680532Z 0 [ERROR] Failed to access directory for --secure-file-priv. Please make sure that directory exists and is accessible by MySQL Server. Supplied value : /var/lib/mysql-files\n2016-11-15T01:40:16.680543Z 0 [ERROR] Aborting\n\n2016-11-15T01:40:16.680571Z 0 [Note] Binlog end\n"
                exit code: 1
                process error: "Unknown error"
                terminating service threads
                terminating connection threads
                stopping db process
                Failed to remove Unix socket
                Failed to remove runtime connection config file
                Application 'akonadiserver' exited normally...
                When I do the status of akonadi I get
                Code:
                ~$ akonadictl status
                Akonadi Control: stopped
                Akonadi Server: stopped                                                                                                                                   
                akonadiprivate_log: search paths:  ("lib/x86_64-linux-gnu", "lib/x86_64-linux-gnu/qt5/plugins/", "lib/x86_64-linux-gnu/kf5/", "lib/x86_64-linux-gnu/kf5/plugins/", "/usr/lib/qt5/plugins/", "/usr/lib/x86_64-linux-gnu/qt5/plugins", "/usr/bin")                                                                    
                Akonadi Server Search Support: available (Remote Search)                                                                                                  
                Available Agent Types: akonadi_akonotes_resource, akonadi_archivemail_agent, akonadi_baloo_indexer, akonadi_birthdays_resource, akonadi_contacts_resource, akonadi_davgroupware_resource, akonadi_followupreminder_agent, akonadi_googlecalendar_resource, akonadi_googlecontacts_resource, akonadi_ical_resource, akonadi_icaldir_resource, akonadi_imap_resource, akonadi_invitations_agent, akonadi_kalarm_dir_resource, akonadi_kalarm_resource, akonadi_kolab_resource, akonadi_maildir_resource, akonadi_maildispatcher_agent, akonadi_mailfilter_agent, akonadi_mbox_resource, akonadi_migration_agent, akonadi_mixedmaildir_resource, akonadi_newmailnotifier_agent, akonadi_notes_agent, akonadi_notes_resource, akonadi_openxchange_resource, akonadi_pop3_resource, akonadi_sendlater_agent, akonadi_vcard_resource, akonadi_vcarddir_resource
                What do I need to do to get akonadi working?

                Comment


                  #9
                  stderr: "mysqld: Error on realpath() on '/var/lib/mysql-files' (Error 2 - No such file or directory)

                  Just create that folder

                  sudo mkdir /var/lib/mysql-files

                  Comment


                    #10
                    Originally posted by sasha View Post
                    stderr: "mysqld: Error on realpath() on '/var/lib/mysql-files' (Error 2 - No such file or directory)

                    Just create that folder

                    sudo mkdir /var/lib/mysql-files
                    Thanks for that. Kontact is now working for me and I am currently setting it up from the packages that I have on my KDE Neon system. I am pleased to see that on Yakkety, the Calendar now allows AM times to be specified and stored rather than changing to PM when I save entries on the KDE Neon system.

                    Once I have Kontact all sorted out on Yakkety, I may ditch KDE Neon as I also do frequent video editing with Kdenlive and it is a pain to use as the timeline cursor cannot be moved easily. On Yakkety Kdenlive works like a charm, unfortunately the Laptop it is no, is rather underpowered.

                    Comment


                      #11
                      Hi, I'm still stuck.
                      I did some searching and I'm pretty sure now that it is caused by the MYSQL database on an NFS volume.

                      A solution (I would call it a work around) seems to be to use an external MYSQL database.
                      I could easily do that, I have a MYSQL database running on the same NAS where the NFS is running.
                      Now I need to change some configuration somewhere to point to the external MYSQL database.
                      All suggestions seem to refer to a GUI to change the Akonadi configuration.
                      I don't seem to be able to start that GUI.
                      kcmshell4 akonadi
                      Could not find module 'akonadi'. See kcmshell4 --list for the full list of modules.

                      kcmshell4 kcm_akonadi_resources
                      Could not find module 'kcm_akonadi_resources'. See kcmshell4 --list for the full list of modules.

                      What is missing to start the Akonadi control panel or to be able to change the Akonadi Configuration taking into account that Akonadi does not want to run probably because of a MYSQL NFS database issue?

                      Comment


                        #12
                        My problems were solved from looking at the output from
                        Code:
                        akonadictl start
                        . Have you tried this to see what if going on?

                        Comment


                          #13
                          Yes, see the start of this Thread.

                          Comment


                            #14
                            Originally posted by sasha View Post
                            stderr: "mysqld: Error on realpath() on '/var/lib/mysql-files' (Error 2 - No such file or directory)

                            Just create that folder

                            sudo mkdir /var/lib/mysql-files
                            I also had this problem after an update, but not an upgrade. I realize that this is the 16.10 Distro, but I am on 12.04 and this solution worked for me. I had the same error that a directory was missing. This is actually the second time a regular update has killed my PIM. Thankfully I use Thunderbird for mail. I hate Kmail, but Love the calendar.
                            Kubuntu 18.04.3 LTS -- KDE 5.12.9

                            Comment


                              #15
                              Decided I have wasted enough time (years with issues) on Akonadi and Kmail and went back to Thunderbird until something else which works comes up.

                              Comment

                              Working...
                              X