Can't add new zone
-
- Posts: 101
- Joined: Sun Nov 15, 2015 7:19 pm
Can't add new zone
I've encountered a problem I can't seem to figure out, somehow I am unable to add any new zones to any of my monitors.
I don't see any errors in my logs (currently set to info, haven't tried degug level yet) and looking at the sql error log it shows nothing either.
However, I can modify and change any existing zones just fine. I have not tried deleting any zones yet for fear of not being able to add it back.
Any ideas? My forum searches and internet searches have not turned up anything. I was on 1.36.32 and tried upgrading to 1.36.33 and it didn't help any.
I don't see any errors in my logs (currently set to info, haven't tried degug level yet) and looking at the sql error log it shows nothing either.
However, I can modify and change any existing zones just fine. I have not tried deleting any zones yet for fear of not being able to add it back.
Any ideas? My forum searches and internet searches have not turned up anything. I was on 1.36.32 and tried upgrading to 1.36.33 and it didn't help any.
Re: Can't add new zone
What version are you running? 1.36.33 does not appear to have that problem.
Andy
o||||o
Ubuntu 22.04
ZM 1.36.33
E5-1650-v4 Xeon
16 GB RAM
6 cameras -> 54 FPS modect
o||||o
Ubuntu 22.04
ZM 1.36.33
E5-1650-v4 Xeon
16 GB RAM
6 cameras -> 54 FPS modect
-
- Posts: 1210
- Joined: Sat Aug 31, 2019 7:35 am
- Location: San Diego
Re: Can't add new zone
And what's happening? Is the ADD NEW ZONE button not responding?
-
- Posts: 101
- Joined: Sun Nov 15, 2015 7:19 pm
Re: Can't add new zone
I was on 1.36.32 and had the same issue, as I stated I don't believe it's related to the version, I just tried going to .33 to see if it made any difference and it didn't help.
I hit the can add new zone button and get to the add new zone screen, define the location, set all of the settings and then when I hit Save and it returns to the Zones for the monitors display the zone I just defined never shows up. No error message, no warnings, nothing.
I hit the can add new zone button and get to the add new zone screen, define the location, set all of the settings and then when I hit Save and it returns to the Zones for the monitors display the zone I just defined never shows up. No error message, no warnings, nothing.
-
- Posts: 1210
- Joined: Sat Aug 31, 2019 7:35 am
- Location: San Diego
Re: Can't add new zone
Not seeing that. Could it be the selections from the dropdowns?
Try one with just the default preset and move the points around a bit. Still won't save? I dunno what to say...
Afterthought - what's the of the cameras whole field?
Try one with just the default preset and move the points around a bit. Still won't save? I dunno what to say...
Afterthought - what's the of the cameras whole field?
-
- Posts: 101
- Joined: Sun Nov 15, 2015 7:19 pm
Re: Can't add new zone
I'm trying to add the zone like I've done hundreds of times in the past, it's nothing I haven't done before. It doesn't matter what monitor/camera, same result each time, it acts like it's saving it but when it returns to the Zones page for the monitor/camera the count of zones has not increased and there is no polygon showing up either.
However, I did notice tonight that it does seem to be throwing an error in the logs, maybe it took time for my logging level change to take place:
2/28/23, 10:03:29 PM CST",web_php,7832,ERR,"SQL-ERR 'SQLSTATE[HY000]: General error: 1449 The user specified as a definer ('debian-sys-maint'@'localhost') does not exist', statement was 'INSERT INTO Zones SET MonitorId=?, `NumCoords` = '5', `Coords` = '862,138 1042,115 1195,173 844,305 800,152', `Area` = '40151', `AlarmRGB` = '16711680', `Name` = 'New', `Type` = 'Active', `Units` = 'Percent', `CheckMethod` = 'AlarmedPixels', `MinPixelThreshold` = '20', `MaxPixelThreshold` = NULL, `MinAlarmPixels` = '2007', `MaxAlarmPixels` = NULL, OverloadFrames = 0' params:5",/usr/share/zoneminder/www/includes/database.php,161
It appears to me maybe some kind of credential issue while creating the zone in sql? The user specified as a definer ('debian-sys-maint'@'localhost') does not exist'
However, I did notice tonight that it does seem to be throwing an error in the logs, maybe it took time for my logging level change to take place:
2/28/23, 10:03:29 PM CST",web_php,7832,ERR,"SQL-ERR 'SQLSTATE[HY000]: General error: 1449 The user specified as a definer ('debian-sys-maint'@'localhost') does not exist', statement was 'INSERT INTO Zones SET MonitorId=?, `NumCoords` = '5', `Coords` = '862,138 1042,115 1195,173 844,305 800,152', `Area` = '40151', `AlarmRGB` = '16711680', `Name` = 'New', `Type` = 'Active', `Units` = 'Percent', `CheckMethod` = 'AlarmedPixels', `MinPixelThreshold` = '20', `MaxPixelThreshold` = NULL, `MinAlarmPixels` = '2007', `MaxAlarmPixels` = NULL, OverloadFrames = 0' params:5",/usr/share/zoneminder/www/includes/database.php,161
It appears to me maybe some kind of credential issue while creating the zone in sql? The user specified as a definer ('debian-sys-maint'@'localhost') does not exist'
-
- Posts: 101
- Joined: Sun Nov 15, 2015 7:19 pm
Re: Can't add new zone
So I found this thread from 1.32.x which seems to describe the issue I'm having but I'm not entirely sure I understand the solution that was presented on the last post.
viewtopic.php?t=28406
You can do a mysqldump and will find lines like:
/*!50003 CREATE*/ /*!50017 DEFINER=`debian-sys-maint`@`localhost`*/ /*!50003 TRIGGER `event_insert_trigger` AFTER INSERT ON `Events` FOR EACH ROW BEGIN
I solved it by substituting that user with the right zmuser for my environment, dropping the database, and restoring the mysqldump backup.
viewtopic.php?t=28406
You can do a mysqldump and will find lines like:
/*!50003 CREATE*/ /*!50017 DEFINER=`debian-sys-maint`@`localhost`*/ /*!50003 TRIGGER `event_insert_trigger` AFTER INSERT ON `Events` FOR EACH ROW BEGIN
I solved it by substituting that user with the right zmuser for my environment, dropping the database, and restoring the mysqldump backup.
Re: Can't add new zone
I think the solution is meant to belightguy48 wrote: ↑Thu Mar 02, 2023 11:50 pm You can do a mysqldump and will find lines like:
/*!50003 CREATE*/ /*!50017 DEFINER=`debian-sys-maint`@`localhost`*/ /*!50003 TRIGGER `event_insert_trigger` AFTER INSERT ON `Events` FOR EACH ROW BEGIN
I solved it by substituting that user with the right zmuser for my environment, dropping the database, and restoring the mysqldump backup.
1) backup using mysqldump
2) edit mysqldump output file and change debian-sys-maint to zmuser (or what your user is)
3) drop existing database in mysql
4) restore database backup file from mysqldump
You shouldn't have to recreate the database. It's just an edit.
I looked at a backup of one of my servers. I have root@localhost configured. The debian-sys-maint is probably whomever you setup the zm database with. I'm sure there's some way to configure zm with debian-sys-maint, and that's why folks are seeing this error. Might be some kind of ZM db init bug, or it may just be that mysql needs permissions properly added to the user (the below command).
From:
https://wiki.zoneminder.com/Devuan_Beow ... om_ZM_Repo
Code: Select all
mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql
mysql -uroot -p -e "grant all on zm.* to 'zmuser'@localhost identified by 'zmpass';"
fastest way to test streams:
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl
If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl
If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide
Re: Can't add new zone
I saw this on my Ubuntu system, but too long ago. I configured the DB to have the user and made sure the appropriate config file matched it.
-
-
- Posts: 101
- Joined: Sun Nov 15, 2015 7:19 pm
Re: Can't add new zone
It's really bizarre. I'm not sure how it happened but I did have an SSD going bad that my OS and SQL DB resides on so I had a backup of my SQL DB with all of my monitors and zones and I replaced the drive, did a brand new install of Ubuntu & Zoneminder and then restored the backup, everything has been fine for several weeks until I went to add an additional zone on a camera where I wanted to keep an eye on our cat's food bowl, that's when I discovered I couldn't add a zone.
But yet I can modify/move zones all day long, it doesn't seem to care about modifications, only additions.
I'll try the suggestions this weekend when I can play with the system.
But yet I can modify/move zones all day long, it doesn't seem to care about modifications, only additions.
I'll try the suggestions this weekend when I can play with the system.
Re: Can't add new zone
Just looks like insert permissions on the DB seem to require it. No idea why.
-
Re: Can't add new zone
The Problem seems to be an user or permission problem in the database, import the 1.36.33 Database ( reinstall or upgrade yout 1.36.32 installation
same issue - solved => viewtopic.php?p=130596#p130596
same issue - solved => viewtopic.php?p=130596#p130596