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:]
Starting MariaDB database server mysqld ..Fail!
-
- Posts: 2
- Joined: Fri May 29, 2020 3:14 am
Starting MariaDB database server mysqld ..Fail!
- Attachments
-
- Container.txt
- (35.64 KiB) Downloaded 238 times
Re: Starting MariaDB database server mysqld ..Fail!
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/
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/
Re: Starting MariaDB database server mysqld ..Fail!
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.
Re: Starting MariaDB database server mysqld ..Fail!
Hey!
May you please clarify the steps needed in order to get the container to start? i do not get how to apply linked fix on a docker run. Does fix apply for docker?
Looking forward for your help!
May you please clarify the steps needed in order to get the container to start? i do not get how to apply linked fix on a docker run. Does fix apply for docker?
Looking forward for your help!
-
- Posts: 3
- Joined: Fri Jul 20, 2018 5:17 am
Re: Starting MariaDB database server mysqld ..Fail!
You need to run the commands against the host environment. The second solution of a temporary disable did not work for me at all, but the first solution (removing the offending profile) on the host seems to have resolved the issue.
A first solution is to disable only the problematic Apparmor profile.
$ sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/
$ sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
Verify:
$ sudo aa-status