Pi3Plus with Buster, ADD source broken

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
jHeron
Posts: 73
Joined: Sun Jun 16, 2013 5:06 pm

Pi3Plus with Buster, ADD source broken

Post by jHeron »

I am trying to setup a couple IP cams on my PI3+ running Buster 10 with the latest updates.
I used the instructions here to install it: https://wiki.zoneminder.com/Raspberry_Pi_4_-_Raspbian
Well damn, I just realised I have a PI3+ not a 4 like I had thought... Perhaps thats my issue lol??
It installs fine and is running but when you click the ADD source button it errors with
ReferenceError: Cant find variable: create popup
Considering it installs fine maybe I just need to tweak something to get it working? Or should I start over with some different instructions?
Here is the zoneminder.conf if that is any help

Code: Select all

# Remember to enable cgi mod (i.e. "a2enmod cgi").
ScriptAlias /zm/cgi-bin "/usr/lib/zoneminder/cgi-bin"
<Directory "/usr/lib/zoneminder/cgi-bin">
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    AllowOverride All
    Require all granted
</Directory>

    # Order matters. This alias must come first.
    Alias /zm/cache "/var/cache/zoneminder"
    <Directory "/var/cache/zoneminder">
        Options -Indexes +FollowSymLinks
        AllowOverride None
        <IfModule mod_authz_core.c>
           # Apache 2.4
           Require all granted
        </IfModule>
    </Directory>

Alias /zm /usr/share/zoneminder/www
<Directory /usr/share/zoneminder/www>
  Options -Indexes +FollowSymLinks
  <IfModule mod_dir.c>
    DirectoryIndex index.php
  </IfModule>
</Directory>

<Directory /usr/share/zoneminder/www/api>
    AllowOverride All
</Directory>
Any support would be greatly appreciated!
Cheers,
Jon
User avatar
burger
Posts: 390
Joined: Mon May 11, 2020 4:32 pm

Re: Pi3Plus with Buster, ADD source broken

Post by burger »

We could try to troubleshoot it by reviewing the settings for ZM. If ZM is running, but the web console is broken, there are a few ways I can usually resolve that.

web files are in /usr/share/zoneminder/www
permissions must be correct
db must be running
correct php installed
a2enconf enabled for zm
Items here: https://wiki.zoneminder.com/Devuan_Beow ... leshooting


But honestly, since this is an RPI3 it's probably easier for you to just dd the premade img from https://zmrepo.zoneminder.com/
Check apache logs if you want to troubleshoot the former further. If you just want to use ZM, use zmrepo img. Can always learn more about ZM later. I'll see about making sure there's a link to the repo img on the Single_Board_Computers page.
fastest way to test streams:
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl

If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide
jHeron
Posts: 73
Joined: Sun Jun 16, 2013 5:06 pm

Re: Pi3Plus with Buster, ADD source broken

Post by jHeron »

OK thanks!
I will look into that and post back with any success/failure I have...
Cheers,
Jon
jHeron
Posts: 73
Joined: Sun Jun 16, 2013 5:06 pm

Re: Pi3Plus with Buster, ADD source broken

Post by jHeron »

Still not having any joy...
here is the zm log:

Code: Select all

2020-11-04 10:06:12	web_js		630	ERR	ReferenceError: Can't find variable: createPopup	zm/cache/skins_classic_views_js_console-classic-1544278956.js	38
2020-11-04 10:06:01	web_js		628	ERR	ReferenceError: Can't find variable: createPopup	zm/cache/skins_classic_views_js_console-classic-1544278956.js	123
2020-11-04 10:05:51	zmaudit		1208	FAT	zmaudit.pl appears to already be running at pid 1087. If not, please delete /var/run/zm/zmaudit.pid or use the --force command line option.	zmaudit.pl	
2020-11-04 10:05:51	zmdc		892	ERR	'zmaudit.pl -c' exited abnormally, exit status 255	zmdc.pl	
2020-11-04 10:05:51	zmdc		892	ERR	'zmfilter.pl --filter_id=2 --daemon' exited abnormally, exit status 9	zmdc.pl	
2020-11-04 10:05:51	zmdc		892	ERR	'zmfilter.pl --filter_id=1 --daemon' exited abnormally, exit status 9	zmdc.pl
apache error log:

Code: Select all

[Wed Nov 04 00:00:14.728262 2020] [mpm_prefork:notice] [pid 633] AH00163: Apache/2.4.38 (Raspbian) configured -- resuming normal operations
[Wed Nov 04 00:00:14.728378 2020] [core:notice] [pid 633] AH00094: Command line: '/usr/sbin/apache2'
[Wed Nov 04 09:51:36.898620 2020] [mpm_prefork:notice] [pid 633] AH00169: caught SIGTERM, shutting down
[Wed Nov 04 09:51:57.376239 2020] [mpm_prefork:notice] [pid 654] AH00163: Apache/2.4.38 (Raspbian) configured -- resuming normal operations
[Wed Nov 04 09:51:57.384274 2020] [core:notice] [pid 654] AH00094: Command line: '/usr/sbin/apache2'
[Wed Nov 04 10:04:36.301240 2020] [mpm_prefork:notice] [pid 654] AH00169: caught SIGTERM, shutting down
[Wed Nov 04 10:04:52.673189 2020] [mpm_prefork:notice] [pid 613] AH00163: Apache/2.4.38 (Raspbian) configured -- resuming normal operations
[Wed Nov 04 10:04:52.678728 2020] [core:notice] [pid 613] AH00094: Command line: '/usr/sbin/apache2'
Permissions for /usr/share/zoneminder/ and etc/zm/zm.conf are set to www-data
a2enconf zoneminder has been done.
As a last resort I will try the pre-made image but I have invested a lot of time in this build and would like to make this work if possible.
Thanks for your help!
Best regards,
Jon
User avatar
burger
Posts: 390
Joined: Mon May 11, 2020 4:32 pm

Re: Pi3Plus with Buster, ADD source broken

Post by burger »

It seems to me there should be more logs than that. Either a different file (apache access log), but maybe I'm wrong.

The posters here tend to cherry pick logs, and leave out important stuff.

If you are interested in learning more about ZM, I can tell you this:

ZM Is a modular program. It has a couple of camera processing c++ binaries, some perl scripts and then there is the user interface (apache w/php). Verify these are running with your task list program of choice.

It sounds like you somehow have a broken php / apache install. You should be able to narrow down the source of your problems is only ZM w/concerned to user interface, so that simplifies things a bit. Follow the logs, and see why the javascript isn't working. Maybe you corrupted the install, or forgot to enable the zm conf, permissions, etc... That is typical apache problems. Unfortunately I can't solve this one easily, so you are going to have to do some digging if you don't want to just go 'easy way' with the premade img. Let us know what you find. The forum is a useful resource. Search here, and look at the logs.

e.g. search of ReferenceError comes up with a number of hits. Sort through those.
viewtopic.php?f=38&t=28087
viewtopic.php?f=38&t=27571 (nginx, but may be similar)
fastest way to test streams:
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl

If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide
Post Reply