Page 1 of 1

[Closed] Zoneminder in a cluster ?

Posted: Thu Sep 26, 2013 8:50 am
by hansie
Hi,

I have been successful in creating a crazy setup for my to-be Zoneminder environment... :mrgreen:
Well, to be more exact, knew about ZM for a long time, but decided now to install it on an existing infrastructure which may not be exactly suitable.

The situation is as follows :
I have a cluster made up of Server A (which is the faster one), and server B (which is slower, but more robust. A real server).
Server A is the active one in the cluster, B is the standby node.
Server A is the node where MySQL and Apache are running, so it would be wise to install ZM on this node as well. Server B, however, is situated in a place in my home where the cameras can be easily connected to the DVR card which (for that reason) is installed in server B.
Now I have a problem, and I'm not to sure what to do next.

I can try to get ZM running on server B, and use mod_proxy to go from the running Apache instance on server A to ZM on server B. This poses the problem on how to get the ZM to work with a remote MySQL DB.
I believe this is possible, but will I be able to see live pictures as well ?

Second solution could be to have ZM running on server A as well, but then I would have to be able to read the /dev/videoX files from server B over the network. I have seen some posts about this on the internet, but nothing I could understand...

So, my two questions are :
Does solution 1 work for live streaming as well ?
Is it possible to remote read the /dev/videoX 's from within ZM ?

I know my setup is probably not the smartest one, but I'm more or less bound to physical restrictions on where to place the servers.
Hope someone can help out a little.

Thanks,
Hans

Re: Zoneminder in a cluster ?

Posted: Tue Oct 01, 2013 8:00 pm
by knight-of-ni
I'm not sure exactly what you are trying to achieve.

Since you are using a local capture card for your cameras, rather than IP cameras, you really can't have a truly redundant system. The server with the capture card will always be a single point of failure.

For example, you could run zoneminder on both server A & B. Program server B normally since that has the capture card. For Server A, you would program each camera as a Remote Zoneminder device (To answer your question - it's one of the camera presets you can choose from).

However, that doesn't get you anything. If server B fails then server A stops recording, which defeats the purpose.

If your goal in this is to have a fully redundant system, I would do the following:
1) git rid of the cluster (not needed unless you absolutely have to have a single virtual ip that points to the active node)
2) Add enough ip video encoders to support all your analog cameras
3) program two recorders to independently view & record from the video encoders. Nearly all ip devices support multiple streams these days.

Re: Zoneminder in a cluster ?

Posted: Tue Oct 01, 2013 8:19 pm
by hansie
Hi, Knnniggett,
Thanks for replying.

I'm sorry. Should have explained better. I'm not trying to get ZM redundant. The reason I have a cluster is for other software (like email collaboration software).
I'm perfectly happy if the server running ZM goes down, als long als the other applications keep running.

I did make a little progress using proxypass settings to tunnel zm http through the redundant apache (the one that fails over in case of a problem).

I do get the start page of ZM, but no live feed. Logs reveal that cgi-bin is not found, or proxypass for cgi-bin doesn't work properly.

Does this help you formulate another answer to my questions ?

Thanks,
Hans

Re: Zoneminder in a cluster ?

Posted: Tue Oct 01, 2013 8:34 pm
by knight-of-ni
Yeah, ok.
Now I understand the need to for complications with apache.

I haven't done this in years, but here is what I did to reverse proxy mythtv into my web server:

Code: Select all

# Allow access to MythTV via web browser
ProxyPass /mythweb http://ubuntu-pvr/mythweb
ProxyPassReverse /mythweb http://ubuntu-pvr
So your configuration on Server A might look something like this:

Code: Select all

# Allow access to Server B through Server A
ProxyPass /zm http://server_b_hostname/zm
ProxyPassReverse /zm http://server_b_hostname
So maybe the only thing missing is the ProxyPassReverse directive form your previous attempt?

[Closed] Re: Zoneminder in a cluster ?

Posted: Wed Oct 02, 2013 7:37 pm
by hansie
Hm,

Tried those settings, but they don't work for some reason.

Will open a new question with specifics for my situation.
Thanks for thinking with me.