dlandon Posted December 20, 2022 Author Share Posted December 20, 2022 27 minutes ago, tucansam said: Docker -> ZM Icon -> "WebGUI" Also tried directly inputting the URL and port, both http and https No change, does not work. Same error. Look at the docker container log and see if there are any errors. Did you make any changes to the docker container template? Quote Link to comment
tucansam Posted December 20, 2022 Share Posted December 20, 2022 Got it working, not sure how. But MAN, this is WAY more complicated than it was a decade ago when I ran an old version on an old linux. I have no idea how to begin doing this. I've managed to set up the source, an can see it. The camera itself handles motion detection, and films in 30s clips, which is fine. I literally just need the camera to write videos to my unraid server instead of the SD card in it. Nothing more complicated than that. Quote Link to comment
turt1e Posted February 2 Share Posted February 2 (edited) If anyone is trying to get this Zoneminder docker working with the Nginx Proxy Manager docker instead of the SWAG docker below is the important config that needs to be added to the advanced tab when creating a new proxy host. location = / { rewrite ^ https://zm.mydomain.com/zm/ permanent; } That tidbit above makes Zoneminder pesky use of the trailing /zm in the URL work with Nginx Proxy Manager. Pay particular care to make sure the ending"/" in https://zm.mydomain.com/zm/ is present because https://zm.mydomain.com/zm does not work for me. Edited February 2 by turt1e Quote Link to comment
Nano Posted February 5 Share Posted February 5 (edited) Anyone managed to get ZMNINJA event server working - Got it saying connected in App and I can see via console it can see and send an event when I manually start an alarm but nothing is showing on the APP/Phone. Any tips!? I can see the Console is saying the following, Is this a setting im missing? I feel like im close @dlandon can you comment on the last bit here No rules found for Monitor, allowing:2. - is this something basic im missing??? BG-2:2023-02-05,22:04:47 PARENT: checkEvents() new events found=1 DBG-2:2023-02-05,22:04:47 PARENT: There are 1 new Events to process DBG-2:2023-02-05,22:04:47 PARENT: ---------->Tick END (active forks:1, total forks:1, active hooks: 0)<-------------- DBG-1:2023-02-05,22:04:47 PARENT: Forked process:1281 to handle alarm eid:38 INF:2023-02-05,22:04:47 |----> FORK:Front Porch 1080 (2), eid:38 use hooks/start hook not being used, going to directly send out a notification if checks pass 02/05/23 22:04:47.266417 zmeventnotification[1281].INF [main:1044] [|----> FORK:Front Porch 1080 (2), eid:38 use hooks/start hook not being used, going to directly send out a notification if checks pass] DBG-2:2023-02-05,22:04:49 |----> FORK:Front Porch 1080 (2), eid:38 rules: Checking rules for alarm caused by eid:38, monitor:2, at: Sun Feb 5 22:04:49 2023 with cause:Forced Web DBG-1:2023-02-05,22:04:49 |----> FORK:Front Porch 1080 (2), eid:38 rules: No rules found for Monitor, allowing:2 DBG-1:2023-02-05,22:04:49 |----> FORK:Front Porch 1080 (2), eid:38 Matching alarm to connection rules... Edited February 5 by Nano Quote Link to comment
grants169 Posted February 9 Share Posted February 9 My setup is a 250 GB disk dedicated to ZM. I save events until the disk is 85% full and it purges the oldest. Been doing this for years, moving it from an old bare metal server to unraid. The disk holds roughly 300,000 events using 7 cameras. Basically overkill as I rarely go back in time the 4 months of events that it holds. But, my problem is I can't go back in time if I'm trying to query about 60,000 events from the console. From the console, clicking on "events" with a camera with 40k events, they pop up just fine. Other cameras with 60k events all I'm presented with is a message "Loading, please wait..." and nothing more happens; it's the same thing with all 3 cameras I have with greater than 60k events. Clicking on the total events, with 300k, it's obviously the same thing. My thinking it's some limitation with mysql, but there's nothing in error logs and I'm not sure what I can do to increase the number of events that can be queried. My old server was able to do it just fine with what was essentially a stock ZM install, using the same 250GB hard disk and I don't recall modifying mysql outside of what ZM requires... Any thoughts? Quote Link to comment
grants169 Posted March 1 Share Posted March 1 On 2/9/2023 at 3:29 PM, grants169 said: My setup is a 250 GB disk dedicated to ZM. I save events until the disk is 85% full and it purges the oldest. Been doing this for years, moving it from an old bare metal server to unraid. The disk holds roughly 300,000 events using 7 cameras. Basically overkill as I rarely go back in time the 4 months of events that it holds. But, my problem is I can't go back in time if I'm trying to query about 60,000 events from the console. From the console, clicking on "events" with a camera with 40k events, they pop up just fine. Other cameras with 60k events all I'm presented with is a message "Loading, please wait..." and nothing more happens; it's the same thing with all 3 cameras I have with greater than 60k events. Clicking on the total events, with 300k, it's obviously the same thing. My thinking it's some limitation with mysql, but there's nothing in error logs and I'm not sure what I can do to increase the number of events that can be queried. My old server was able to do it just fine with what was essentially a stock ZM install, using the same 250GB hard disk and I don't recall modifying mysql outside of what ZM requires... Any thoughts? Found the culprit. In case anyone else has the "Loading, please wait.." message after attempting to load a large dataset (camera with a lot of events), the fix is to log on to console and increase memory limit from 'memory_limit = 128M' to something like 512M in /etc/php/7.4/apache2/php.ini. 1 Quote Link to comment
drx Posted March 6 Share Posted March 6 (edited) Good Afternoon! I just updated my zoneminder docker and now I am getting permission denied errors, and I am not sure what changed within the docker to affect permissions. I am still on 6.9.2, and I know that 6.10 and up introduced docker permission issues. Im curious if that is the issue here. Does any of this make sense to anyone? Quote Mar 6 13:39:30 77963088ba6b zmu[1155]: ERR [zmu] [Can't open memory map file /dev/shm/zm.mmap.1: No such file or directory] Mar 6 13:39:30 77963088ba6b zmu[1155]: ERR [zmu] [Can't connect to capture daemon: 1 Front Door] Mar 6 13:39:30 77963088ba6b zmu[1155]: ERR [zmu] [Can't run query INSERT INTO `Logs` ( `TimeKey`, `Component`, `ServerId`, `Pid`, `Level`, `Code`, `Message`, `File`, `Line` ) VALUES ( 1678131570.099178, 'zmu', 0, 1155, -2, 'ERR', 'Can\'t open memory map file /dev/shm/zm.mmap.1: No such file or directory', 'zm_monitor.cpp', 927 ): Lost connection to MySQL server during query] Mar 6 13:39:30 77963088ba6b zmu[1155]: ERR [zmu] [Can't run query INSERT INTO `Logs` ( `TimeKey`, `Component`, `ServerId`, `Pid`, `Level`, `Code`, `Message`, `File`, `Line` ) VALUES ( 1678131570.099343, 'zmu', 0, 1155, -2, 'ERR', 'Can\'t connect to capture daemon: 1 Front Door', 'zmu.cpp', 512 ): Lost connection to MySQL server during query] Mar 6 13:39:30 77963088ba6b zms[1201]: ERR [zms] [fopen() for ./zms.log, error = Permission denied] EDIT: So, since I was getting permission denied, I went ahead and let the docker run with privilege to see how it would respond, and now I am getting this DBD::mysql::st execute failed: Lost connection to MySQL server during query at /usr/share/perl5/ZoneMinder/Logger.pm line 627. DBD::mysql::st execute failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) at /usr/bin/zmpkg.pl line 325. Mar 6 14:40:29 713ba0e3f727 zmpkg[1108]: ERR [Can't execute log entry 'INSERT INTO Logs ( TimeKey, Component, ServerId, Pid, Level, Code, Message, File, Line ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, NULL )': Lost connection to MySQL server during query] Mar 6 14:40:29 713ba0e3f727 zmpkg[1108]: FAT [Can't execute: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)] ZoneMinder failed to start *** /etc/my_init.d/40_firstrun.sh failed with status 255 Edited March 6 by drx Quote Link to comment
drx Posted March 7 Share Posted March 7 Sorry, just got back from dinner and was able to do some more testing. I set the env variable "NO_START_ZM="1"", then started the MySQL server and it was fine. When I start zoneminder I get an error: execute failed: Lost connection to MySQL server during query at /usr/share/perl5/ZoneMinder/Logger.pm line 627. and execute failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) at /usr/bin/zmpkg.pl line 325. So, I went to those lines and this is what they say: Logger.pm Line 610-634 610 my $sql = 'INSERT INTO Logs ( TimeKey, Component, ServerId, Pid, Level, Code, Message, File, Line ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, NULL )'; 611 $this->{sth} = $ZoneMinder::Database::dbh->prepare_cached($sql) if ! $this->{sth}; 612 if ( !$this->{sth} ) { 613 $this->{databaseLevel} = NOLOG; 614 Error("Can't prepare log entry '$sql': ".$ZoneMinder::Database::dbh->errstr()); 615 return; 616 } 617 618 my $res = $this->{sth}->execute( 619 $seconds+($microseconds/1000000.0), 620 $this->{id}, 621 ($ZoneMinder::Config::Config{ZM_SERVER_ID} ? $ZoneMinder::Config::Config{ZM_SERVER_ID} : undef), 622 $$, 623 $level, 624 $codes{$level}, 625 $string, 626 $this->{fileName}, 627 ); 628 if ( !$res ) { 629 $this->{databaseLevel} = NOLOG; 630 Error("Can't execute log entry '$sql': ".$ZoneMinder::Database::dbh->errstr()); 631 } 632 } # end if doing db logging 633 } # end if level < effectivelevel 634 } zmpkg.pl 320 321 # PP - First, make sure default exists and there is only one 322 my $sql = 'SELECT `Name` FROM `States` WHERE `Name`=?'; 323 my $sth = $dbh->prepare_cached($sql) 324 or Fatal("Can't prepare '$sql': ".$dbh->errstr()); 325 my $res = $sth->execute('default') 326 or Fatal("Can't execute: ".$sth->errstr()); 327 I am not sure what these lines are telling me, this is above my head unfortunately Quote Link to comment
dlandon Posted March 7 Author Share Posted March 7 16 hours ago, drx said: Good Afternoon! I just updated my zoneminder docker and now I am getting permission denied errors, and I am not sure what changed within the docker to affect permissions Nothing in the update affected permissions. You should restore your appdata from a backup. Quote Link to comment
tvd1 Posted March 13 Share Posted March 13 For what its worth, I woke up and found my Zoneminder docker was stopped. I tried to restart and watched the logs and it kept restarting, many database errors. I have restored to a backup but looks like theres an issue with the update. I would recommend people holding off until this is addressed. Unfortunately, I didnt capture the errors before restoring. Quote Link to comment
dlandon Posted March 13 Author Share Posted March 13 4 hours ago, tvd1 said: For what its worth, I woke up and found my Zoneminder docker was stopped. I tried to restart and watched the logs and it kept restarting, many database errors. I have restored to a backup but looks like theres an issue with the update. I would recommend people holding off until this is addressed. Unfortunately, I didnt capture the errors before restoring. Force an update to the docker. Quote Link to comment
MrLinux Posted April 24 Share Posted April 24 How do I change the path from https://1.2.3.4/zm to https://1.2.3.4 ? Quote Link to comment
dlandon Posted April 28 Author Share Posted April 28 On 4/24/2023 at 4:36 AM, MrLinux said: How do I change the path from https://1.2.3.4/zm to https://1.2.3.4 ? You can't. Quote Link to comment
mcraidy Posted May 8 Share Posted May 8 (edited) Just noticed and installed the latest upgrade and now get the same error when trying to manually start zoneminder. [email protected]:/# service zoneminder start Starting ZoneMinder: 05/08/23 12:05:00.692778 zmpkg[1515].INF [main:318] [Sanity checking States table...] DBD::mysql::st execute failed: Lost connection to MySQL server during query at /usr/share/perl5/ZoneMinder/Logger.pm line 627. 05/08/23 12:05:00.757360 zmpkg[1515].ERR [ZoneMinder::Logger:630] [Can't execute log entry 'INSERT INTO Logs ( TimeKey, Component, ServerId, Pid, Level, Code, Message, File, Line ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, NULL )': Lost connection to MySQL server during query] DBD::mysql::st execute failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) at /usr/bin/zmpkg.pl line 325. 05/08/23 12:05:00.757747 zmpkg[1515].FAT [main:325] [Can't execute: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)] ZoneMinder failed to start [email protected]:/# DB starts fine and I can connect successfully from the CLI using the credentials in /etc/zm/zm.conf I'll try take a better look later this evening, but FYI the latest update seems to do something funky Edited May 8 by mcraidy Quote Link to comment
dlandon Posted May 8 Author Share Posted May 8 There were no changes in the latest Zoneminder container. It was to catch up the Ubuntu updates and refresh the docker container. That problem normally happens with database issues. I've kept up with all the updates on my own Zoneminder and never had an issue with the DB. Restore the database from a backup and see if it doesn't fix it. 1 Quote Link to comment
mcraidy Posted May 8 Share Posted May 8 Thanks - interestingly just tried a mysqldump and got mysqldump: Error 2013: Lost connection to MySQL server during query when dumping table `Logs` at row: 130429 There seemed to be something weird in the Logs table so I truncated the table.... service starts again. Quote Link to comment
mcraidy Posted May 8 Share Posted May 8 On 4/24/2023 at 9:36 PM, MrLinux said: How do I change the path from https://1.2.3.4/zm to https://1.2.3.4 ? I set up a redirect from / to /zm via Nginx Proxy Manager - added the following to advanced config location = / { return 301 https://cctv.home.local.dom/zm/; } Quote Link to comment
Recommended Posts
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.