Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MariaDB Fails to Start #91

Closed
keco185 opened this issue Apr 22, 2020 · 5 comments
Closed

MariaDB Fails to Start #91

keco185 opened this issue Apr 22, 2020 · 5 comments

Comments

@keco185
Copy link

keco185 commented Apr 22, 2020

I'm pulled this as a brand new docker container today but when running it the container failed when trying to start MariaDB. Looking at the sql log file I found this:

mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
[Note] /usr/sbin/mysqld (mysqld 10.1.44-MariaDB-0ubuntu0.18.04.1) starting as process 783 ...
[Warning] Can't create test file /var/lib/mysql/f96e9e1740ad.lower-test
[ERROR] mysqld: File '/var/lib/mysql/aria_log_control' not found (Errcode: 13 "Permission denied")
[ERROR] mysqld: Got error 'Can't open file' when trying to use aria control file '/var/lib/mysql/aria_log_control'
[ERROR] Plugin 'Aria' init function returned error.
[ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
...

When I checked the permissions for /var/lib/mysql they looked fine...

drwxr-xr-x 1 mysql mysql 4096 Apr 3 21:00 mysql

Here is my run configuration if it matters: (yes /disk2/zoneminder/ exists)

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

@keco185
Copy link
Author

keco185 commented Apr 27, 2020

Removing --privileged="true" seems to fix the issue. Not sure if there are any negative ramifications to removing that parameter though...

@proffalken
Copy link

A nicer fix for this would be to be able to set the MySQL params as part of the ENV vars - I already have MySQL running on my local network, it feels a bit odd to have to run another dedicated MySQL server in this instance as well.

Perhaps something like

MYSQL_SERVER=
MYSQL_DATABASE=
MYSQL_USER=
MYSQL_PASSWD=

Or similar?

@dlandon
Copy link
Owner

dlandon commented May 4, 2020

You can do this through the zm.default file in the conf/ folder.

@proffalken
Copy link

Ah, ok, thanks

@Kosh42
Copy link

Kosh42 commented Jul 12, 2020

Removing --privileged="true" seems to fix the issue. Not sure if there are any negative ramifications to removing that parameter though...

Worked for me too. Many thanks for the heads up. But like you, in the dark as to what it mean and if its a bad thing or not?

@dlandon dlandon closed this as completed Jan 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants