How to fix Failed to start MariaDB error “Failed at step NAMESPACE spawning /bin/sh: Invalid argument”

How to fix Failed to start MariaDB error “Failed at step NAMESPACE spawning /bin/sh: Invalid argument”

Recently on a VPS running Cyberpanel, MariaDB service failed with the error: Failed at step NAMESPACE spawning / bin / sh: Invalid argument

MobaXterm Personal 20.3 blIgpeMj5p - How to fix  Failed to start MariaDB error "Failed at step NAMESPACE spawning /bin/sh: Invalid argument"

For VPS based on the openvz that are using old kernel you need to edit the service file to fix the problem:

nano /usr/lib/systemd/system/mariadb.service

Find the following value PrivateDevices = true and comment it by putting # before it so that it does not run.

MobaRTE MvUzCAjx5n - How to fix  Failed to start MariaDB error "Failed at step NAMESPACE spawning /bin/sh: Invalid argument"

Afterwards, run the following commands:

systemctl daemon-reload

and to start mariadb:

service mariadb stop
service mariadb start

then check its status:

MobaXterm Personal 20.3 kTwOWgWAbG 1024x252 - How to fix  Failed to start MariaDB error "Failed at step NAMESPACE spawning /bin/sh: Invalid argument"

whoami
Stefan Pejcic
Join the discussion

I enjoy constructive responses and professional comments to my posts, and invite anyone to comment or link to my site.