Score:0

Mariadb 10.3 on Debian 10 won't start anymore -

bo flag

on one of my servers there are Mariadb which stops with following status:

● mariadb.service - MariaDB 10.3.31 database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2022-05-01 08:43:33 CEST; 9s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 7287 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=1/FAILURE)
      CPU: 4ms

May 01 08:43:33 zabbix systemd[1]: Starting MariaDB 10.3.31 database server...
May 01 08:43:33 zabbix sh[7287]: Failed to set environment: Access denied
May 01 08:43:33 zabbix systemd[1]: mariadb.service: Control process exited, code=exited, status=1/FAILURE
May 01 08:43:33 zabbix systemd[1]: mariadb.service: Failed with result 'exit-code'.
May 01 08:43:33 zabbix systemd[1]: Failed to start MariaDB 10.3.31 database server.

Everything was fine to yesterday. Mysql error logs is empty and this is only output which I have for now. There are a lot of disk space and RAM, so it shouldn't be a problem. Can someone help to resolve this issue ?

in flag
Read the error log. Increase log verbosity if necessary.
bo flag
but process of mysql is failed, so it won't log propably anything. Last line is ` mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended `
Nikita Kipriyanov avatar
za flag
> `May 01 08:43:33 zabbix sh[7287]: Failed to set environment: Access denied` What access? Check permissions and owners of all objects in the directory tree `/var/lib/mysql`, and also log directory/files worth checking. Also what if you start `mysqld-safe` from the root terminal, will it start and serve clients?
bo flag
mysqld_safe started db but is it safety? Permissions to all files is set for mysql user proper
Nikita Kipriyanov avatar
za flag
E.g. it successfully started by hand? Then that's a problem with the service manager. I doubt it has been broken "by itself". Likely there were some actions with the server: installation, configuration, unsafe resets, and so on. Can you please describe what *your* (or other administrator's) actions were immediately before it was broken?
bo flag
No one use this server for few days, it happens late at night. Stats for config files isn't touched for few weeks when DB was created/updated. Maybe systemd is problem or this line about `ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION`
A.B avatar
cl flag
A.B
When running this line (unset-environment ...) from an unprivileged user the same error happens. So are you running in a special environment that drops privileges (container...)? Not having the line `PermissionsStartOnly=true` (which is present in default installation) would probably get this result too.
A.B avatar
cl flag
A.B
So `systemctl cat mariadb` added in the question would be a good idea, especially if there was snippet added which isn't provided by Debian.
bo flag
`PermissionsStartOnly` is set to true. Set this line to false? Yes I'm using unprivleged container. Or maybe comment line about `unset-environment` ?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.