Git Product home page Git Product logo

Comments (14)

alexyao2015 avatar alexyao2015 commented on September 24, 2024

It should work. You just need to ensure it's reachable and the database name is configured correctly

from zoneminder-base.

bhcopeland avatar bhcopeland commented on September 24, 2024
db_1          | Version: '10.5.13-MariaDB-log'  socket: '/run/mysqld/mysqld.sock'  port: 3306  MariaDB Server
zoneminder_1  | [zoneminder-service] 2021-12-14 11:27:22.462442083 INFO Waiting for mariadb-configure to complete...
zoneminder_1  | [mariadb] 2021-12-14 11:27:22.474001021 INFO Mariadb is up! Proceeding to monitoring.
zoneminder_1  | [mariadb-configure] 2021-12-14 11:27:22.660266427 FIRSTRUN Creating ZoneMinder db for first run
db_1          | 2021-12-14 11:27:23 0 [Note] mysqld (initiated by: root[root] @ localhost []): Normal shutdown
db_1          | 2021-12-14 11:27:23 0 [Note] Event Scheduler: Purging the queue. 0 events
zoneminder_1  | ERROR 2013 (HY000) at line 245: Lost connection to MySQL server during query
zoneminder_1  | 2021-12-14 11:27:40.196054629  listening on /dev/log, gid=65534, uid=65534, starting.
zoneminder_1  | [mariadb-configure] 2021-12-14 11:27:40.261264486 INFO Configuring ZoneMinder Email From Address...
zoneminder_1  | [mariadb-configure] 2021-12-14 11:27:40.293769154 INFO Applying db changes...
zoneminder_1  | [mariadb-configure] 2021-12-14 11:27:40.407460595 INFO Upgrading db if necessary
zoneminder_1  | Please give a valid option
zoneminder_1  | [mariadb-configure] 2021-12-14 11:27:42.240839099 INFO Usage:
zoneminder_1  | [mariadb-configure] 2021-12-14 11:27:42.256958204 INFO zmupdate.pl -c,--check | -f,--freshen | -v<version>,--version=<version>
zoneminder_1  | [mariadb-configure] 2021-12-14 11:27:42.268879224 INFO [-u <dbuser> -p <dbpass>]
zoneminder_1  | [mariadb-configure] 2021-12-14 11:27:42.288811359 INFO 

Then when you log into the database on the linuxserver/mariadb image:

MariaDB [zm]> show tables;
+----------------+
| Tables_in_zm   |
+----------------+
| Config         |
| ControlPresets |
| Controls       |
| Devices        |
| Events         |
| Events_Day     |
| Events_Hour    |
+----------------+
7 rows in set (0.003 sec)

from zoneminder-base.

alexyao2015 avatar alexyao2015 commented on September 24, 2024

Seems like you're getting zmupdate.pl errors? That should not be happening and non of the tests are showing that error. What version of this image are you using?

from zoneminder-base.

bhcopeland avatar bhcopeland commented on September 24, 2024

I am using latest

-    image: mariadb
+    image: linuxserver/mariadb

And

ghcr.io/zoneminder-containers/zoneminder-base   latest    6ba79c2134c1
linuxserver/mariadb                             latest    047a070a1cbf

from zoneminder-base.

alexyao2015 avatar alexyao2015 commented on September 24, 2024

Have you tried clearing all data?

from zoneminder-base.

bhcopeland avatar bhcopeland commented on September 24, 2024

Yeah, all data cleared (zm folder/new containers)

P.s. I have tried it on my x86 box and it works. Although it did do similar moans, however on my RPI it gets stuck in a restart loop

from zoneminder-base.

alexyao2015 avatar alexyao2015 commented on September 24, 2024

Why don't you try running a stable release? Not sure what could be the issue given that this issue is not reproducible

from zoneminder-base.

bhcopeland avatar bhcopeland commented on September 24, 2024

The issue is reproducible on a RPI (armv7).

What is the stable release? On MariaDB?

MariaDB loads fine by its self, the issue seems to be with zoneminder crashing.

from zoneminder-base.

alexyao2015 avatar alexyao2015 commented on September 24, 2024

Please read the readme again

from zoneminder-base.

connortechnology avatar connortechnology commented on September 24, 2024

10-zoneminder-config.sh line 12, perhaps we should check the return code to see if it succeeded.

@bhcopeland 's db has not been fully populated. Can we check mariadb logs to see why it crashed?

The complain from zmupdate is weird. Looking in rootfs/etc/services.d/mariadb-configure/run
s6-setuidgid www-data /usr/bin/zmupdate.pl -nointeractive | info
looks fine to me, but maybe not? I don't know anything about s6-setuidgid but maybe it isn't passing the command line correctly. I don't see why there would be any difference to this between x86/arm

from zoneminder-base.

alexyao2015 avatar alexyao2015 commented on September 24, 2024

All of this is working fine in automated tests which are run nightly. None of those errors are coming up and those scripts haven't been changed. Not sure what's going on here besides it not running a release version

from zoneminder-base.

alexyao2015 avatar alexyao2015 commented on September 24, 2024

I decided to see if I could reproduce it with the linuxserver image. It appears that this container brings up mariadb before the db is actually created on initial startup, which IMO is a bug with the container. I'll see if I can build in a workaround to check if the database exists before doing anything. Some other errors come up post that issue, but not sure what the solution for that is.

@connortechnology Any ideas with this?

ERROR 1419 (HY000) at line 3 in file: '/usr/share/zoneminder/db/triggers.sql': You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)

from zoneminder-base.

connortechnology avatar connortechnology commented on September 24, 2024

Don't you kinda HAVE to bring up mariadb before creating the db?! Anyways...

Anything involving triggers is problematic with the default setup of mysql. You can turn off binlogging entirely (which is what I do) or do: set global log_bin_trust_function_creators=1;
Or perform the update as root. zmupdate.pl -s does this. The easiest for our purposes might be to just add the -s to the zmupdate.pl call.

from zoneminder-base.

alexyao2015 avatar alexyao2015 commented on September 24, 2024

It appeared that linuxserver brings the db up during init, then shuts it down, and starts it again using a service. This causes the db to be temporarily up and resulted in a false start of init scripts.

The official mariadb images set skip-log-bin by default while linuxserver does not...

from zoneminder-base.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.