Summary: | digikam 7.3.0 fails to start: cannot process schema initialization | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Karsten de Freese <karsten.defreese> |
Component: | Database-Schema | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | grave | CC: | caulier.gilles, linux, metzpinguin |
Priority: | NOR | ||
Version: | 7.3.0 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 7.4.0 | |
Sentry Crash Report: |
Description
Karsten de Freese
2021-08-04 15:27:46 UTC
*** This bug has been marked as a duplicate of bug 440030 *** Read the double bug report, there is a manual option to upgrade your internal database. The cause is a major update of MariaDB with internal changes to the database. Or use an AppImage bundle from the pre-release of digiKam-7.4.0 to upgrade the DB, after which you can use 7.3.0 again: https://files.kde.org/digikam/ Maik Thanks for the ultra-quick reply, which helped me move on, but with no good result yet.. - I tried the manual update first. Directory /home/karsten/.local/share/digikam/db_misc/ was empty, and probably because of this the upgrade fails (as described by Jens in one of his earlier posts). - Then I downloaded the 7.4.0 AppImage. It did actually produce the same GUI error messages as the 7.3.0 installation. - Erroneously, I started the manual update again while the GUI error messages from the 7.4.0 AppImage were still open, and the manual update succeeded then. - After closing the 7.4.0 error messages I started the installed 7.3.0 version, which produced: "An error occurred during the internal server start. Details: Database process exited unexpectedly during initial connection.<p>Executable: /usr/sbin/mysqld</p><p>Arguments: --defaults-file=/home/karsten/.local/share/digikam/mysql.conf, --datadir=/var/lib/digikam_db/MySQL/.mysql.digikam/db_data, --socket=/home/karsten/.local/share/digikam/db_misc/mysql.socket</p><p>Process error: Process crashed</p>" but after closing the error message and confirming the database configuration, digikam continued to start up correctly ONCE. A second start of digikam however resulted in the same error messsage. Closing the message window brings up the database configuration window, and confirming the current configuration brings back the error message etc. etc. The path to db files is set to /var/lib/digikam_db/MySQL. Maybe a mysqld process is still running, restart ... Here was my solution from the mailing list (Path needs to be adjusted): https://mail.kde.org/pipermail/digikam-users/2021-July/032479.html Maik A restart did not change the situation unfortunately, and trying to run the manual update command while the installed 7.3.0 was showing its error message still did not work (this is what I understood from https://mail.kde.org/pipermail/digikam-users/2021-July/032479.html): karsten@osl-i5:~> mariadb-upgrade --socket=/home/karsten/.local/share/digikam/db_misc/ Version check failed. Got the following error when calling the 'mysql' command line client ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/home/karsten/.local/share/digikam/db_misc/' (111) FATAL ERROR: Upgrade failed (Actually directory /home/karsten/.local/share/digikam/db_misc/ is empty at this moment.) When I start the 7.4.0 AppImage, I get the same error message, and when closing the message, the 'Database Configuration' window shows mysqld as missing. Does this point to something? Which Mariadb server version should I have installed? Currently this is 10.5.10. Ok, let's ignore the AppImage, it can't find the binary files. You didn't read this post correctly: https://mail.kde.org/pipermail/digikam-users/2021-July/032479.html You have to start digiKam-7.3.0, leave the error message, the server is now running. Perform the upgrade on a different terminal. Maik ok, I think that's what I've done, but let's try again.. I start 7.3.0 via CLI: - on the CLI: karsten@osl-i5:~/Downloads> digikam digikam.widgets: Use installed icons digikam.general: Switch to widget style: "" digikam.general: Switch to application font: QFont(Noto Sans,10,-1,5,50,0,0,0,0,0) digikam.general: AlbumWatch is disabled digikam.general: Database Parameters: Type: "QMYSQL" DB Core Name: "digikam" DB Thumbs Name: "digikam" DB Face Name: "digikam" DB Similarity Name: "digikam" Connect Options: "UNIX_SOCKET=/home/karsten/.local/share/digikam/db_misc/mysql.socket" Host Name: "" Host port: -1 Internal Server: true Internal Server Path: "/var/lib/digikam_db/MySQL" Internal Server Admin Cmd: "mysqladmin" Internal Server Serv Cmd: "/usr/sbin/mysqld" Internal Server Init Cmd: "mysql_install_db" Username: "root" Password: "" digikam.databaseserver: Database Parameters: Type: "QMYSQL" DB Core Name: "digikam" DB Thumbs Name: "digikam" DB Face Name: "digikam" DB Similarity Name: "digikam" Connect Options: "UNIX_SOCKET=/home/karsten/.local/share/digikam/db_misc/mysql.socket" Host Name: "" Host port: -1 Internal Server: true Internal Server Path: "/var/lib/digikam_db/MySQL" Internal Server Admin Cmd: "mysqladmin" Internal Server Serv Cmd: "/usr/sbin/mysqld" Internal Server Init Cmd: "mysql_install_db" Username: "root" Password: "" digikam.databaseserver: Internal Server data path: "/var/lib/digikam_db/MySQL/.mysql.digikam/db_data" digikam.databaseserver: The mysql configuration was already up-to-date: "/home/karsten/.local/share/digikam/mysql.conf" digikam.databaseserver: Database server: "/usr/sbin/mysqld" ("--defaults-file=/home/karsten/.local/share/digikam/mysql.conf", "--datadir=/var/lib/digikam_db/MySQL/.mysql.digikam/db_data", "--socket=/home/karsten/.local/share/digikam/db_misc/mysql.socket") digikam.databaseserver: "Database process exited unexpectedly during initial connection." digikam.databaseserver: Executable: "/usr/sbin/mysqld" digikam.databaseserver: Arguments: "--defaults-file=/home/karsten/.local/share/digikam/mysql.conf, --datadir=/var/lib/digikam_db/MySQL/.mysql.digikam/db_data, --socket=/home/karsten/.local/share/digikam/db_misc/mysql.socket" digikam.databaseserver: Stdout: "" digikam.databaseserver: Stderr: "2021-08-04 21:31:44 0 [Note] /usr/sbin/mysqld (mysqld 10.5.10-MariaDB-log) starting as process 16738 ...\n" digikam.databaseserver: Exit code: 6 digikam.databaseserver: Process error: "Process crashed" digikam.databaseserver: Cannot start internal database server - an error popup window occurs with text "... Database process exited unexpectedly during initial connection.<p>Executable: /usr/sbin/mysqld</p><p>Arguments: --defaults-file=/home/karsten/.local/share/digikam/mysql.conf, --datadir=/var/lib/digikam_db/MySQL/.mysql.digikam/db_data, --socket=/home/karsten/.local/share/digikam/db_misc/mysql.socket</p><p>Process error: Process crashed</p>" - I keep the error popup as it is and start the upgrade in a 2nd terminal: karsten@osl-i5:/data/karsten/Downloads> mariadb-upgrade --socket=/home/karsten/.local/share/digikam/db_misc/ Version check failed. Got the following error when calling the 'mysql' command line client ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/home/karsten/.local/share/digikam/db_misc/' (111) FATAL ERROR: Upgrade failed (-- no new output on the digikam CLI) - I click ok on the error message, then the 'Database Configuration' dialog appears: -- location of database files: /var/lib/digikam_db/MySQL -- all mysql binaries have checkmarks in the first column -- on the digikam CLI: digikam.general: Testing "mysql_install_db" ... digikam.general: Found "mysql_install_db" digikam.general: Testing "mysqladmin" ... digikam.general: Found "mysqladmin" digikam.general: Testing "mysqld" ... digikam.general: Testing "mysqld" ... digikam.general: Testing "/usr/bin/mysqld" ... digikam.general: All Binaries Found : false digikam.general: Testing "/usr/sbin/mysqld" ... digikam.general: Found "/usr/sbin/mysqld" digikam.general: All Binaries Found : true digikam.general: Testing "/data/karsten/Downloads/mysqladmin/mysqladmin" ... digikam.general: All Binaries Found : true digikam.general: Testing "/data/karsten/Downloads/mysql_install_db/mysql_install_db" ... digikam.general: All Binaries Found : true digikam.general: Testing "/usr/sbin/mysqld/mysqld" ... digikam.general: All Binaries Found : true - I start the upgrade again, just in case: karsten@osl-i5:/data/karsten/Downloads> mariadb-upgrade --socket=/home/karsten/.local/share/digikam/db_misc/ Version check failed. Got the following error when calling the 'mysql' command line client ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/home/karsten/.local/share/digikam/db_misc/' (111) FATAL ERROR: Upgrade failed (-- no new output on the digikam CLI) - I close the 'Database Configuration' window, and digikam terminates. -- digikam CLI: digikam.databaseserver: Internal database server stopped Since the first error message from digikam already says "Database process exited unexpectedly during initial connection", then maybe the database server is never actually started? I don't think your server path is correct? Internal Server Path: "/var/lib/digikam_db/MySQL" Normally this is located on an internal server either near the images or in the home directory. Otherwise, the database is probably corrupt if the server crashes ... Maik under /var/lib/digikam_db/MySQL there is (only) .mysql.digikam/db_data/: karsten@osl-i5:~/Downloads> ls -al /var/lib/digikam_db/MySQL/.mysql.digikam/db_data/ total 156M drwxr-xr-x 1 karsten karsten 736 Aug 4 22:36 . drwxr-xr-x 1 karsten karsten 14 Jul 6 2018 .. drwx------ 1 karsten karsten 2,5K Aug 4 18:51 digikam drwx------ 1 karsten karsten 2,7K Aug 4 18:23 mysql drwx------ 1 karsten karsten 12 Aug 4 18:23 performance_schema drwx------ 1 karsten karsten 0 Jul 6 2018 test -rw-rw---- 1 karsten karsten 80K Aug 4 18:39 aria_log.00000001 -rw-rw---- 1 karsten karsten 52 Aug 4 18:39 aria_log_control -rw-rw---- 1 karsten karsten 9,1K Aug 4 18:39 ib_buffer_pool -rw-rw---- 1 karsten karsten 76M Aug 4 18:39 ibdata1 -rw-rw---- 1 karsten karsten 64M Aug 4 22:36 ib_logfile0 -rw-rw---- 1 karsten karsten 12M Aug 4 22:36 ibtmp1 -rw-rw---- 1 karsten karsten 0 Jul 6 2018 multi-master.info -rw-rw---- 1 karsten karsten 1,7K Aug 4 16:01 mysql-bin.000141 -rw-rw---- 1 karsten karsten 1,7K Aug 4 16:01 mysql-bin.000142 -rw-rw---- 1 karsten karsten 1,7K Aug 4 16:07 mysql-bin.000143 -rw-rw---- 1 karsten karsten 2,9K Aug 4 16:59 mysql-bin.000144 -rw-rw---- 1 karsten karsten 365 Aug 4 16:59 mysql-bin.000145 -rw-rw---- 1 karsten karsten 1,7K Aug 4 16:59 mysql-bin.000146 -rw-rw---- 1 karsten karsten 1,7K Aug 4 17:16 mysql-bin.000147 -rw-rw---- 1 karsten karsten 2,9K Aug 4 18:13 mysql-bin.000148 -rw-rw---- 1 karsten karsten 342 Aug 4 18:13 mysql-bin.000149 -rw-rw---- 1 karsten karsten 1,6K Aug 4 18:15 mysql-bin.000150 -rw-rw---- 1 karsten karsten 49K Aug 4 18:39 mysql-bin.000151 -rw-rw---- 1 karsten karsten 209 Aug 4 18:30 mysql-bin.index -rw-rw---- 1 karsten karsten 11 Aug 4 18:39 mysql-bin.state -rw-rw---- 1 karsten karsten 8,7K Aug 4 22:36 mysql.err -rw-r--r-- 1 karsten karsten 3,3M Aug 4 22:36 mysql.err.old -rw-r--r-- 1 karsten karsten 16 Aug 4 18:23 mysql_upgrade_info is this what's expected? Anyway, I'm afraid that my configuration is indeed corrupted by now. So I should see what I can collect from backups now, and restart with a 7.2.0 AppImage just to have a clean start. Could you point me to the files/directories I'd need to recover? - $HOME/.local/share/digikam/ - the Internal Server Path (currently set to "/var/lib/digikam_db/MySQL" in my config) (is this the same path configred in the 'Database Configuration' dialogue?) - probably some more? Thanks very much for your help! Your configuration should fit, including your database path, if it is located under /var. The AppImage method doesn't work at the moment, I just noticed while testing an old DB that "SELECT VERSION();" contrary to the publications on the web actually returns the current server version and not the database version. That has to be fixed first. So you have to perform the manual method after importing a backup. Maik No success yet - I could restore the original behaviour, and run the manual upgrade, but digikam fails to start with the upgraded database. This is what I did (all using the installed copy of digikam 7.3.0): - I restored -- $HOME/.local/share/digikam/ -- $HOME/.config/digikam* -- the database directory (/var/lib/digikam_db in my case) to the state before the update. - I started digikam 7.3.0 (local installation) The original error messages popped up - so far as expected. ("Failed to update the database schema from version 12 to version 13...") - while the error messages were still shown, a manual database upgrade ran successfully ("mariadb-upgrade --socket=/home/karsten/.local/share/digikam/db_misc/mysql.socket") - I clicked ok the digikam error messages and digikam terminated after a while => so far so good - BUT: Starting digikam again did result in the error seen yesterday: "An error occurred during the internal server start. Details: Database process exited unexpectedly during initial connection. <p>Executable: /usr/sbin/mysqld</p> <p>Arguments: --defaults-file=/home/karsten/.local/share/digikam/mysql.conf, --datadir=/var/lib/digikam_db/MySQL/.mysql.digikam/db_data, --socket=/home/karsten/.local/share/digikam/db_misc/mysql.socket</p> <p>Process error: Process crashed</p>" (formatting by myself) The debug output in the terminal at this point: digikam.widgets: Use installed icons digikam.general: Switch to widget style: "" digikam.general: Switch to application font: QFont(Noto Sans,10,-1,5,50,0,0,0,0,0) digikam.general: AlbumWatch is disabled digikam.general: Database Parameters: Type: "QMYSQL" DB Core Name: "digikam" DB Thumbs Name: "digikam" DB Face Name: "digikam" DB Similarity Name: "digikam" Connect Options: "UNIX_SOCKET=/home/karsten/.local/share/digikam/db_misc/mysql.socket" Host Name: "" Host port: -1 Internal Server: true Internal Server Path: "/var/lib/digikam_db/MySQL" Internal Server Admin Cmd: "mysqladmin" Internal Server Serv Cmd: "/usr/sbin/mysqld" Internal Server Init Cmd: "mysql_install_db" Username: "root" Password: "" digikam.databaseserver: Database Parameters: Type: "QMYSQL" DB Core Name: "digikam" DB Thumbs Name: "digikam" DB Face Name: "digikam" DB Similarity Name: "digikam" Connect Options: "UNIX_SOCKET=/home/karsten/.local/share/digikam/db_misc/mysql.socket" Host Name: "" Host port: -1 Internal Server: true Internal Server Path: "/var/lib/digikam_db/MySQL" Internal Server Admin Cmd: "mysqladmin" Internal Server Serv Cmd: "/usr/sbin/mysqld" Internal Server Init Cmd: "mysql_install_db" Username: "root" Password: "" digikam.databaseserver: Internal Server data path: "/var/lib/digikam_db/MySQL/.mysql.digikam/db_data" digikam.databaseserver: The mysql configuration was already up-to-date: "/home/karsten/.local/share/digikam/mysql.conf" digikam.databaseserver: Database server: "/usr/sbin/mysqld" ("--defaults-file=/home/karsten/.local/share/digikam/mysql.conf", "--datadir=/var/lib/digikam_db/MySQL/.mysql.digikam/db_data", "--socket=/home/karsten/.local/share/digikam/db_misc/mysql.socket") digikam.databaseserver: "Database process exited unexpectedly during initial connection." digikam.databaseserver: Executable: "/usr/sbin/mysqld" digikam.databaseserver: Arguments: "--defaults-file=/home/karsten/.local/share/digikam/mysql.conf, --datadir=/var/lib/digikam_db/MySQL/.mysql.digikam/db_data, --socket=/home/karsten/.local/share/digikam/db_misc/mysql.socket" digikam.databaseserver: Stdout: "" digikam.databaseserver: Stderr: "2021-08-05 12:13:56 0 [Note] /usr/sbin/mysqld (mysqld 10.5.10-MariaDB-log) starting as process 29222 ...\n" digikam.databaseserver: Exit code: 6 digikam.databaseserver: Process error: "Process crashed" digikam.databaseserver: Cannot start internal database server Finally, success :-) Basically following the same process as below, I used a 7.2.0 AppImage to open the database (as opposed to the installed 7.3.0). After the manual upgrade was run, and the 7.2.0 AppImage terminated, I could successfully launch 7.3.0 without obvious issues so far. So the key point appears to be to use a *working* digikam installation to open the database before upgrade. Maybe this has impact on the automatic update to be built into 7.4.0? Thanks again for your support! - Karsten Fixed with #440030 Just to let you know: I have the same problem, with the only difference that none of the offered solutions have worked for me. Whenever I try to update mariadb, I get the message: "Version check failed. Got the following error when calling the 'mysql' command line client ERROR 2002 (HY000): Can't connect to local server through socket '$HOME/.local/share/digikam/db_misc/mysql.socket' (2)" With the manual method, a digiKam-7.3.0 instance has to be running, just leave it in the error window. Now perform the upgrade in another terminal. You could also use the AppImage from digiKam-7.4.0, but a database update is also carried out, but it is still compatible with digiKam-7.3.0. Maik |