Hello, I am running into a strange issue with ZoneMinder and am wondering if any one might have any idea as to what is wrong. Here is the summary:
OpenSuse 11.1
* Created Apache alias directory for zoneminder (using /etc/apache2/conf.d/) and installed web files to alternate location /srv/www/zm
* Activated Debugging Level 5
* Setup Two Monitors: 1 file based and 1 remote camera (Panasonic Network Camera)
* With network camera, confirmed that Source(Remote Host Name + Remote Host Path) do in fact yield an image in a web browser (exampe: http://192.168.0.100/SnapshotJPEG?Resol ... y=Standard).
* None of the logs show any errors at all
/var/log/messages shows file-based monitor is capturing and running:
Jun 7 19:48:33 scarlet zmc_m2[12745]: INF [LivingRoom: 1000 - Capturing at 1.92 fps]
/var/log/zm/zm_debug.log.xxxx shows that the remote capture is working perfectly as well:
06/07/09 20:02:51.064048 zmc_m2[-1].DB3-zm_remote_camera_http.cpp/170 [Expecting 1012 bytes]
06/07/09 20:02:51.064061 zmc_m2[-1].DB3-zm_remote_camera_http.cpp/195 [Read 1012 bytes]
06/07/09 20:02:51.064735 zmc_m2[-1].DB3-zm_remote_camera_http.cpp/170 [Expecting 24 bytes]
06/07/09 20:02:51.064753 zmc_m2[-1].DB3-zm_remote_camera_http.cpp/195 [Read 24 bytes]
06/07/09 20:02:51.066367 zmc_m2[-1].DB3-zm_remote_camera_http.cpp/170 [Expecting 1012 bytes]
06/07/09 20:02:51.066388 zmc_m2[-1].DB3-zm_remote_camera_http.cpp/195 [Read 1012 bytes]
06/07/09 20:02:51.069455 zmc_m2[-1].DB3-zm_remote_camera_http.cpp/170 [Expecting 1012 bytes]
06/07/09 20:02:51.069469 zmc_m2[-1].DB3-zm_remote_camera_http.cpp/195 [Read 1012 bytes]
06/07/09 20:02:51.072148 zmc_m2[-1].DB3-zm_remote_camera_http.cpp/170 [Expecting 1012 bytes]
Running : /usr/bin/zmdc.pl status shows that all services are running:
'zmaudit.pl -c' running since 09/06/07 19:39:51, pid = 12753, valid
'zmc -m 2' running since 09/06/07 19:39:51, pid = 12745, valid
'zmfilter.pl' running since 09/06/07 19:39:51, pid = 12749, valid
'zmwatch.pl' running since 09/06/07 19:39:52, pid = 12758, valid
'zmc -m 1' running since 09/06/07 19:39:51, pid = 12741, valid
'zmupdate.pl -c' running since 09/06/07 19:39:52, pid = 12763, valid
confirmed with : ps -A | grep zm
12715 pts/1 00:00:00 zmdc.pl
12741 pts/1 00:00:36 zmc
12745 pts/1 00:00:26 zmc
12749 pts/1 00:00:00 zmfilter.pl
12753 pts/1 00:00:00 zmaudit.pl
12758 pts/1 00:00:00 zmwatch.pl
12763 pts/1 00:00:00 zmupdate.pl
To test permissions, I tested running “/usr/bin/zmpkg.pl startâ€
Installation on OpenSuse 11.1 installs, but fails to run
Make sure you've set up your monitors with the function you want. They may be disabled. Look under the "Function" section:
http://www.zoneminder.com/wiki/index.ph ... onitor_Tab
Events (images) will be saved to the events directory if your function is modect. I don't know about the other functions.
My images directory contains images of the zones I've setup for each monitor. That is, just a single image for each monitor.
http://www.zoneminder.com/wiki/index.ph ... onitor_Tab
Events (images) will be saved to the events directory if your function is modect. I don't know about the other functions.
My images directory contains images of the zones I've setup for each monitor. That is, just a single image for each monitor.
Thank you very much for the reply. Yes, the cameras are enabled However,I followed your suggestions and tried some of the modes other than "Monitor". It appears that many features are working. The issue looks to be that the real-time monitor is the only item not functioning. Here is what I found:
In Motion Detect mode, here is the Zone Screen:
As you can see, the events are listed, but the live view is not showing up.
Along those lines, the montage screen does not show any images either:
At the moment, this is a fresh install on OpenSuse 11.1 using the official OpenSuse 11 repositories from:
openSuSE 11.1: http://www.liquid-co.de/pub/suse/repositories/11.1/
Can any one suggest how I might correct the live monitor feature that are currently not working? Should I log a bug to the maintainers of the repositories?
Thank you for the assistance.
In Motion Detect mode, here is the Zone Screen:
As you can see, the events are listed, but the live view is not showing up.
Along those lines, the montage screen does not show any images either:
At the moment, this is a fresh install on OpenSuse 11.1 using the official OpenSuse 11 repositories from:
openSuSE 11.1: http://www.liquid-co.de/pub/suse/repositories/11.1/
Can any one suggest how I might correct the live monitor feature that are currently not working? Should I log a bug to the maintainers of the repositories?
Thank you for the assistance.
Ah, I have figured out part of the problem, there seems to be a bug in the php or ajax somewhere. I was so busy checking invalid libraries and dependencies that it did not occur to me to check the apache logs. I finally checked the web log and found this:
[Mon Jun 08 10:38:06 2009] [error] [client 192.168.0.27] client denied by server configuration: /srv/www/cgi-binnph-zms, referer: http://www.poptarantula.com/zm/index.ph ... ode=stream
I checked, the settings to confirm: "ZM_PATH_CGI=/srv/www/cgi-bin". The issue of course is that there is a missing "/" (front-slash) in the cgi call creating an invalid cgi script called "cgi-binnph-zms". I tried adding a slash to the end of the ZM_PATH_CGI setting, but it does not make a difference. This really looks to me to be a bug in the php, albeit a simple one to correct.
Do any one happen to know the php file and block that makes this call? I can debug through this latter, but it would be great if some one might already know where to look. I will respond back to this thread with the correction either way in case it might help others experiencing the same problem
[Mon Jun 08 10:38:06 2009] [error] [client 192.168.0.27] client denied by server configuration: /srv/www/cgi-binnph-zms, referer: http://www.poptarantula.com/zm/index.ph ... ode=stream
I checked, the settings to confirm: "ZM_PATH_CGI=/srv/www/cgi-bin". The issue of course is that there is a missing "/" (front-slash) in the cgi call creating an invalid cgi script called "cgi-binnph-zms". I tried adding a slash to the end of the ZM_PATH_CGI setting, but it does not make a difference. This really looks to me to be a bug in the php, albeit a simple one to correct.
Do any one happen to know the php file and block that makes this call? I can debug through this latter, but it would be great if some one might already know where to look. I will respond back to this thread with the correction either way in case it might help others experiencing the same problem
Re: Installation on OpenSuse 11.1 installs, but fails to run
[quote="midian"]
To test permissions, I tested running “/usr/bin/zmpkg.pl startâ€
To test permissions, I tested running “/usr/bin/zmpkg.pl startâ€
Re: Installation on OpenSuse 11.1 installs, but fails to run
This was just a test. I cleared the log files and doubled-checked all permissions.Actually this insures that all files and logs created are owned by root and promiss that ZM can not run as required user.
Man err
After more debugging, I found the issue is not PHP, but instead the ZMS or NPH-ZMS binaries located in the cgi directory. The binaries are reading the configuration from the database PATH_ZMS value. In my case:
PATH_ZMS = /zmcgi-bin/nph-zms
and
/etc/zm.conf : ZM_PATH_CGI=/srv/www/zmcgi-bin/
The php generated web page has the correct path and calls the cgi binary at :
http://www.poptarantula.com/zmcgi-bin/n ... 1244497729
Then, the binary load configuration values from the database, but seems to be placing slashes incorrectly. My apache log shows:
client denied by server configuration: /srv/www/zmcgi-binnph-zms
In the above example, the issues is that "/srv/www/zmcgi-binnph-zms" should be "/srv/www/zmcgi-bin/nph-zms". You may notice that I have setup a separate cgi-bin dir just for zoneminder called "zmcgi-bin" to ensure this was not a permission issue.
I have checked and run that exact URL directly to remove all other factors and confirmed the binary throws the same error.
I checked both zms and nph-zms binaries from the OpenSuse11 RPM and the latest source code from ZoneMinder-1.24.1. Both binaries are throwing the same error for me. If this were in fact a bug in the release, I would assume that every one would be experiencing the same issue. Thus, I am a bit stumped and thinking I must have some parameter set incorrectly.
Can any one suggest why my zms and nph-zms binaries are using invalid cgi paths? I would really appreciate any help.
P.S. My buddy installed the OpenSuse11 repository and ZoneMinder package on his own OpenSuse 11.1 server this weekend and is having the exact same issue I am. Thus, this is two OpenSuse 11.1 servers that do not work with the default installation package. Both of us have the following issues with this release:
1. /etc/init.d/zm service shows "falled" when started
2. restarting service from the web interface causes processes to thow shared memory errors
3. zms cgi binaries have the path error described above.
Update: I found a work-around for the nph-zms path failure. It is late and I am tired. However, here are some rough notes in case they help any one else.
Issue 1. The cgi path in PATH_ZMS will only work if the binaries are one level from the root. For example:
PATH_ZMS = /cgi-bin/nph-zms : Works
PATH_ZMS = /cgi-bin/zm/nph-zms : Does not work
Issue 2. The binary delivered in the repository library (RPM) does not work. To fix this:
1. Download the source
2. Follow the instruction to download all the dependencies (the devel and build versions of the libraries) that are not included by default with the normal package build
3. run ./configure with the proper settings. For OpenSuse 11.1 64bit, my ./configure settings are:
./configure --prefix=/usr \
--sysconfdir=/etc \
--with-webuser=wwwrun \
--with-webgroup=www \
--with-mysql=/usr \
--with-webdir=/srv/www/zm \
--with-cgidir=/srv/www/cgi-bin \
--enable-mmap=yes \
--with-libarch=lib64 \
ZM_SSL_LIB=openssl
Note: I have enabled memory mapping instead of shared memory above.
3. build the binaries by running "make"
4. After building, do not do continue with the building any further as the goal is to allow the repository to deliver updates.
5. Copy just the zms binary into your cgi-bin directory. After building, it will be located under the <source>/src/zms
Example: /usr/src/ZoneMinder-1.24.1/src/zms
NOTE: It is not normally a good idea to accept binaries from people you don't know. However, if you are an OpenSuse 11.1 64bit user and send me a personal message, I will send you a copy of my custom built zms cgi binary.
Change nph-zms to zms in the PATH_ZMS options panel under the "Path" tab. For example:
PATH_ZMS = /cgi-bin/nph-zms to PATH_ZMS = /cgi-bin/zms
Issue 3. cgi permissions. If you still find permission errors executing the /cgi-bin/zms, ensure your /cgi-bin alias in the vhosts.d directory has the following line:
SetHandler cgi-script
Alternatively, you can copy the following below to /etc/apache2/conf.d/zm.conf to create a completely new alias for ZoneMinder and its cgi directories.
#
# ZoneMinder security application
#
# Note: Creates an web vfiles dir
# at the alias: /zm
# pointing to the physical directory: /srv/www/zm/
#
# Also, creates a cgi-bin dir
# at the alias: /zmcgi-bin
# pointing to the physical directory: /srv/www/zmcgi-bin
Alias /zm /srv/www/zm/
<Location>
# SSLRequireSSL
</Location>
<Directory>
Order allow,deny
Allow from all
DirectoryIndex index.html index.htm index.php
SSLOptions +StdEnvVars
Options FollowSymLinks
php_admin_flag short_open_tag On
</Directory>
Alias /zmcgi-bin /srv/www/zmcgi-bin
<Directory>
AllowOverride None
#Options +ExecCGI -Includes
Options +ExecCGI -Includes
SetHandler cgi-script
Order allow,deny
Allow from all
</Directory>
6. Edit /ect/zm.cconf and change the line to match your cgi-bin directory if need be. For example, mine is : M_PATH_CGI=/zm/cgi-bin.
Also, edit the Options panel and set the PATH_ZMS to your new alias if need be.
A few other notes:
Service: /etc/init.t/zm shows "failed" after the service is started. This is a problem with the perl file the service calls. After starting the service, you can execute:
/usr/bin/zmdc.pl status
to see if your services are running correctly.
I hope all this is of help to other OpenSuse 11.1 users.
Issue 1. The cgi path in PATH_ZMS will only work if the binaries are one level from the root. For example:
PATH_ZMS = /cgi-bin/nph-zms : Works
PATH_ZMS = /cgi-bin/zm/nph-zms : Does not work
Issue 2. The binary delivered in the repository library (RPM) does not work. To fix this:
1. Download the source
2. Follow the instruction to download all the dependencies (the devel and build versions of the libraries) that are not included by default with the normal package build
3. run ./configure with the proper settings. For OpenSuse 11.1 64bit, my ./configure settings are:
./configure --prefix=/usr \
--sysconfdir=/etc \
--with-webuser=wwwrun \
--with-webgroup=www \
--with-mysql=/usr \
--with-webdir=/srv/www/zm \
--with-cgidir=/srv/www/cgi-bin \
--enable-mmap=yes \
--with-libarch=lib64 \
ZM_SSL_LIB=openssl
Note: I have enabled memory mapping instead of shared memory above.
3. build the binaries by running "make"
4. After building, do not do continue with the building any further as the goal is to allow the repository to deliver updates.
5. Copy just the zms binary into your cgi-bin directory. After building, it will be located under the <source>/src/zms
Example: /usr/src/ZoneMinder-1.24.1/src/zms
NOTE: It is not normally a good idea to accept binaries from people you don't know. However, if you are an OpenSuse 11.1 64bit user and send me a personal message, I will send you a copy of my custom built zms cgi binary.
Change nph-zms to zms in the PATH_ZMS options panel under the "Path" tab. For example:
PATH_ZMS = /cgi-bin/nph-zms to PATH_ZMS = /cgi-bin/zms
Issue 3. cgi permissions. If you still find permission errors executing the /cgi-bin/zms, ensure your /cgi-bin alias in the vhosts.d directory has the following line:
SetHandler cgi-script
Alternatively, you can copy the following below to /etc/apache2/conf.d/zm.conf to create a completely new alias for ZoneMinder and its cgi directories.
#
# ZoneMinder security application
#
# Note: Creates an web vfiles dir
# at the alias: /zm
# pointing to the physical directory: /srv/www/zm/
#
# Also, creates a cgi-bin dir
# at the alias: /zmcgi-bin
# pointing to the physical directory: /srv/www/zmcgi-bin
Alias /zm /srv/www/zm/
<Location>
# SSLRequireSSL
</Location>
<Directory>
Order allow,deny
Allow from all
DirectoryIndex index.html index.htm index.php
SSLOptions +StdEnvVars
Options FollowSymLinks
php_admin_flag short_open_tag On
</Directory>
Alias /zmcgi-bin /srv/www/zmcgi-bin
<Directory>
AllowOverride None
#Options +ExecCGI -Includes
Options +ExecCGI -Includes
SetHandler cgi-script
Order allow,deny
Allow from all
</Directory>
6. Edit /ect/zm.cconf and change the line to match your cgi-bin directory if need be. For example, mine is : M_PATH_CGI=/zm/cgi-bin.
Also, edit the Options panel and set the PATH_ZMS to your new alias if need be.
A few other notes:
Service: /etc/init.t/zm shows "failed" after the service is started. This is a problem with the perl file the service calls. After starting the service, you can execute:
/usr/bin/zmdc.pl status
to see if your services are running correctly.
I hope all this is of help to other OpenSuse 11.1 users.