Nach der Installation von Tumbleweed wurde Maria DB installiert. MariaDB liess sich nicht starten. Da ich dann zuviel darum erfolglos getestet hatte habe ich es nach Anleitung komplett entfernt und nochmals neu installiert. Leider funktioniert es immer noch nicht. sudo journalctl -xeu mariadb.service
mariadb.service: Control process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support:
░░
░░ An ExecStartPre= process belonging to unit mariadb.service has exited.
░░
░░ The process’ exit code is ‘exited’ and its exit status is 1.
mariadb.service: Failed with result ‘exit-code’.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support:
░░
░░ The unit mariadb.service has entered the ‘failed’ state with result ‘exit-code’.
Failed to start MariaDB database server.
░░ Subject: A start job for unit mariadb.service has failed
░░ Defined-By: systemd
░░ Support:
░░
░░ A start job for unit mariadb.service has finished with a failure.
░░
░░ The job identifier is 8559 and the job result is failed.
mariadb.service: Consumed 5.033s CPU time.
░░ Subject: Resources consumed by unit runtime
░░ Defined-By: systemd
░░ Support:
░░
░░ The unit mariadb.service completed and consumed the indicated resources. zur Diagnose wollte ich mysqld_safe ausführen, doch dies schlägt fehl wegen fehlender Rechte auf das Log-File Can’t create/write to file ‘/var/log/mysql/mysqld.log’. Ich habe mir selbst Rechte gegeben, aber es wird wohl nicht mit meinen Permissions ausgeführt. Hat jemand eine Idee, wie ich hier weiter kommen kann?
Als root:
journalctl -f
nun in einer 2. Konsole als root:
systemctl start mariadb.service
Und die neu hinzugekommenen Einträge der ersten Konsole (journactl -f) hier posten.
Benutze auch du bitte Code-Tags, siehe:
Code-Tags
- Konsole:
sudo journalctl -f
systemd[1255]: Started Konsole - Terminal.
chromium-browser[13043]: [13038:13068:0123/063333.378176:ERROR:gle_apis/gcm/engine/registration_request.cc:292] Registration response error message: DEPRECATED_ENDPOINT
systemd[1255]: Started app-org.kde.konsole-13455.scope.
sudo[13525]: pam_kwallet5(sudo:auth): pam_kwallet5: pam_sm_authenticate
sudo[13525]: pam_kwallet5(sudo:auth): pam_kwallet5: Refusing to do anything for the root user
sudo[13525]: h_gla : TTY=pts/0 ; PWD=/home/h_gla ; USER=root ; COMMAND=/usr/bin/journalctl -f
sudo[13525]: pam_kwallet5(sudo:setcred): pam_kwallet5: pam_sm_setcred
sudo[13525]: pam_unix(sudo:session): session opened for user root(uid=0) by h_gla(uid=1000)
sudo[13525]: pam_kwallet5(sudo:session): pam_kwallet5: pam_sm_open_session
sudo[13525]: pam_kwallet5(sudo:session): pam_kwallet5: Refusing to do anything for the root user
systemd[1255]: Started Konsole - Terminal.
systemd[1255]: Started app-org.kde.konsole-13547.scope.
sudo[13589]: pam_kwallet5(sudo:auth): pam_kwallet5: pam_sm_authenticate
sudo[13589]: pam_kwallet5(sudo:auth): pam_kwallet5: Refusing to do anything for the root user
sudo[13589]: h_gla : TTY=pts/5 ; PWD=/home/h_gla ; USER=root ; COMMAND=/usr/bin/systemctl start mariadb.service
sudo[13589]: pam_kwallet5(sudo:setcred): pam_kwallet5: pam_sm_setcred
sudo[13589]: pam_unix(sudo:session): session opened for user root(uid=0) by h_gla(uid=1000)
sudo[13589]: pam_kwallet5(sudo:session): pam_kwallet5: pam_sm_open_session
sudo[13589]: pam_kwallet5(sudo:session): pam_kwallet5: Refusing to do anything for the root user
systemd[1]: Starting MariaDB database server…
(d-helper)[13596]: mariadb.service: Failed to set up mount namespacing: /home/mysql: No such file or directory
sudo[13589]: pam_unix(sudo:session): session closed for user root
(d-helper)[13596]: mariadb.service: Failed at step NAMESPACE spawning /usr/libexec/mysql/mysql-systemd-helper: No such file or directory
sudo[13589]: pam_kwallet5(sudo:session): pam_kwallet5: pam_sm_close_session
systemd[1]: mariadb.service: Control process exited, code=exited, status=226/NAMESPACE
sudo[13589]: pam_kwallet5(sudo:setcred): pam_kwallet5: pam_sm_setcred
systemd[1]: mariadb.service: Failed with result ‘exit-code’.
systemd[1]: Failed to start MariaDB database server.
systemd[1255]: Started Geany - Integrierte Entwicklungsumgebung.
kded6[1440]: Registering “:1.120/StatusNotifierItem” to system tray
kded6[1440]: Service “:1.120” unregistered
geany[13621]: Failed to load cookie file from cookie: Keine Berechtigung
rtkit-daemon[1433]: Successfully made thread 13793 of process 13667 owned by ‘1000’ RT at priority 5.
systemd[1255]: Started VTE child process 13859 launched by geany process 13621.
rtkit-daemon[1433]: Successfully made thread 13889 of process 13865 owned by ‘1000’ RT at priority 5.
rtkit-daemon[1433]: Successfully made thread 13909 of process 13865 owned by ‘1000’ RT at priority 5.
chromium-browser[13043]: [13038:13068:0123/063522.462571:ERROR:gle_apis/gcm/engine/registration_request.cc:292] Registration response error message: DEPRECATED_ENDPOINT
kwin_x11[1441]: XCB error: 152 (BadDamage), sequence: 1088, resource id: 10544584, major code: 143 (DAMAGE), minor code: 2 (Destroy)
kwin_x11[1441]: XCB error: 3 (BadWindow), sequence: 1089, resource id: 33554489, major code: 129 (SHAPE), minor code: 6 (Input)
chromium-browser[13043]: [13038:13068:0123/063846.257866:ERROR:gle_apis/gcm/engine/registration_request.cc:292] Registration response error message: DEPRECATED_ENDPOINT
- Konsole:
sudo systemctl start mariadb.service
Job for mariadb.service failed because the control process exited with error code.
See “systemctl status mariadb.service” and “journalctl -xeu mariadb.service” for details.
Danke für die Unterstützung!
Hello Philipp, thanks for support. It’s the actual (new) Tumbleweed installation. The initial installation of MariaDB has the same failure. After some tests i had do a complete remove of MariaDB and has done a new Installation. But the Failure was the same.
sudo sestatus
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: enforcing
Mode from config file: enforcing
Policy MLS status: enabled
Policy deny_unknown status: allowed
Memory protection checking: actual (secure)
Max kernel policy version: 35
Ich habe gerade noch im Journal gesehen, dass es Fehler mit den Verzeichnissen gibt:
/home/mySQL → no such file or directory
/usr/libexec/mysql/mysql-systemd-helper: no such file …
Es kann natürlich sein, dass nur das YAST2 Journal von irgendwelchen anderen Pfaden ausgeht. Denn ein Helper Verzeichnis gibt es definitiv. Ich kenn jedoch die Standard-Verzeichnisse von MariaDB nicht …
(d-helper)[13596]: mariadb.service: Failed at step NAMESPACE spawning /usr/libexec/mysql/mysql-systemd-helper: No such file or directory
Hast du denn mal geschaut, ob die Datei vorhanden ist:
ls -alZ /usr/libexec/mysql/mysql-systemd-helper
Sollte eigentlich, da in mariadb vorhanden:
stephan@linux64:~> rpm -ql https://download.opensuse.org/tumbleweed/repo/oss/x86_64/mariadb-11.8.5-3.1.x86_64.rpm | grep -i mysql-systemd-helper
/usr/libexec/mysql/mysql-systemd-helper
Ansonsten hier mal zu selinux nachlesen:
Kannst du mal versuchen:
setenforce 0
systemctl start mariadb.service
systemctl status mariadb.service
Startet mariadb jetzt?
Wenn ja:
systemctl stop mariadb.service
setenforce 1
systemctl start mariadb.service
systemctl status mariadb.service
Startet mariadb immer noch?
Die Datei ist definitiv vorhanden:
-rwxr-xr-x. 1 root root 6763 18. Dez 15:29 /usr/libexec/mysql/mysql-systemd-helper
mariadb.service: Failed to set up mount namespacing: /home/mysql: No such file or directory
Systemd soll beim Start vom Dienst MariaDB.service einen sogenannten “mount namespace” mit dem Verzeichnis /home/mysql erstellen. Entweder existiert dieses Home-Verzeichnis nicht, oder ein LSM (Linux Security Module) à la SELinux, AppArmor blockiert diese Aktion. Oder auf diesem Rechner ist das Erstellen eines “mount namespace” nicht gestattet.
Bitte in Zukunft nur die Logbucheinträge von mariadb.service veröffentlichen:
# journalctl -f -u mariadb.service
Ein “mount namespace” unter /home für einen Systemd-Dienst geht sowieso in die Kategorie “dumme Idee”. In Kombination mit einem Eintrag “ProtectHome” in der mariadb.service geht das hoffentlich ziemlich schief!
https://docs.arbitrary.ch/security/systemd.html#
Die Datei ist definitiv vorhanden:
-rwxr-xr-x. 1 root root 6763 18. Dez 15:29 /usr/libexec/mysql/mysql-systemd-helper
sudo mariadbd --help --verbose | grep ‘log-error’ | tail -1
log-error /var/log/mysql/mysqld.log
sudo mariadbd --help --verbose | grep 'datadir' | tail -1
datadir /var/lib/mysql/
udo my_print_defaults --mysqld
--bind-address=127.0.0.1
--log-error=/var/log/mysql/mysqld.log
--secure_file_priv=/var/lib/mysql-files
--server-id=1
/var/lib/mysql :
drwx------. 1 mysql mysql 2718 21. Jan 18:42 mysql
drwx------. 1 mysql mysql 12 21. Jan 18:42 performance_schema
drwx------. 1 mysql mysql 6600 21. Jan 18:42 sys
drwx------. 1 mysql mysql 12 21. Jan 18:42 test
-rw-rw----. 1 mysql mysql 417792 21. Jan 18:42 aria_log.00000001
-rw-rw----. 1 mysql mysql 52 21. Jan 18:42 aria_log_control
-rw-rw----. 1 mysql mysql 782 21. Jan 18:42 ib_buffer_pool
-rw-rw----. 1 mysql mysql 12582912 21. Jan 18:42 ibdata1
-rw-rw----. 1 mysql mysql 100663296 21. Jan 18:42 ib_logfile0
-rw-r--r--. 1 root root 14 21. Jan 18:42 mariadb_upgrade_info
-rw-rw----. 1 mysql mysql 10485760 21. Jan 18:42 undo001
-rw-rw----. 1 mysql mysql 10485760 21. Jan 18:42 undo002
-rw-rw----. 1 mysql mysql 10485760 21. Jan 18:42 undo003
Ich weiss nicht mir welchen Credentials MySQL/MariaDB läuft, aber an der Stelle scheint was im argen zu liegen:
[Note] Starting MariaDB 11.8.5-MariaDB source revision a74edc42d080a73e20d5d94e1dd5beea400b507c server_uid YAXvigYvu1dqkC6Cf8mjXJqGOCk= as process 32675
[ERROR] mysqld: File '/var/lib/mysql/aria_log_control' not found (Errcode: 13 "Permission denied")
[ERROR] mysqld: Got error 'Can't open file' when trying to use aria control file '/var/lib/mysql/aria_log_control'
[ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
[ERROR] InnoDB: Operating system error number 13 in a file operation.
[ERROR] InnoDB: The error means mariadbd does not have the access rights to the directory.
[ERROR] InnoDB: os_file_get_status() failed on './ibdata1'. Can't determine file permissions
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
[Note] Plugin 'FEEDBACK' is disabled.
[Note] Plugin 'wsrep-provider' is disabled.
[ERROR] Could not open mysql.plugin table: "Table 'mysql.plugin' doesn't exist". Some plugins may be not loaded
[ERROR] Failed to initialize plugins.
[ERROR] Aborting
[Note] Starting MariaDB 11.8.5-MariaDB source revision a74edc42d080a73e20d5d94e1dd5beea400b507c server_uid YAXvigYvu1dqkC6Cf8mjXJqGOCk= as process 33035
[ERROR] mysqld: File '/var/lib/mysql/aria_log_control' not found (Errcode: 13 "Permission denied")
[ERROR] mysqld: Got error 'Can't open file' when trying to use aria control file '/var/lib/mysql/aria_log_control'
[ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
[ERROR] InnoDB: Operating system error number 13 in a file operation.
[ERROR] InnoDB: The error means mariadbd does not have the access rights to the directory.
[ERROR] InnoDB: os_file_get_status() failed on './ibdata1'. Can't determine file permissions
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
[Note] Plugin 'FEEDBACK' is disabled.
[Note] Plugin 'wsrep-provider' is disabled.
[ERROR] Could not open mysql.plugin table: "Table 'mysql.plugin' doesn't exist". Some plugins may be not loaded
[ERROR] Failed to initialize plugins.
[ERROR] Aborting
Es gibt da auch ein Verzeichnis */var/lib/mysql/mysql * mit Tabellen drin:
Die Datei ist definitiv vorhanden:
-rwxr-xr-x. 1 root root 6763 18. Dez 15:29 /usr/libexec/mysql/mysql-systemd-helper
sudo mariadbd --help --verbose | grep ‘log-error’ | tail -1
log-error /var/log/mysql/mysqld.log
sudo mariadbd --help --verbose | grep 'datadir' | tail -1
datadir /var/lib/mysql/
udo my_print_defaults --mysqld
--bind-address=127.0.0.1
--log-error=/var/log/mysql/mysqld.log
--secure_file_priv=/var/lib/mysql-files
--server-id=1
/var/lib/mysql :
drwx------. 1 mysql mysql 2718 21. Jan 18:42 mysql
drwx------. 1 mysql mysql 12 21. Jan 18:42 performance_schema
drwx------. 1 mysql mysql 6600 21. Jan 18:42 sys
drwx------. 1 mysql mysql 12 21. Jan 18:42 test
-rw-rw----. 1 mysql mysql 417792 21. Jan 18:42 aria_log.00000001
-rw-rw----. 1 mysql mysql 52 21. Jan 18:42 aria_log_control
-rw-rw----. 1 mysql mysql 782 21. Jan 18:42 ib_buffer_pool
-rw-rw----. 1 mysql mysql 12582912 21. Jan 18:42 ibdata1
-rw-rw----. 1 mysql mysql 100663296 21. Jan 18:42 ib_logfile0
-rw-r--r--. 1 root root 14 21. Jan 18:42 mariadb_upgrade_info
-rw-rw----. 1 mysql mysql 10485760 21. Jan 18:42 undo001
-rw-rw----. 1 mysql mysql 10485760 21. Jan 18:42 undo002
-rw-rw----. 1 mysql mysql 10485760 21. Jan 18:42 undo003
Ich weiss nicht mir welchen Credentials MySQL/MariaDB läuft, aber an der Stelle scheint was im argen zu liegen:
[Note] Starting MariaDB 11.8.5-MariaDB source revision a74edc42d080a73e20d5d94e1dd5beea400b507c server_uid YAXvigYvu1dqkC6Cf8mjXJqGOCk= as process 32675
[ERROR] mysqld: File '/var/lib/mysql/aria_log_control' not found (Errcode: 13 "Permission denied")
[ERROR] mysqld: Got error 'Can't open file' when trying to use aria control file '/var/lib/mysql/aria_log_control'
[ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
[ERROR] InnoDB: Operating system error number 13 in a file operation.
[ERROR] InnoDB: The error means mariadbd does not have the access rights to the directory.
[ERROR] InnoDB: os_file_get_status() failed on './ibdata1'. Can't determine file permissions
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
[Note] Plugin 'FEEDBACK' is disabled.
[Note] Plugin 'wsrep-provider' is disabled.
[ERROR] Could not open mysql.plugin table: "Table 'mysql.plugin' doesn't exist". Some plugins may be not loaded
[ERROR] Failed to initialize plugins.
[ERROR] Aborting
[Note] Starting MariaDB 11.8.5-MariaDB source revision a74edc42d080a73e20d5d94e1dd5beea400b507c server_uid YAXvigYvu1dqkC6Cf8mjXJqGOCk= as process 33035
[ERROR] mysqld: File '/var/lib/mysql/aria_log_control' not found (Errcode: 13 "Permission denied")
[ERROR] mysqld: Got error 'Can't open file' when trying to use aria control file '/var/lib/mysql/aria_log_control'
[ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
[ERROR] InnoDB: Operating system error number 13 in a file operation.
[ERROR] InnoDB: The error means mariadbd does not have the access rights to the directory.
[ERROR] InnoDB: os_file_get_status() failed on './ibdata1'. Can't determine file permissions
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
[Note] Plugin 'FEEDBACK' is disabled.
[Note] Plugin 'wsrep-provider' is disabled.
[ERROR] Could not open mysql.plugin table: "Table 'mysql.plugin' doesn't exist". Some plugins may be not loaded
[ERROR] Failed to initialize plugins.
[ERROR] Aborting
Es gibt da auch ein Verzeichnis */var/lib/mysql/mysql * mit Tabellen drin. Das im log angemeckerte file aria_log_control existiert genau dort, also fehlen vermutlich irgendwelche Permissions. Wobei die Schreibweise auch komisch aussieht ein Unterstrich gefolgt von einem Leerzeichen mitten im Dateinamen.
Es startet noch nicht, auch nicht mit setenforce 0
systemctl start mariadb.service
Job for mariadb.service failed because the control process exited with error code.
See “systemctl status mariadb.service” and “journalctl -xeu mariadb.service” for details.
Bitte entschuldige, aber meine Denke ist fast 40 Jahre Wi… geprägt. Ich muss mich erst wieder an den Pinguin gewöhnen. mariadb.service ist ein Service, aber unter welchem Account/Service-Account läuft er, wenn er denn mal läuft. Gibt es in Linux auch solche Service Accounts die jedes System von Haus aus hat, wie in W… z.B. der NetworkService? Meine Frage klingt vielleicht blöd, aber wenn es an mangelnden Rechten liegt muss man ja an irgendwas (zumindest zum Test) Rechte vergeben können.
Da ist der Bugreport mit Hinweisen wie du den ganzen Bumms zum Laufen bekommen solltest:
https://bugzilla.opensuse.org/show_bug.cgi?id=1255024
Benutze bitte immer Code-Tags für Konsolenausgaben, siehe:
Code-Tags
Bitte Ausgaben von Befehlen immer incl. der kompletten Eingabezeile posten.
Denn hier sieht es mir nach dem Fehlen einer Option aus:
-rwxr-xr-x. 1 root root 6763 18. Dez 15:29 /usr/libexec/mysql/mysql-systemd-helper
Der Befehl und Ausgabe:
linux64:/home/stephan # ls -alZ /usr/libexec/mysql/mysql-systemd-helper
-rwxr-xr-x. 1 root root system_u:object_r:mysqld_systemd_helper_exec_t:s0 6661 12. Dez 16:34 /usr/libexec/mysql/mysql-systemd-helper
linux64:/home/stephan #
Hallo,
aus Post #11 vielleicht folgende Idee:
mariadb bzw. mysql braucht bei mir (openSUSE 15,6) das Verzeichnis /var/lib/mysql-files/ (Eigentümer mysql), auch wenn in der /etc/my.cnf der Eintrag datadir auf ein anderes Verzeichnis zeigt.
Vielleicht mal die my.cnf checken bzw. hochladen.
Gruß bmk555
sudo ls -alZ /usr/libexec/mysql/mysql-systemd-helper
[sudo] Passwort für root:
-rwxr-xr-x. 1 root root system_u:object_r:mysqld_systemd_helper_exec_t:s0 6763 18. Dez 15:29 /usr/libexec/mysql/mysql-systemd-helper
Das sieht bei mir genau gleich aus.
/etc/my.cnf:
#
# [mysqld1]
# port = 3306
# datadir = /var/lib/mysql
# pid-file = /var/lib/mysql/mysqld.pid
# socket = /var/lib/mysql/mysql.sock
# user = mysql
# [mysqld2]
# port = 3307
# datadir = /var/lib/mysql-databases/mysqld2
# pid-file = /var/lib/mysql-databases/mysqld2/mysql.pid
# socket = /var/lib/mysql-databases/mysqld2/mysql.sock
# user = mysql
# [mysqld3]
# port = 3308
# datadir = /var/lib/mysql-databases/mysqld3
# pid-file = /var/lib/mysql-databases/mysqld3/mysql.pid
# socket = /var/lib/mysql-databases/mysqld3/mysql.sock
# user = mysql
# [mysqld6]
# port = 3309
# datadir = /var/lib/mysql-databases/mysqld6
# pid-file = /var/lib/mysql-databases/mysqld6/mysql.pid
# socket = /var/lib/mysql-databases/mysqld6/mysql.sock
# user = mysql
!includedir /etc/my.cnf.d
Kannst du noch sagen, was du alles zu MariaDB installiert hast?