[support] dlandon - Zoneminder 1.36


Recommended Posts

I just want to say thanks for taking the time to work on this project. I was hoping you could help me with one error I am getting. I am trying to get face recognition working. I added a photo to the known faces folder and ran training. a faces.dat file was created in the folder but when I check the logs I see this

Quote

2020-07-25 21:09:27zmesdetect_m232242ERRError loading KNN model: [Errno 2] No such file or directory: '/var/lib/zmeventnotification/known_faces/faces.dat'face.py64

2020-07-25 21:09:27zmesdetect_m232242ERRNo known faces found to train, encoding file not createdface_train.py116

Hope you can point me in the right direction I currently have person detection working.

Link to comment

@dlandon: I just wanted to leave you some quick feedback on the "1.35 master branch" of ZM.

 

I upgraded the old 1.34 docker and followed the "Breaking changes" from pliable pixels to get eventserver working again. Have been running it for a week now, seems just as stable as 1.34 :). So thank you for supporting the master branch so that it is possible to follow the development and as a bonus beta test upcoming features.

Edited by Sic79
Link to comment

Does anyone have a nginx conf file they can share that's working? Currently I'm using the following that works but not when it comes to notifications via ZMNinja:

 

# make sure that your dns has a cname set for zoneminder or zm or cctv

 

server {

    listen 443 ssl;

    listen [::]:443 ssl;

    server_name zoneminder.*;

    include /config/nginx/ssl.conf;

    client_max_body_size 0;

    location /zm {

        include /config/nginx/proxy.conf;

        proxy_pass https://IPADDRESSOFYOURSERVER:8443/zm;

    }

}

 

I believe it doesn't work since the ES engine works on port 9000 (which I have configured on my router) and via wss/ which I believe needs to be added to the conf file.

 

Hoping someone can share what they have working. Thanks!

Link to comment

@dlandon thank you for your prompt reply. i did follow the guide. Created the 99-.conf file but i kept getting an error saying it cant connect to mariadb

I created a linuxserver/mariadb to connect to it.

The question was more about do i have to create a separate network and use network_mode: network etc..

I just cant get it to work.

 

reason i want to try an external db, it's because i'm having problems with the internal db. First run it runs fine. Then overnight it crashes and cant connect. Did a bit of reading and I believe i tracked it to adding TZ in the docker as well as ensuring it's aligned in options>settings.

That seemed to fix it. But now i have another problem:

Aug 6 15:31:28 UNRAID web_php[2319]: ERR [SQL-ERR 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'DESC limit 20' at line 1', statement was 'SELECT `Id`, `MonitorId`, `Name`, `Cause`, `Notes`, `StartTime`, date_format( StartTime, '%y/%m/%d %H:%i:%S' ) as StartTimeShort, `EndTime`, `Width`, `Height`, `Length`, `Frames`, `AlarmFrames`, `TotScore`, `AvgScore`, `MaxScore` FROM Events WHERE Events.MonitorId = :selector0 ORDER BY DESC limit 20' params:1]

Aug 6 15:31:28 UNRAID web_php[2319]: ERR [SQL-ERR dbFetchAll no result, statement was 'SELECT `Id`, `MonitorId`, `Name`, `Cause`, `Notes`, `StartTime`, date_format( StartTime, '%y/%m/%d %H:%i:%S' ) as StartTimeShort, `EndTime`, `Width`, `Height`, `Length`, `Frames`, `AlarmFrames`, `TotScore`, `AvgScore`, `MaxScore` FROM Events WHERE Events.MonitorId = :selector0 ORDER BY DESC limit 20'params: 1]

So when I open a monitor i cant see the events list under it. if i click on the events (number) it will take me to events and i can see it.

 

Not sure what's creating all that, but wanted to try external db.

 

I also tried running your .master image. Got it running, no apparent db problems, but couldnt define motion zones as i cant see them in the brower. it shows a blank screen.

 

Any guidance/suggestions are appreciated.

Edited by juan11perez
Link to comment
On 2/1/2020 at 2:14 AM, PTRFRLL said:

I run this ZM docker using an external mariadb database and encountered a few issues when upgrading to 1.34.

 

The first issue was:


Upgrading DB to 1.33.7 from 1.32.3
ERROR 1419 (HY000) at line 3: 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)

this was fixed by changing a setting in the mariadb mysql instance:


mysql -u root -p
set global log_bin_trust_function_creators=1;

The second issue was:


Upgrading DB to 1.33.7 from 1.32.3
ERROR 1728 (HY000) at line 117: Cannot load from mysql.proc. The table is probably corrupted

This was fixed by running the mysql_upgrade on the mariadb instance:


mysql_upgrade -u root -p

 

After that, the upgrade went smoothly. Hoping this helps anyone who might be in the same boat

@PTRFRLL

 

would appreciate it if you could explain how to set up this docker with an external dB.

ive tried following the guide in note 1 of this thread but I get a message dB can’t connect and I’m sure is because there’s more steps.

thank you 

Link to comment

Thanks for the container - it's sooooo much easier than when I configured ZM by hand a few years ago.  Disclaimer: I am no docker expert, though I do play one on TV...

 

I'm looking for the appdata/Zoneminder folder mentioned in the first post - on my host system (Ubuntu 18.04.4, docker 19.03.6) I've got a /usr/share/appdata and a /mnt/Zoneminder folder, in the container itself I'm not finding any folders named appdata or Zoneminder, using the command:

 

sudo find / -type d -name 'Zoneminder'

 

to look for folders and the command:

 

sudo docker exec -it Zoneminder /bin/bash

 

to get a CLI inside the running container...

 

The ZM instance is running fine, accessible from http://localhost:8443/zm - but, I'd like to configure the zmeventnotification.ini file, and to do that I first have to find it... O.K. - doh! moment here:

 

find / -type f -name 'zmeventnotification.ini'

 

finds the file at: /config/ inside the container, and at /mnt/Zoneminder/ in the host - looks to be the same file.  Is there any preference for editing the file inside the running container, or outside in the host OS?  It looks like a test edit of the file on host side while the container is stopped is also seen on the file inside the container when it is running.

 

 

 

 

Link to comment
8 minutes ago, MangoCats said:

I'm looking for the appdata/Zoneminder folder mentioned in the first post - on my host system (Ubuntu 18.04.4, docker 19.03.6)

This thread is mainly a support thread for this container as used on the Unraid platform. This is the Unraid forum.

Link to comment
  • 2 weeks later...
On 8/12/2020 at 5:37 AM, dlandon said:

Because of the changes in the Yolo model downloads and path renaming, the template has changed to modify the Yolo install environment variable and add Yolo V4 environment variables.  You can specify the Yolo V3 or V4 models.

Yolo V4 does not work with OpenCV 4.2.0. OpenCV 4.3.0 is required.
https://zmeventnotification.readthedocs.io/en/latest/guides/breaking.html#version-5-15-6-onwards

 

I have upgraded, but OpenCV 4.2.0 is still used:
---------| hook version: 5.15.6, ES version: 5.15.6-Docker , OpenCV version: 4.2.0|------------

Edited by blaess
Link to comment
  • 2 weeks later...

Hi everyone, does someone know how to deploy the image in an offline(local) environment? I use it well one the PC with internet. But it stuck when I move it to the offline(local) environment. BTW, I just need a clean ZoneMinder(without extra packages).

Thanks.

 

Edited by bonju0102
Link to comment
  • 2 weeks later...
28 minutes ago, sillywalks said:

Trying to get this to run together with Home Assistant.

When trying to access the camera feeds via HA it fails. It seems like the issue lies in the deactivated http access.

Is there an easy way to reactivate http access?

Map an external port to the Zoneminder docker port 80.

  • Thanks 2
Link to comment
  • 2 weeks later...

HI Folks, 

Just updated the docker and getting an issue connecting to the internal DB (was humming along nicely previously) not sure what happened:

@blaine07 I think this is the same issue you had? Did you find a solution?

DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) 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' (111) 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' (111) at /usr/share/perl5/ZoneMinder/Database.pm line 110.

Can't call method "prepare_cached" on an undefined value at /usr/share/perl5/ZoneMinder/Config.pm line 96.
BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder/Config.pm line 147.

Compilation failed in require at /usr/bin/zmupdate.pl line 73.

BEGIN failed--compilation aborted at /usr/bin/zmupdate.pl line 73.

Sep 25 07:37:07 62915b1f7bec zmupdate[1187]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) error val:]

Sep 25 07:37:07 62915b1f7bec zmupdate[1187]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) error val:]

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

 

Edited by Jaburges
Link to comment
46 minutes ago, Jaburges said:

HI Folks, 

Just updated the docker and getting an issue connecting to the internal DB (was humming along nicely previously) not sure what happened:

@blaine07 I think this is the same issue you had? Did you find a solution?

So weirdly (and annoyingly briefly) as the docker shuts itself down, there is no `mysql.sock` in `/var/run/mysqld` has it been moved in the update?

Trying to start the service also confirms this:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")

 

Link to comment
1 hour ago, Jaburges said:

So weirdly (and annoyingly briefly) as the docker shuts itself down, there is no `mysql.sock` in `/var/run/mysqld` has it been moved in the update?

Trying to start the service also confirms this:


ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")

 

 
 

There are so many of these issues on the Zoneminder forums, but I can't see a single answer - the only answer is to rebuild it?

Link to comment
  • dlandon changed the title to [support] dlandon - Zoneminder 1.36

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.