You are not logged in.

#1 2018-07-04 19:35:24

jjb2016
Member
From: Oxfordshire
Registered: 2016-02-29
Posts: 73

[SOLVED] cannot start mariadb.service inside an LXC container?

Hello folks,

I'm trying to install a new Arch Linux LXC container to run Zoneminder.  This requires a mysql server, which ideally I would like to run inside the container alongside Zoneminder.  When I try to start mariadb.service it fails and I get the following output ...

[root@zm /]# 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.
[root@zm /]# systemctl status mariadb.service
● mariadb.service - MariaDB 10.1.34 database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Wed 2018-07-04 20:28:48 BST; 9s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 5901 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=237/KEYRING)

Jul 04 20:28:48 zm systemd[1]: Starting MariaDB 10.1.34 database server...
Jul 04 20:28:48 zm systemd[5901]: mariadb.service: Failed to change ownership of session keyring: Permission denied
Jul 04 20:28:48 zm systemd[5901]: mariadb.service: Failed to set up kernel keyring: Permission denied
Jul 04 20:28:48 zm systemd[5901]: mariadb.service: Failed at step KEYRING spawning /bin/sh: Permission denied
Jul 04 20:28:48 zm systemd[1]: mariadb.service: Control process exited, code=exited status=237
Jul 04 20:28:48 zm systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jul 04 20:28:48 zm systemd[1]: Failed to start MariaDB 10.1.34 database server.
[root@zm /]#

This is an unprivileged container to which I have attached.
Can anybody offer an explanation, and hopefully a fix?

Thanks!

Last edited by jjb2016 (2018-07-05 13:50:44)

Offline

#2 2018-07-05 13:50:21

jjb2016
Member
From: Oxfordshire
Registered: 2016-02-29
Posts: 73

Re: [SOLVED] cannot start mariadb.service inside an LXC container?

Work-around provided by the LXC guys on GitHub ....

https://github.com/lxc/lxc/issues/2449

Offline

#3 2018-07-05 17:25:18

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: [SOLVED] cannot start mariadb.service inside an LXC container?

@jjb2016 - You might consider editing the lxc wiki page with this tip.

Offline

#4 2018-07-05 17:28:09

loqs
Member
Registered: 2014-03-06
Posts: 19,113

Re: [SOLVED] cannot start mariadb.service inside an LXC container?

graysky wrote:

@jjb2016 - You might consider editing the lxc wiki page with this tip.

https://wiki.archlinux.org/index.php/Li … pawning...

Offline

#5 2018-07-05 19:47:17

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: [SOLVED] cannot start mariadb.service inside an LXC container?

@loqs - Good call.
@jbb2016 - Check the wiki first next time ;D

Offline

Board footer

Powered by FluxBB