Bug 467568 - "An error occurred during the internal server start"
Summary: "An error occurred during the internal server start"
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Database-Mysql (other bugs)
Version First Reported In: 7.10.0
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-19 13:17 UTC by coolmule0
Modified: 2023-03-20 15:32 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 8.0.0
Sentry Crash Report:


Attachments
ib_logfile0.zip (164.22 KB, application/zip)
2023-03-20 07:14 UTC, Maik Qualmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description coolmule0 2023-03-19 13:17:42 UTC
SUMMARY

I am unable to launch Digikam. The first thing that occurs is that a dialogue pops up with the error message titled:
"An error occurred during the internal server start"
and contents:
"Details: Database process exited unexpectedly during initial connection.<p>Executable: mysqld</p><p>Arguments: --defaults-file=/home/[user]/.local/share/digikam/mysql.conf, --datadir=/home/[user]/.pictures/.mysql.digikam/db_data, --socket=/home/[user]/.local/share/digikam/db_misc/mysql.socket</p><p>Process error: Unknown error</p>"

Digikam was previously working. I lost power, and the first launch after rebooting has this error.

STEPS TO REPRODUCE
1. Cut off power to computer while Digikam is open
2. Turn on PC, launch Digikam

OBSERVED RESULT
Obtain above error message dialogue

EXPECTED RESULT
Digikam to launch normally, or in some sort of recovery mode

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 6.2.7-arch1-1
(available in About System)
KDE Plasma Version: 5.27.3
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8
Comment 1 Maik Qualmann 2023-03-19 16:11:23 UTC
I think we won't be able to do much here if the database is broken and MariaDB can't initialize it anymore.

Start digiKam in the terminal and post the output. Set before the Qt debug variable:

export QT_LOGGING_RULES="digikam*=true"

Maik
Comment 2 coolmule0 2023-03-19 16:32:47 UTC
(In reply to Maik Qualmann from comment #1)
> Start digiKam in the terminal and post the output. Set before the Qt debug variable:

digikam.widgets: Use installed icons
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/[user]/.local/share/digikam/db_misc/mysql.socket"
   Host Name:                 ""
   Host port:                 -1
   Internal Server:           true
   Internal Server Path:      "/home/[user]/.pictures"
   Internal Server Admin Cmd: "mysqladmin"
   Internal Server Serv Cmd:  "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/[user]/.local/share/digikam/db_misc/mysql.socket"
   Host Name:                 ""
   Host port:                 -1
   Internal Server:           true
   Internal Server Path:      "/home/[user]/.pictures"
   Internal Server Admin Cmd: "mysqladmin"
   Internal Server Serv Cmd:  "mysqld"
   Internal Server Init Cmd:  "mysql_install_db"
   Username:                  "root"
   Password:                  ""

digikam.databaseserver: Internal Server data path: "/home/[user]/.pictures/.mysql.digikam/db_data"
digikam.databaseserver: The mysql configuration was already up-to-date: "/home/[user]/.local/share/digikam/mysql.conf"
digikam.databaseserver: Database server: "mysqld" ("--defaults-file=/home/[user]/.local/share/digikam/mysql.conf", "--datadir=/home/[user]/.pictures/.mysql.digikam/db_data", "--socket=/home/[user]/.local/share/digikam/db_misc/mysql.socket")
digikam.databaseserver: "Database process exited unexpectedly during initial connection."
digikam.databaseserver: Executable: "mysqld"
digikam.databaseserver: Arguments: "--defaults-file=/home/[user]/.local/share/digikam/mysql.conf, --datadir=/home/[user]/.pictures/.mysql.digikam/db_data, --socket=/home/[user]/.local/share/digikam/db_misc/mysql.socket"
digikam.databaseserver: Stdout: ""
digikam.databaseserver: Stderr: ""
digikam.databaseserver: Exit code: 1
digikam.databaseserver: Process error: "Unknown error"
digikam.databaseserver: Cannot start internal database server
Comment 3 Maik Qualmann 2023-03-19 16:42:22 UTC
Is there something in the MySQL Error file:

/home/[user]/.pictures/.mysql.digikam/db_data,/mysql.err

Maik
Comment 4 caulier.gilles 2023-03-19 17:19:20 UTC
Maik,

Perhaps it's the same regression problem than QtMysql module under MacOS. Typically, recompiling the qt driver with a lower version of mariadb connector (10.x -> 5.x)...

Gilles
Comment 5 coolmule0 2023-03-19 18:23:01 UTC
(In reply to Maik Qualmann from comment #3)
> Is there something in the MySQL Error file:
> /home/[user]/.pictures/.mysql.digikam/db_data,/mysql.err

2023-03-19 16:29:55 0 [Note] Starting MariaDB 10.11.2-MariaDB-log source revision cafba8761af55ae16cc69c9b53a341340a845b36 as process 41445
2023-03-19 16:29:55 0 [Warning] option 'innodb-log-buffer-size': unsigned value 1048576 adjusted to 2097152
2023-03-19 16:29:55 0 [Note] InnoDB: Compressed tables use zlib 1.2.13
2023-03-19 16:29:55 0 [Note] InnoDB: Number of transaction pools: 1
2023-03-19 16:29:55 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2023-03-19 16:29:55 0 [Note] InnoDB: Using liburing
2023-03-19 16:29:55 0 [Note] InnoDB: Initializing buffer pool, total size = 80.000MiB, chunk size = 1.250MiB
2023-03-19 16:29:55 0 [Note] InnoDB: Completed initialization of buffer pool
2023-03-19 16:29:55 0 [Note] InnoDB: Buffered log writes (block size=512 bytes)
2023-03-19 16:29:55 0 [ERROR] InnoDB: Missing FILE_CHECKPOINT(2046798782) at 2046798782
2023-03-19 16:29:55 0 [ERROR] InnoDB: Log scan aborted at LSN 2046798782
2023-03-19 16:29:55 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2023-03-19 16:29:55 0 [Note] InnoDB: Starting shutdown...
2023-03-19 16:29:55 0 [ERROR] Plugin 'InnoDB' init function returned error.
2023-03-19 16:29:55 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2023-03-19 16:29:55 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2023-03-19 16:29:55 0 [ERROR] Aborting
Comment 6 Maik Qualmann 2023-03-19 19:51:21 UTC
Check if there is an "ib_logfile0" in the directory. If present, rename it and create an empty "ib_logfile0" file.

Maik
Comment 7 coolmule0 2023-03-19 21:18:58 UTC
There was a `ib_logfile0`. Removing the existing and creating altered the `mysql.err` file:

2023-03-19 20:46:35 0 [Note] Starting MariaDB 10.11.2-MariaDB-log source revision cafba8761af55ae16cc69c9b53a341340a845b36 as process 91099
2023-03-19 20:46:35 0 [Warning] option 'innodb-log-buffer-size': unsigned value 1048576 adjusted to 2097152
2023-03-19 20:46:35 0 [Note] InnoDB: Compressed tables use zlib 1.2.13
2023-03-19 20:46:35 0 [Note] InnoDB: Number of transaction pools: 1
2023-03-19 20:46:35 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2023-03-19 20:46:35 0 [Note] InnoDB: Using liburing
2023-03-19 20:46:35 0 [Note] InnoDB: Initializing buffer pool, total size = 80.000MiB, chunk size = 1.250MiB
2023-03-19 20:46:35 0 [Note] InnoDB: Completed initialization of buffer pool
2023-03-19 20:46:35 0 [ERROR] InnoDB: File ./ib_logfile0 is too small
2023-03-19 20:46:35 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2023-03-19 20:46:35 0 [Note] InnoDB: Starting shutdown...
2023-03-19 20:46:35 0 [ERROR] Plugin 'InnoDB' init function returned error.
2023-03-19 20:46:35 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2023-03-19 20:46:35 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2023-03-19 20:46:35 0 [ERROR] Aborting
Comment 8 Maik Qualmann 2023-03-20 07:14:41 UTC
Created attachment 157433 [details]
ib_logfile0.zip

Try this ib_logfile0, it needs to be unpacked.

Maik
Comment 9 coolmule0 2023-03-20 12:56:01 UTC
I used the attached logfile. I needed to re-specify my library locations. But upon doing that, Digikam boots up as expected. 

It has all the database information still intact. The one thing it is lacking is face tag icons, but everything else appears as it should.

Thank you for the assistance Maik
Comment 10 caulier.gilles 2023-03-20 15:32:35 UTC
Perfect, i close this file now...