kysdaddy Posted April 26, 2021 Share Posted April 26, 2021 On 4/24/2021 at 5:56 PM, kysdaddy said: Thank you, since they aren't known to zoneminder, I am using Midnight Commander to delete, it is slow but seems to be working. I will update. Chas Not sure if this is an example of correlation not equaling causation, or not, but system crashed twice while deleting and I lost one of the HDDs in my system. Currently doing a data-rebuild on a new HDD. Quote Link to comment
juan11perez Posted April 27, 2021 Share Posted April 27, 2021 On 1/12/2021 at 9:01 PM, pm1961 said: Hi, After an update of a working instance of Zoneminder, I have the problem of; Unable to connect to ZM db.SQLSTATE[HY000] [2002] No such file or directory On inspection of the log (bottom), it references the MariaDB. When I use mc to try and navigate to the floder/files referred too..... they don't exist.... presumably because the "kill" at the end deletes them? After much frustration, I installed a fresh Zoneminder on my other unRaid server. This server runs as a NAS with no other dockers........ and that works fine! So........... if it's an interaction between Zoneminder and my MariaDB, is there a workaround? I only have MariaDB because of my Nextcloud instance, and they work fine together. This server is my high core/high memory VM and docker server so, although it works, I dont want to leave Zoneminder on my NAS server. Having read through the forum, I've tried deleting templates for a fresh install from CA...... I've tried deleting log files.... but they didn't exist.... presumably because it's never done anything............ I noticed from comparing the Appdata folders that the non-working instance has an extra directory "opencv". My working version doesn't have this even though it was installed after the broken one??? Any help gratefully received, ATB, Paul Starting services... * Starting Apache httpd web server apache2 * * Starting MariaDB database server mysqld Jan 12 15:23:43 70771cb7af9e web_php[657]: FAT [Failed db connection to ] ...fail! DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) 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' (2) 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' (2) at /usr/share/perl5/ZoneMinder/Database.pm line 110. Jan 12 15:24:12 70771cb7af9e zmupdate[1092]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) error val:] 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. Jan 12 15:24:12 70771cb7af9e zmupdate[1092]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) error val:] DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) 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' (2) at /usr/share/perl5/ZoneMinder/Database.pm line 110. Jan 12 15:24:12 70771cb7af9e zmupdate[1094]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) error val:] DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) 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. Jan 12 15:24:12 70771cb7af9e zmupdate[1094]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) error val:] Starting ZoneMinder: DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) 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' (2) at /usr/share/perl5/ZoneMinder/Database.pm line 110. Jan 12 15:24:12 70771cb7af9e zmpkg[1104]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) error val:] DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) 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/share/perl5/ZoneMinder.pm line 33. BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder.pm line 33. Compilation failed in require at /usr/bin/zmpkg.pl line 34. BEGIN failed--compilation aborted at /usr/bin/zmpkg.pl line 34. Jan 12 15:24:12 70771cb7af9e zmpkg[1104]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) error val:] ZoneMinder failed to start *** /etc/my_init.d/40_firstrun.sh failed with status 255 *** Killing all processes... Jan 12 15:24:12 70771cb7af9e syslog-ng[38]: syslog-ng shutting down; version='3.25.1' good day, I found a way to get zm back with this post https://forums.zoneminder.com/viewtopic.php?t=29602 however, it doesn't say what's creating it. Quote Link to comment
BigChris Posted May 10, 2021 Share Posted May 10, 2021 I have the problem that my zoneminder image is getting bigger and bigger. The current unraid shows 3.8GB. I have swapped out the following: /mnt/user/appdata/Zoneminder Container Path: /config Data Path: /mnt/user/zoneminder-data/ Container Path: /var/cache/zoneminder I have noticed that the file frames.ibd, for example, is very large. 2.3GB. This is located in appdata/Zoneminder/mysql/zm Can I swap out the path / file? Or what can I do to stop my Zoneminder container from growing? Quote Link to comment
dlandon Posted May 10, 2021 Author Share Posted May 10, 2021 19 minutes ago, BigChris said: /mnt/user/zoneminder-data/ This does not look right. What is mounted at that mountpoint? Quote Link to comment
BigChris Posted May 11, 2021 Share Posted May 11, 2021 7 hours ago, dlandon said: This does not look right. What is mounted at that mountpoint? I mounted the data path there. Container Path: /var/cache/zoneminder I just see that this is present twice for me. See screenshot. Quote Link to comment
dlandon Posted May 11, 2021 Author Share Posted May 11, 2021 4 hours ago, BigChris said: I mounted the data path there. Container Path: /var/cache/zoneminder I just see that this is present twice for me. See screenshot. You need to remove one of the data paths. I'd say the problem you are having is with that mount point. If it is not set up correctly, the data will end up in the container increasing the size of the container. Quote Link to comment
BigChris Posted May 11, 2021 Share Posted May 11, 2021 38 minutes ago, dlandon said: You need to remove one of the data paths. How can I delete a data path? Quote Link to comment
dlandon Posted May 11, 2021 Author Share Posted May 11, 2021 9 minutes ago, BigChris said: How can I delete a data path? Click the 'Remove' button. Quote Link to comment
BigChris Posted May 11, 2021 Share Posted May 11, 2021 6 minutes ago, dlandon said: Click the 'Remove' button There is no button Quote Link to comment
dlandon Posted May 11, 2021 Author Share Posted May 11, 2021 Delete the container and template and get the template from apps and start over. Quote Link to comment
BigChris Posted May 11, 2021 Share Posted May 11, 2021 7 hours ago, dlandon said: Delete the container and template and get the template from apps and start over. Thanks again for your quick help. I have deleted the Zoneminder container and also removed the template. Then I reinstalled the zoneminder from the apps. The data path is now only present once, but the memory usage is immediately high again. should i have deleted the app-data folder as well? but it is actually on the share. Quote Link to comment
dlandon Posted May 11, 2021 Author Share Posted May 11, 2021 4 hours ago, BigChris said: Thanks again for your quick help. I have deleted the Zoneminder container and also removed the template. Then I reinstalled the zoneminder from the apps. The data path is now only present once, but the memory usage is immediately high again. should i have deleted the app-data folder as well? but it is actually on the share. I'm still confused what /mnt/user/zoneminder-data is. It would need to be a disk share or pool device. You said you mounted something there. What did you mount? Quote Link to comment
BigChris Posted May 12, 2021 Share Posted May 12, 2021 This is a share on my array. Nothing is mounted there, I meant that the container path /var/cache/zoneminder points there. Is that ok? Quote Link to comment
dlandon Posted May 12, 2021 Author Share Posted May 12, 2021 3 hours ago, BigChris said: This is a share on my array. Nothing is mounted there, I meant that the container path /var/cache/zoneminder points there. Is that ok? That's fine. You might look at the container log and see if it is growing too large. Quote Link to comment
dlandon Posted May 22, 2021 Author Share Posted May 22, 2021 (edited) Zoneminder 1.36 has been released. I am going to update the zoneminder docker in the next few days to update zoneminder to 1.36. This will be an automatic update to 1.36. If you aren't ready for 1.36, don't update the docker. I've done some initial testing and it looks to work fine with no glitches that I've seen yet. Edit: Home Assistant doesn't appear to be ready for Zoneminder 1.36. My HA doesn't want to log into Zoneminder properly. It seems to be working now. Not sure why though. Edited May 23, 2021 by dlandon Home Assistant Issue Cleared Up 1 Quote Link to comment
Mlatx Posted May 23, 2021 Share Posted May 23, 2021 (edited) Last night I had to stop Zoneminder, and when I restarted it, it didn't come back up. I'm getting these errors in the log: Starting ZoneMinder: 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. May 23 14:09:45 18d28a2717c6 zmpkg[1040]: 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. 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/share/perl5/ZoneMinder.pm line 33. BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder.pm line 33. Compilation failed in require at /usr/bin/zmpkg.pl line 34. BEGIN failed--compilation aborted at /usr/bin/zmpkg.pl line 34. May 23 14:09:45 18d28a2717c6 zmpkg[1040]: ERR [Error reconnecting to db: errstr:Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) error val:] ZoneMinder failed to start *** /etc/my_init.d/40_firstrun.sh failed with status 255 *** Killing all processes... May 23 14:09:45 18d28a2717c6 syslog-ng[41]: syslog-ng shutting down; version='3.25.1' I've found a post with a DBI Connect error and was able to start zoneminder with the a custom variable and start mysqld in safe mode. Then it produced an error log with this error: InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. What can I do to correct this? Edited May 23, 2021 by Mlatx Quote Link to comment
dlandon Posted May 23, 2021 Author Share Posted May 23, 2021 53 minutes ago, Mlatx said: InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. What can I do to correct this? You will need to get help on the Zoneminder forum. I am not a database expert. Quote Link to comment
Mlatx Posted May 23, 2021 Share Posted May 23, 2021 1 hour ago, dlandon said: You will need to get help on the Zoneminder forum. I am not a database expert. Ok thanks. Quote Link to comment
dlandon Posted May 23, 2021 Author Share Posted May 23, 2021 2 minutes ago, Mlatx said: Ok thanks. Mysql is a real pain when there are issues like this. It just doesn't work and it's hard to figure out why and fix it. The best way to keep this from happening is to have a backup of the database you can restore. Quote Link to comment
Mlatx Posted May 23, 2021 Share Posted May 23, 2021 6 minutes ago, dlandon said: Mysql is a real pain when there are issues like this. It just doesn't work and it's hard to figure out why and fix it. The best way to keep this from happening is to have a backup of the database you can restore. Thanks. I have a backup of appdata where the database resides in the zoneminder install. I'll try to restore that and see what happens. Quote Link to comment
dlandon Posted May 23, 2021 Author Share Posted May 23, 2021 4 minutes ago, Mlatx said: Thanks. I have a backup of appdata where the database resides in the zoneminder install. I'll try to restore that and see what happens. Probably the best answer. Quote Link to comment
Mlatx Posted May 23, 2021 Share Posted May 23, 2021 2 minutes ago, dlandon said: Probably the best answer. Would it be beneficial to use another database say mariadb as I already have it for nextcloud? Or should I just stick with the mysql that is part of zoneminder? Quote Link to comment
dlandon Posted May 23, 2021 Author Share Posted May 23, 2021 4 minutes ago, Mlatx said: Would it be beneficial to use another database say mariadb as I already have it for nextcloud? Or should I just stick with the mysql that is part of zoneminder? I have very little control over the Zoneminder database implementation. It is built into Zoneminder, but you can configure it to use an external database. Look at the first post for how to do that. Quote Link to comment
dlandon Posted May 23, 2021 Author Share Posted May 23, 2021 I have been working with a test container I built to try out 1.36 and I am very impressed with the latest version. I'm going to build a new Zoneminder docker container today that will update your Zoneminder in place to 1.36. You don't need to do anything to update Zoneminder. The docker will take care of it for you. Pay attention to the docker log though. It seems I had some buffers set wrong and the log message suggested that I make some changes. There are also some changes in the 'Storage' camera settings to pay attention to. I ended up using camera passthrough because the encoded setting did not record events video for me. Quote Link to comment
placix Posted May 26, 2021 Share Posted May 26, 2021 Hello! since the last update the WebGui doesn't work anymore. I don't know if it could just have something to do with this: Quote ERR [Failed DELETE FROM Sessions WHERE access < '1621455423' LIMIT 100 :Table 'zm.Sessions' doesn't exist in engine] 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.