Page 1 of 1

[SOLVED]Multiserver setup generating errors when viewing saved events

Posted: Tue Mar 12, 2024 5:58 pm
by aquadot
I'm running ZoneMinder 1.36.33 from the Debian Bullseye repositories and I have two servers set up. One is running the database and some cameras while the other provides storage and runs some cameras. I'll refer to them as A and B.

Here is the scenario:
A is database and runs cameras and is the main one being logged into to view streams and events.

B is storage and runs cameras and isn't meant for users to log into.

Any time I want to view saved events using the webui on A from cameras run on B I get errors like this:

getCmdResponse stream error: Socket /var/run/zm/zms-xxxxxx.sock does not exist. This file is created by zms, and since it does not exist, either zms did not run, or zms exited early. Please check your zms logs and ensure that CGI is enabled in apache and check that the PATH_ZMS is set correctly. Make sure that ZM is actually recording. If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit. Please go to http://zoneminder.readthedocs.io/en/lat ... window-etc for more information. - checkStreamForErrors()

I get the same problem if I attempt to use the webui from B to view events from cameras managed by A.

If I'm viewing cameras managed by A using the webui from A it is completely fine and if I'm using webui on B to view cameras managed by B it is fine.

It seems to me that the zms-*.sock file under /var/run/zm/ is being produced on the server managing the cameras and those files might not be accessible to the other servers since they are local only.

Any ideas on how to resolve this problem?

Re: Multiserver setup generating errors when viewing saved events

Posted: Fri Mar 15, 2024 4:24 pm
by iconnor
Each event has a StorageId to tell it where it is. The Storage entry has a ServerId field which can be empty, but can also specify the server that it actually exists on, so that we can ask that server for the content.

If you aren't using storage areas.. then all events are stored in /var/cache/zoneminder/events, on both servers, but the servers don't know which server the event is stored on.

So we need to look at your storage setup.

Re: Multiserver setup generating errors when viewing saved events

Posted: Sat Mar 16, 2024 12:14 am
by aquadot
Thank you for the reply. I may have my servers setup wrong but this is what I have:

Server A -- SMB storage mounted to /var/cache/zoneminder/events/ from Server B
Server B -- dedicated drive bind mounted to /var/cache/zoneminder/events/

I played with trying to create storage but ran into problems (I'd have to really think about those problems at this point as that is a long lost memory) and ended up using a suggestion in a setup guide. I'll look for that but I think it was either in the docs or on the wiki. Aside from this 1 problem it seems to work.

Re: Multiserver setup generating errors when viewing saved events

Posted: Wed Mar 27, 2024 7:12 pm
by aquadot
Thank you iconnor for your response. I created a new storage area that points to my storage drive that is on one of my machines and have been switching my cameras over to it. Now when I play stored events I don't get errors in the log and the progress bar reflects the playing progress.

Thank you for your help, you're awesome.