[SOLVED]Multiserver setup generating errors when viewing saved events

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
aquadot
Posts: 17
Joined: Tue Apr 26, 2022 10:13 pm

[SOLVED]Multiserver setup generating errors when viewing saved events

Post 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?
Last edited by aquadot on Wed Mar 27, 2024 7:13 pm, edited 1 time in total.
User avatar
iconnor
Posts: 2904
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Multiserver setup generating errors when viewing saved events

Post 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.
aquadot
Posts: 17
Joined: Tue Apr 26, 2022 10:13 pm

Re: Multiserver setup generating errors when viewing saved events

Post 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.
aquadot
Posts: 17
Joined: Tue Apr 26, 2022 10:13 pm

Re: Multiserver setup generating errors when viewing saved events

Post 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.
Post Reply