Firefox montage view server-wide solution

If you've made a patch to quick fix a bug or to add a new feature not yet in the main tree then post it here so others can try it out.
Post Reply
ncpv
Posts: 7
Joined: Mon Nov 26, 2018 5:42 pm

Firefox montage view server-wide solution

Post by ncpv » Thu Jan 10, 2019 6:27 pm

There is known issue that affects Firefox users when they view Montage page.

Firefox imposes limit of how many simultaneous connections can be established per server. As a result, some cameras on Montage page will not be displayed.

The FAQ suggest one solution: https://zoneminder.readthedocs.io/en/la ... in-firefox, which requires tweaking browser settings.

I came up with a server-wide solution that does not require end-users to change anything in their browsers. It's suitable for installations with many end-users where it is inconvenient or impossible to ask users to change settings in their browsers. Additional benefit of avoiding browser settings change is that the change will affect how Firefox interacts with all other hosts, not only Zoneminder server.

This solution is relatively advanced and assumes that Zoneminder server is accessed with a hostname which is part of domain that you control (and therefore can manage its DNS zone).

The main idea is to take advantage of the fact that in Zoneminder each camera can be assigned to a particular server: https://zoneminder.readthedocs.io/en/la ... g-monitors.

We can add multiple server entries with different hostnames in Zoneminder config as described in the documentation: https://zoneminder.readthedocs.io/en/la ... rvers.html.

The trick is to make these hostnames resolve to IP address of Zoneminder server. This needs to be done in DNS zone configuration by adding "A" or "CNAME" records for newly added hostnames.

For example, if hostname of Zoneminder server is "zm.example.com" and its IP address is 192.168.1.1, we can add "server1.zm.example.com", "server2.zm.example.com", "server3.zm.example.com", which will all resolve to the same IP address as "zm.example.com" - 192.168.1.1. When this is done, we should be able to access Zoneminder server by using any of these hostnames.

Then, we assign first few cameras (3 or 4) to "server1.zm.example.com", next few to "server2.zm.example.com", next few to "server3.zm.example.com" etc, so that amount of cameras assigned to each server is less or equal to Firefox's connection limit setting.

For those who runs Zoneminder's Web interface over https with a properly signed certificate, the server's SSL certificate will need to include all additionally created hostnames as "Certificate Subject Alt Name".

In this way, when you open Montage view, Firefox will successfully load all cameras, because for browser there will be different hosts: "server1.zm.example.com", "server2.zm.example.com and "server3.zm.example.com" and even though they all point to one physical location, they are considered as different hosts by the browser.

For single users on Linux machines this can also be done without DNS server by adding entries to /etc/hosts file.

This solution is fully transparent for end-users. They do not need to know anything about those additional hostnames. End users still access the Web interface with "zm.example.com" and they will have fully workable Montage view page.

I decided to share this method so others can benefit from it and so that it can be added to FAQ if maintainers will deem it necessary.

User avatar
iconnor
Posts: 788
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Firefox montage view server-wide solution

Post by iconnor » Fri Jan 11, 2019 2:26 pm

In 1.32, I added multi-port support. So each monitor gets a different port and you configure apache to listen on a range of ports and it achieves the same thing. Thanks for your write up though!

I think at some point in future, we will actually install an application icon and move away from standard ports... going to be a while though.

marcoleo
Posts: 5
Joined: Fri Jun 11, 2004 5:39 pm
Location: Italy

Re: Firefox montage view server-wide solution

Post by marcoleo » Fri May 31, 2019 6:32 pm

Thanks for all infos.
I've enabled multi-port support (v1.32 on debian 9) and the montage show now all my 17 cameras, but doesn't display anymore fps rate.
Also, when I double click to view a single camera the popup open, I can view the camera, but not show the list of recorded events.
If I revert back multi-port to 0 I've everything woking, but obviously limited to 6 cameras
Tried with firefox & chrome, no error in the logs
Any idea where to investigate?

marcoleo
Posts: 5
Joined: Fri Jun 11, 2004 5:39 pm
Location: Italy

Re: Firefox montage view server-wide solution

Post by marcoleo » Sat Jun 01, 2019 5:20 pm

both problems solved.
added to /etc/apache2/ports.conf all my listening ports:
Listen 80
Listen 30000
Listen 30001
Listen 30002
Listen 30003
Listen 30004
..... and so on

added the ports in /etc/apache2/sites-enabled/000-default.conf:
<VirtualHost *:80 *:30001 *:30002 *:30003 *:30004 ....... and so on

in the options for all the ports added related server like:
ports.png
ports.png (9.56 KiB) Viewed 1460 times

marcoleo
Posts: 5
Joined: Fri Jun 11, 2004 5:39 pm
Location: Italy

Re: Firefox montage view server-wide solution

Post by marcoleo » Thu Jun 20, 2019 3:19 pm

the list of the events disappear if I enable the authentication.
No way to have authentication and multi-port working in full at same time

Ruan
Posts: 1
Joined: Fri Sep 13, 2019 10:29 am

Re: Firefox montage view server-wide solution

Post by Ruan » Fri Sep 13, 2019 10:36 am

Im having the same issue with the list of events dissapearing when enabeling multi port, im not so bothered by this, but it has also stoped the PTZ controls from working.
did you find a solution?

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests