You are not logged in.
Pages: 1
I was working in a project where I need a local database and I decided to use mariadb. I installed it following the arch wiki and everything worked fine. That was like a week ago. This morning I have reinstalled using pacman -S mariadb and I couldn't make it work again. I have tried to unistall it using pacman -Rns mariadb and following again the arch wiki, but it does not seem to work. The problem comes when I try to start the mariadb.service:
systemctl start mariadb.service
---
Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.
systemctl status mariadb.service
---
● mariadb.service - MariaDB 10.1.36 database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendo>
Drop-In: /etc/systemd/system/mariadb.service.d
└─mariadb.conf
Active: failed (Result: exit-code) since Sat 2018-09-29 22:42:11 CEST; >
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Main PID: 1996 (code=exited, status=203/EXEC)
And executinc journalcl -xe I can't se anything related to mariadb.
Thanks!
EDIT 1
sudo journalctl _PID=1996
---
-- Logs begin at Sat 2018-08-25 13:14:09 CEST, end at Sat 2018-09-29 23:10:13 CEST. --
Sep 29 22:42:11 leonardo systemd[1996]: mariadb.service: Failed to execute command: No such file or directory
Sep 29 22:42:11 leonardo systemd[1996]: mariadb.service: Failed at step EXEC spawning /usr/bin/numactl: No such file or directory
EDIT 2
systemctl cat mariadb.service
---
# /usr/lib/systemd/system/mariadb.service
#
# /etc/systemd/system/mariadb.service
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# Thanks to:
# Daniel Black
# Erkan Yanar
# David Strauss
# and probably others
[Unit]
Description=MariaDB 10.1.36 database server
Documentation=man:mysqld(8)
Documentation=https://mariadb.com/kb/en/library/systemd/
After=network.target
After=syslog.target
[Install]
WantedBy=multi-user.target
[Service]
##############################################################################
## Core requirements
##
Type=notify
# Setting this to true can break replication and the Type=notify settings
# See also bind-address mysqld option.
PrivateNetwork=false
##############################################################################
## Package maintainers
##
User=mysql
Group=mysql
# To allow memlock to be used as non-root user if set in configuration
CapabilityBoundingSet=CAP_IPC_LOCK
# Prevent writes to /usr, /boot, and /etc
ProtectSystem=full
# Doesn't yet work properly with SELinux enabled
# NoNewPrivileges=true
PrivateDevices=true
# Prevent accessing /home, /root and /run/user
ProtectHome=true
# Execute pre and post scripts as root, otherwise it does it as User=
PermissionsStartOnly=true
# Perform automatic wsrep recovery. When server is started without wsrep,
# galera_recovery simply returns an empty string. In any case, however,
# the script is not expected to return with a non-zero status.
# It is always safe to unset _WSREP_START_POSITION environment variable.
# Do not panic if galera_recovery script is not available. (MDEV-10538)
ExecStartPre=/bin/sh -c "systemctl unset-environment _WSREP_START_POSITION"
ExecStartPre=/bin/sh -c "[ ! -e /usr/bin/galera_recovery ] && VAR= || \
VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] \
&& systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1"
# Needed to create system tables etc.
# ExecStartPre=/usr/bin/mysql_install_db -u mysql
# Start main service
# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb.service.d/MY_SPECIAL.conf
# Use the [Service] section and Environment="MYSQLD_OPTS=...".
# This isn't a replacement for my.cnf.
# _WSREP_NEW_CLUSTER is for the exclusive use of the script galera_new_cluster
ExecStart=/usr/bin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION
# Unset _WSREP_START_POSITION environment variable.
ExecStartPost=/bin/sh -c "systemctl unset-environment _WSREP_START_POSITION"
KillSignal=SIGTERM
# Don't want to see an automated SIGKILL ever
SendSIGKILL=no
# Restart crashed server only, on-failure would also restart, for example, when
# my.cnf contains unknown option
Restart=on-abort
RestartSec=5s
UMask=007
##############################################################################
## USERs can override
##
##
## by creating a file in /etc/systemd/system/mariadb.service.d/MY_SPECIAL.conf
## and adding/setting the following under [Service] will override this file's
## settings.
# Useful options not previously available in [mysqld_safe]
# Kernels like killing mysqld when out of memory because its big.
# Lets temper that preference a little.
# OOMScoreAdjust=-600
# Explicitly start with high IO priority
# BlockIOWeight=1000
# If you don't use the /tmp directory for SELECT ... OUTFILE and
# LOAD DATA INFILE you can enable PrivateTmp=true for a little more security.
PrivateTmp=true
##
## Options previously available to be set via [mysqld_safe]
## that now needs to be set by systemd config files as mysqld_safe
## isn't executed.
##
# Number of files limit. previously [mysqld_safe] open-file-limit
LimitNOFILE=16364
# Maximium core size. previously [mysqld_safe] core-file-size
# LimitCore=
# Nice priority. previously [mysqld_safe] nice
# Nice=-5
# Timezone. previously [mysqld_safe] timezone
# Environment="TZ=UTC"
# Library substitutions. previously [mysqld_safe] malloc-lib with explicit paths
# (in LD_LIBRARY_PATH) and library name (in LD_PRELOAD).
# Environment="LD_LIBRARY_PATH=/path1 /path2" "LD_PRELOAD=
# Flush caches. previously [mysqld_safe] flush-caches=1
# ExecStartPre=sync
# ExecStartPre=sysctl -q -w vm.drop_caches=3
# numa-interleave=1 equalivant
# Change ExecStart=numactl --interleave=all /usr/bin/mysqld......
# crash-script equalivent
# FailureAction=
# /etc/systemd/system/mariadb.service.d/mariadb.conf
[Service]
ExecStart=
ExecStart=/usr/bin/numactl --interleave=all /usr/sbin/mysqld ${MYSQLD_OPTS} ${_WSREP_NEW_CLUSTER} ${_WSREP_START_POSITION}
ProtectHome=false
Last edited by edoelas (2019-02-17 12:02:52)
Offline
Pacman is your package manager...
Post the output of `journalctl _PID=1996` (or whatever mariadb is now) and don't truncate the output as you have done above.
Offline
I have edited the main post in order to keep all organized and discovered that journal -xe was not showing anything due to that I was not runing it with sudo.
PD: do you know how can I insert inline code?
Offline
What is the output of
systemctl cat mariadb.service
Offline
I have edited the first post.
Thanks!
Offline
Who or what created /etc/systemd/system/mariadb.service.d/mariadb.conf which added the use of numactl?
Offline
I supose I'm the one who has done that (due to that im the only one with acces to this system) while trying to install fresh rss.
Offline
If you remove the /etc/systemd/system/mariadb.service.d/mariadb.conf drop in override does mariadb start correctly then?
Offline
I'm not sure what does the part of "drop in override" mean and I do not want to make my situation worst (my english is preatty poor). Could you explain me what exactly should I do? Just remove the /etc/systemd/system/mariadb.service.d/mariadb.conf or something more?
PD: How can I stop the mariadb.service without restarting the computer? systemctl stop mariadb.service and systemctl stop mariadb.service do not seem to work.
Last edited by edoelas (2018-09-29 20:32:23)
Offline
I'm not sure what does the part of "drop in override" mean and I do not want to make my situation worst (my english is preatty poor). Could you explain me what exactly should I do? Just remove the /etc/systemd/system/mariadb.service.d/mariadb.conf or something more?
`man systemd.unit` explains the drop- in overrides. Remove /etc/systemd/system/mariadb.service.d/mariadb.conf then `systemctl daemon-reload` so systemd will reload the service file see also man systemctl.
PD: How can I stop the mariadb.service without restarting the computer? systemctl stop mariadb.service and systemctl stop mariadb.service do not seem to work.
What do you mean do not seem to work?
Edit:
From Systemd#Drop-in_files
systemctl revert unit
Last edited by loqs (2018-09-29 20:51:03)
Offline
THANK YOU!!! Now it seems to work.
I tried to mean that if I ran systemctl I still could see the mariadb row in red color.
Offline
Pages: 1