No events are being created

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
linuxnutt
Posts: 37
Joined: Fri Aug 12, 2016 6:06 am

No events are being created

Post by linuxnutt »

I could really use some fresh eyes on this as I've been racking my head on this for a few days now.

I have no events being created. I can force an alarm it shows new event 0 being created (every event triggered is and event 0) in the syslog logs but nothing ever shows in the console view. It looks like I do have events being created in /var/cache/zoneminder/events, and nothing appears to be written to zmdb, There is a strange entry in systlog something about, "The user specified as a definer ('debian-sys-maint'@'localhost') does not exist". that I have no clue about..

I'm running Desktop Acer model: Aspire X3950, cpu dual core model: Intel Core i3, Memory: 7.68 GiB used: 2.54 GiB (33.1%) Init: systemd, installed lububtu 22.04, zoneminder 1.36.33, with mariaDB 10.6.12 ( Server version: 10.6.12-MariaDB-0ubuntu0.22.04.1 Ubuntu 22.04), and I followed instructions here, https://wiki.zoneminder.com/Ubuntu_Serv ... der_1.36.x.

When I restored my zmdb from the get go I was not creating any new events, I did have old events which I truncated using the Truncate tables command for
Events, Frames, Stats tables. I did not have ant events files so I had to clean the database.

Code: Select all

syslog:
sudo tail -f  /var/log/syslog | grep -i zmc_m3
Jul 27 15:48:40 media zmc_m3[134583]: INF [zmc_m3] [Mtr3_IPM723S_FrontDoor: 1100 - Capturing at 10.00 fps, capturing bandwidth 128053bytes/sec Analysing at 1.70 fps]
Jul 27 15:48:40 media zmc_m3[134583]: INF [zmc_m3] [Mtr3_IPM723S_FrontDoor: 1100 - Gone into alarm state PreAlarmCount: 0 > AlarmFrameCount:1 Cause:Forced Web]
Jul 27 15:48:40 media zmc_m3[134583]: ERR [zmc_m3] [Can't run query INSERT INTO `Events` ( `MonitorId`, `StorageId`, `Name`, `StartDateTime`, `Width`, `Height`, `Cause`, `Notes`, `StateId`, `Orientation`, `Videoed`, `DefaultVideo`, `SaveJPEGs`, `Scheme` ) VALUES ( 3, 1, 'New Event', from_unixtime( 1690498119 ), 640, 480, 'Forced Web', 'Forced Web: ', 1, 1, 0, '', 3, 'Medium' ): The user specified as a definer ('debian-sys-maint'@'localhost') does not exist]
Jul 27 15:48:40 media zmc_m3[134583]: INF [zmc_m3] [Mtr3_IPM723S_FrontDoor: 1099 - Opening new event 0, alarm start]
Jul 27 15:48:49 media zmc_m3[134583]: INF [zmc_m3] [Mtr3_IPM723S_FrontDoor: 1190 - Gone into alert state]
Jul 27 15:48:50 media zmc_m3[134583]: INF [zmc_m3] [Mtr3_IPM723S_FrontDoor: 1195 - Left alarm state (0) - 105(91) images]
Jul 27 15:48:50 media zmc_m3[134583]: INF [zmc_m3] [Mtr3_IPM723S_FrontDoor: 1195 - Closing event 0, alarm end]
Jul 27 15:48:50 media zmc_m3[134583]: INF [zmc_m3] [Mtr3_IPM723S_FrontDoor: 1200 - Capturing at 10.00 fps, capturing bandwidth 128311bytes/sec Analysing at 1.60 fps]
Jul 27 15:49:00 media zmc_m3[134583]: INF [zmc_m3] [Mtr3_IPM723S_FrontDoor: 1300 - Capturing at 10.00 fps, capturing bandwidth 128033bytes/sec Analysing at 1.70 fps]
Jul 27 15:49:10 media zmc_m3[134583]: INF [zmc_m3] [Mtr3_IPM723S_FrontDoor: 1400 - Capturing at 10.00 fps, capturing bandwidth 128578bytes/sec Analysing at 1.70 fps]
Jul 27 15:49:20 media zmc_m3[134583]: INF [zmc_m3] [Mtr3_IPM723S_FrontDoor: 1500 - Capturing at 10.00 fps, capturing bandwidth 127742bytes/sec Analysing at 1.60 fps]
Jul 27 15:49:30 media zmc_m3[134583]: INF [zmc_m3] [Mtr3_IPM723S_FrontDoor: 1600 - Capturing at 10.00 fps, capturing bandwidth 128876bytes/sec Analysing at 1.70 fps]
^C

/var/cache/zoneminder/events /3/2023-07-27/0$ ls -altrh;
...

-rw-rw-r-- 1 www-data www-data  53K Jul 27 15:34 00115-capture.jpg
-rw-rw-r-- 1 www-data www-data  53K Jul 27 15:34 00116-capture.jpg
-rw-rw-r-- 1 www-data www-data  53K Jul 27 15:34 00117-capture.jpg
-rw-rw-r-- 1 www-data www-data  56K Jul 27 15:52 00065-analyse.jpg
-rw-rw-r-- 1 www-data www-data  56K Jul 27 15:52 00066-analyse.jpg
-rw-rw-r-- 1 www-data www-data  56K Jul 27 15:52 00067-analyse.jpg
-rw-rw-r-- 1 www-data www-data  56K Jul 27 15:52 00068-analyse.jpg
-rw-rw-r-- 1 www-data www-data  56K Jul 27 15:52 00063-analyse.jpg
-rw-rw-r-- 1 www-data www-data  56K Jul 27 15:52 00064-analyse.jpg
-rw-rw-r-- 1 www-data www-data  58K Jul 27 15:58 00081-analyse.jpg


MariaDB [zm]> select * from Events;
Empty set (0.000 sec)

MariaDB [zm]> select * from Events_Day;
Empty set (0.020 sec)

MariaDB [zm]> 

Really appreciate an assistance to resolve the no events being created issue.

Thanks
Last edited by linuxnutt on Sat Jul 29, 2023 3:08 am, edited 1 time in total.
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: No events are being created

Post by Magic919 »

That database user is your problem. Why it’s trying to use that I don’t know. Either get to the bottom of that or create the appropriate user. It’s a standard Debian database user.
-
linuxnutt
Posts: 37
Joined: Fri Aug 12, 2016 6:06 am

Re: No events are being created

Post by linuxnutt »

Ok, got it I did a 'mysql_secure_installations' and it removed the user debian-sys-maint, and these are the only users I have now. There is something else going on besides it clearly is saying, "The user specified as a definer ('debian-sys-maint'@'localhost') does not exist". The zmuser was created with the correct permissions, so I do not know what else I need to check to get events to show up in the console and zm database. Something is up with creating new event 0, and all subsequent events not advancing to the next number.


MariaDB [(none)]> SELECT user,host FROM mysql.user;
+-------------+-----------+
| User | Host |
+-------------+-----------+
| mariadb.sys | localhost |
| mysql | localhost |
| root | localhost |
| zmuser | localhost |
+-------------+-----------+
4 rows in set (0.001 sec)

What other information can I give to assist in helping figure this out.
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: No events are being created

Post by Magic919 »

I don’t really think I’m that interested in figuring it out.

If you want it to work, you just need to create that user and give it rights over the DB.

If you prefer to figure it out, crack on.
-
Post Reply