Starting MariaDB database server mysqld ..Fail!

Support for the docker image maintained by dlandon
Post Reply
fatman_000
Posts: 1
Joined: Fri May 29, 2020 3:14 am

Starting MariaDB database server mysqld ..Fail!

Post by fatman_000 » Fri May 29, 2020 4:01 am

Hi All,

Long time Zoneminder user but wanting to leverage the awesome work on event notification server and wanted to give this container image a go. Unfortunately I can't get it to work, despite retrying using a copy and paste of the commands off the git page. I've attached full log and below snap show of command i used and logs. Any pointers most appreciated. I am running Docker on Ubuntu 20.04 server


docker pull dlandon/zoneminder

docker run -d --name="Zoneminder" \
--net="bridge" \
--privileged="true" \
-p 8443:443/tcp \
-p 9000:9000/tcp \
-e TZ="America/New_York" \
-e SHMEM="50%" \
-e PUID="99" \
-e PGID="100" \
-e INSTALL_HOOK="0" \
-e INSTALL_FACE="0" \
-e INSTALL_TINY_YOLO="0" \
-e INSTALL_YOLO="0" \
-e MULTI_PORT_START="0" \
-e MULTI_PORT_END="0" \
-v "/mnt/Zoneminder":"/config":rw \
-v "/mnt/Zoneminder/data":"/var/cache/zoneminder":rw \
dlandon/zoneminder



Event Server version: '5.13-Docker'.


Using existing ssmtp folder


Using existing mysql database folder


Copy /config/control/ scripts to /usr/share/perl5/ZoneMinder/Control/


Copy /config/conf/ scripts to /etc/zm/conf.d/


Creating symbolink links


chmod: cannot access '/config/control/*': No such file or directory


Using existing data directory for events


Using existing data directory for images


Using existing data directory for temp


Using existing data directory for cache


Correcting /var/cache/zoneminder/cache permissions...


no crontab for root


Setting shared memory to : 50% of 32888968 bytes


Starting services...


* Starting MariaDB database server mysqld


...fail!


DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at /usr/share/perl5/ZoneMinder/Database.pm line 110.


DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at /usr/share/perl5/ZoneMinder/Database.pm line 110.


May 28 19:15:04 901612a4391a zmupdate[12429]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) error val:]


DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at /usr/share/perl5/ZoneMinder/Database.pm line 110.


May 28 19:15:04 901612a4391a zmupdate[12429]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) error val:]
Attachments
Container.txt
(35.64 KiB) Downloaded 20 times

chooch
Posts: 2
Joined: Mon Jun 01, 2020 11:16 pm

Re: Starting MariaDB database server mysqld ..Fail!

Post by chooch » Mon Jun 01, 2020 11:22 pm

Same thing here. The container cannot start MariaDB and exits.
I've been running this image for close to a year without too much trouble. I did install native apache2 and mariadb on this host a couple days again. I assume that broke it? But Docker is suppose to keep that separate, right?

Edit 6/2/2020 -- I followed the guide below to fix a problem with apparmor stopping mariadb:
https://mariadb.com/kb/en/the-community ... -when-try/

chooch
Posts: 2
Joined: Mon Jun 01, 2020 11:16 pm

Re: Starting MariaDB database server mysqld ..Fail!

Post by chooch » Wed Jun 03, 2020 1:46 am

Edited my post with link that fixed it for me. Something in a recent ubuntu upgrade broke mariadb/apparmor. Manually disabling apparmor's mysqld profile and rebooting worked. Just restarting apparmor did not work for me, had to reboot.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest