Bug 26256 - mysql (mariadb) server fails to start
Summary: mysql (mariadb) server fails to start
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal critical
Target Milestone: ---
Assignee: Marc Krämer
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-25 16:55 CET by Barry Jackson
Modified: 2020-02-26 16:44 CET (History)
1 user (show)

See Also:
Source RPM: mariadb-10.4.12-3
CVE:
Status comment:


Attachments

Description Barry Jackson 2020-02-25 16:55:49 CET
Description of problem:
Tested in main hardware system and in clean new Cauldron VBox.

Came across this setting up latest Zoneminder in cauldron while testing the package. It works perfectly when built for Mageia7. 

Not running either just now but will add error messages etc. when I get chance.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Install mariadb
2. Try to start server with systemctl start mysqld.service
3. Service fails with errors but the messages are truncated.
Comment 1 Barry Jackson 2020-02-25 17:23:14 CET
● mysqld.service - MySQL database server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; disabled; vendor preset: disabled)
   Active: activating (start-pre) since Tue 2020-02-25 16:15:16 GMT; 677ms ago
Cntrl PID: 5831 (mysqld-prepare-)
   Memory: 41.2M
   CGroup: /system.slice/mysqld.service
           ├─5831 /usr/bin/sh /usr/sbin/mysqld-prepare-db-dir
           ├─5847 /usr/bin/sh /usr/bin/mysql_install_db --datadir=/var/lib/mysql --user=mysql
           ├─5881 /usr/bin/sh /usr/bin/mysql_install_db --datadir=/var/lib/mysql --user=mysql
           ├─5882 /usr/bin/sh /usr/bin/mysql_install_db --datadir=/var/lib/mysql --user=mysql
           ├─5883 /usr/bin/sh /usr/bin/mysql_install_db --datadir=/var/lib/mysql --user=mysql
           ├─5884 /usr/sbin/mysqld --lc-messages-dir=/usr/share/mysql/english/.. --bootstrap --silent-startup --basedir=/usr --datadir=/var/lib/mysql --log-warnings=0 --enforce-storage-engine= --plugin-dir= --max_allowed_packet=8M --net_buffer_length=16K
           ├─5885 cat
           └─5886 cat /usr/share/mysql/mysql_system_tables.sql /usr/share/mysql/mysql_performance_tables.sql /usr/share/mysql/mysql_system_tables_data.sql /usr/share/mysql/fill_help_tables.sql /usr/share/mysql/maria_add_gis_sp_bootstrap.sql

Feb 25 16:15:16 localhost mysqld-prepare-db-dir[5831]: 2020-02-25 16:15:16 0 [ERROR] mysqld: Can't open shared library '/usr/query_cache_info.so' (errno: 0, cannot open shared object file: No such file or directory)
Feb 25 16:15:16 localhost mysqld-prepare-db-dir[5831]: 2020-02-25 16:15:16 0 [ERROR] Couldn't load plugins from 'query_cache_info.so'.
Feb 25 16:15:16 localhost mysqld-prepare-db-dir[5831]: 2020-02-25 16:15:16 0 [ERROR] mysqld: Can't open shared library '/usr/query_response_time.so' (errno: 
0, cannot open shared object file: No such file or directory)
Feb 25 16:15:16 localhost mysqld-prepare-db-dir[5831]: 2020-02-25 16:15:16 0 [ERROR] Couldn't load plugins from 'query_response_time.so'.
Feb 25 16:15:16 localhost mysqld-prepare-db-dir[5831]: 2020-02-25 16:15:16 0 [ERROR] mysqld: Can't open shared library '/usr/server_audit.so' (errno: 0, cannot open shared object file: No such file or directory)
Feb 25 16:15:16 localhost mysqld-prepare-db-dir[5831]: 2020-02-25 16:15:16 0 [ERROR] Couldn't load plugins from 'server_audit.so'.
Feb 25 16:15:16 localhost mysqld-prepare-db-dir[5831]: 2020-02-25 16:15:16 0 [ERROR] mysqld: Can't open shared library '/usr/sql_errlog.so' (errno: 0, cannot open shared object file: No such file or directory)
Feb 25 16:15:16 localhost mysqld-prepare-db-dir[5831]: 2020-02-25 16:15:16 0 [ERROR] Couldn't load plugins from 'sql_errlog.so'.
Feb 25 16:15:16 localhost mysqld-prepare-db-dir[5831]: 2020-02-25 16:15:16 0 [ERROR] /usr/sbin/mysqld: unknown option '--federated'
Feb 25 16:15:16 localhost mysqld-prepare-db-dir[5831]: 2020-02-25 16:15:16 0 [ERROR] Aborting

All these missing libs appear to have bogus paths.
Comment 2 Barry Jackson 2020-02-25 17:35:32 CET
Taking /usr/query_cache_info.so as one example, there is no file at that location.

It is packaged in mariadb-extra but at:
/usr/lib64/mysql/plugin/query_cache_info.so

So the problem seems to be a path issue in the mariadb package.
Comment 3 Lewis Smith 2020-02-25 19:38:03 CET
It looks like that; nothing would be put directly under /usr .

Assigning to MarcK as the active committer, CC alien as registered maintainer.

CC: (none) => alien
Assignee: bugsquad => mageia

Comment 4 Marc Krämer 2020-02-25 20:45:22 CET
what arch are you using.
Just installed, started and tested mariadb without issues on x86_64.
Comment 5 Barry Jackson 2020-02-25 21:45:13 CET
Initially I was using my 'production' x86_64 cauldron, but then repeated using a clean x86_64 VBox, net-installed a couple of days ago and updated and re-booted just before installing a new version of zoneminder that I have been working on.

Zoneminder pulls in:

[user@localhost ~]$ rpm -qa|grep mariadb
lib64mariadb3-10.4.12-3.mga8
mariadb-core-10.4.12-3.mga8
mariadb-client-10.4.12-3.mga8
mariadb-common-10.4.12-3.mga8
mariadb-extra-10.4.12-3.mga8
mariadb-10.4.12-3.mga8
mariadb-common-core-10.4.12-3.mga8
[user@localhost ~]$

My zmsetup script in zoneminder calls mariadb and does some checks but it failed immediately so I began searching for the cause.

Simply trying to start the service fails as you can see.
Comment 6 Barry Jackson 2020-02-25 21:49:12 CET
[user@localhost ~]$ uname -r
5.5.5-desktop-2.mga8
[user@localhost ~]$ ll /usr/lib64/mysql/plugin/*
-rwxr-xr-x 1 root root  76104 Feb 20 16:19 /usr/lib64/mysql/plugin/auth_ed25519.so*
-rwxr-xr-x 1 root root  15240 Feb 20 16:19 /usr/lib64/mysql/plugin/auth_gssapi_client.so*
-rwxr-xr-x 1 root root  19952 Feb 20 16:19 /usr/lib64/mysql/plugin/auth_gssapi.so*
-rwxr-xr-x 1 root root  15528 Feb 20 16:19 /usr/lib64/mysql/plugin/auth_socket.so*
-rwxr-xr-x 1 root root  15248 Feb 20 16:19 /usr/lib64/mysql/plugin/caching_sha2_password.so*
-rwxr-xr-x 1 root root  75688 Feb 20 16:19 /usr/lib64/mysql/plugin/client_ed25519.so*
-rwxr-xr-x 1 root root  15600 Feb 20 16:19 /usr/lib64/mysql/plugin/cracklib_password_check.so*
-rwxr-xr-x 1 root root  15400 Feb 20 16:19 /usr/lib64/mysql/plugin/debug_key_management.so*
-rwxr-xr-x 1 root root  15208 Feb 20 16:19 /usr/lib64/mysql/plugin/dialog.so*
-rwxr-xr-x 1 root root  15824 Feb 20 16:19 /usr/lib64/mysql/plugin/disks.so*
-rwxr-xr-x 1 root root  24240 Feb 20 16:19 /usr/lib64/mysql/plugin/file_key_management.so*
-rwxr-xr-x 1 root root  85992 Feb 20 16:19 /usr/lib64/mysql/plugin/ha_archive.so*
-rwxr-xr-x 1 root root  53032 Feb 20 16:19 /usr/lib64/mysql/plugin/ha_blackhole.so*
-rwxr-xr-x 1 root root 123504 Feb 20 16:19 /usr/lib64/mysql/plugin/ha_federatedx.so*
-rwxr-xr-x 1 root root 161528 Feb 20 16:19 /usr/lib64/mysql/plugin/handlersocket.so*
-rwxr-xr-x 1 root root  15936 Feb 20 16:19 /usr/lib64/mysql/plugin/locales.so*
-rwxr-xr-x 1 root root  15960 Feb 20 16:19 /usr/lib64/mysql/plugin/metadata_lock_info.so*
-rwxr-xr-x 1 root root  15168 Feb 20 16:19 /usr/lib64/mysql/plugin/mysql_clear_password.so*
-rwxr-xr-x 1 root root  16576 Feb 20 16:19 /usr/lib64/mysql/plugin/query_cache_info.so*
-rwxr-xr-x 1 root root  16184 Feb 20 16:19 /usr/lib64/mysql/plugin/query_response_time.so*
-rwxr-xr-x 1 root root  69720 Feb 20 16:19 /usr/lib64/mysql/plugin/server_audit.so*
-rwxr-xr-x 1 root root  15176 Feb 20 16:19 /usr/lib64/mysql/plugin/sha256_password.so*
-rwxr-xr-x 1 root root  15840 Feb 20 16:19 /usr/lib64/mysql/plugin/simple_password_check.so*
-rwxr-xr-x 1 root root  15984 Feb 20 16:19 /usr/lib64/mysql/plugin/sql_errlog.so*
-rwxr-xr-x 1 root root  65184 Feb 20 16:19 /usr/lib64/mysql/plugin/test_versioning.so*
-rwxr-xr-x 1 root root  24624 Feb 20 16:19 /usr/lib64/mysql/plugin/wsrep_info.so*
[user@localhost ~]$

All the plugins are in the correct place.
Comment 7 Marc Krämer 2020-02-25 21:58:52 CET
what does
$ grep plugin_dir /etc/my.cnf
say?
this should be 
"plugin_dir=/usr/lib64/mysql/plugin"

does zoneminer change this file? This is the default setting shipped in mga
Comment 8 Marc Krämer 2020-02-25 22:04:03 CET
wait. I've found the reason.
Comment 9 Barry Jackson 2020-02-25 22:21:08 CET
[user@localhost ~]$ grep plugin_dir /etc/my.cnf
plugin_dir=/usr/lib64/mysql/plugin
[user@localhost ~]$

I didn't actually get as far as running zoneminder itself only my zmsetup script.
It's in the package sources. It's going back a few years so I would need to look at it but I can't think of any reason why it would touch that.

Source RPM: mariadb => mariadb-10.4.12-3

Comment 10 Marc Krämer 2020-02-25 22:39:53 CET
mariadb-10.4.12-4.mga8 which is currently building should fix this issue.
Comment 11 Barry Jackson 2020-02-26 16:44:06 CET
Thanks Marc that's fixed the problem.

Shame that 10.4 has broken my script but that's not the package at fault.

It seems that the "make sure to set up a mysql root password" requirement has gone from mariadb in 10.4 which will make it much more user friendly.

FYI:
https://mariadb.com/kb/en/authentication-from-mariadb-104/

Closing as fixed

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.