No image/video

Forum for questions and support relating to the 1.31.x releases only.
Locked
Killbrum
Posts: 13
Joined: Mon Apr 09, 2018 5:11 am

No image/video

Post by Killbrum »

Good time of the day

I'm so sorry for rising so many topics and questions. Just want to deploy at least simple working service. So... currently, I have Ubuntu 16.04 and ZM 1.31.44. Everything was installed from scratch, and also I applied that fix for apache2. Now my UI looks good, and I have no errors in the logs, I see that ZM see my cameras. Like I see FPS, bitrate, etc. BUT, when I'm trying to open stream - it doesn't show me anything. Like a place where I should see the stream from the camera - is blank.
Please, could you advise me whats wrong? What should I check? Thanks!


P.S. my cameras works 100% because I'm able to see stream using VLC. But FFmpeg nor libvlc doesn't work for me.
Attachments
Screenshot_12.png
Screenshot_12.png (82.94 KiB) Viewed 8011 times
Screenshot_11.png
Screenshot_11.png (133.81 KiB) Viewed 8011 times
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: No image/video

Post by bbunge »

Strongly recommend going to Zoneminder 1.30.4. Anything beyond that version is in development and can have issues. True, you may not have your cameras configured correctly and as far as I know there is no patch required for Apache.

See: https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way
Killbrum
Posts: 13
Joined: Mon Apr 09, 2018 5:11 am

Re: No image/video

Post by Killbrum »

bbunge wrote: Mon Jul 09, 2018 1:27 am Strongly recommend going to Zoneminder 1.30.4. Anything beyond that version is in development and can have issues. True, you may not have your cameras configured correctly, and as far as I know, there is no patch required for Apache.

See: https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way
Thanks bbunge!

Yep, I understand that it is dev version. Cameras work well and configured OK because ZM 1.30.4 see them.
I'm talking about layout "patch" which was introduced by "iconnor" . See viewtopic.php?f=37&t=27204

Could you point me what logs you're expecting to see from me? Because in the "Logs" tab (in ZM web UI) there is only one error related to ZM_PATHS.

"getCmdResponse stream error: Socket 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()"

But I checked file /etc/zm/conf.d/01-system-path.conf and it says that ZM_PATH_ZMS is set to /zm/cgi-bin/nph-zms. Other than that I have no issues.
Killbrum
Posts: 13
Joined: Mon Apr 09, 2018 5:11 am

Re: No image/video

Post by Killbrum »

Logs:
zoneminder.service - ZoneMinder CCTV recording and surveillance system
Loaded: loaded (/lib/systemd/system/zoneminder.service; enabled; vendor preset: enabled)
Active: active (running) since пн 2018-07-09 19:10:30 EEST; 2h 15min left
Process: 1589 ExecStart=/usr/bin/zmpkg.pl start (code=exited, status=0/SUCCESS)
Main PID: 1651 (zmdc.pl)
CGroup: /system.slice/zoneminder.service
├─1651 /usr/bin/perl -wT /usr/bin/zmdc.pl startup
├─1760 /usr/bin/zmc -m 2
├─1924 /usr/bin/perl -wT /usr/bin/zmaudit.pl -c
├─1928 /usr/bin/perl -wT /usr/bin/zmwatch.pl
├─1937 /usr/bin/perl -w /usr/bin/zmupdate.pl -c
├─1943 /usr/bin/perl -wT /usr/bin/zmstats.pl
├─4835 /usr/bin/zmc -m 3
└─5363 /usr/bin/zmc -m 1

лип 09 16:54:54 camserver2 zmdc[1651]: INF ['zmc -m 4' starting at 18/07/09 16:54:54, pid = 5364]
лип 09 16:54:54 camserver2 zmdc[5363]: INF ['zmc -m 1' started at 18/07/09 16:54:54]
лип 09 16:54:54 camserver2 zmdc[1651]: INF ['zmc -m 1' sending stop to pid 5363 at 18/07/09 16:54:54]
лип 09 16:54:54 camserver2 zmwatch[1928]: ERR [Memory map file '/dev/shm/zm.mmap.4' does not exist. zmc might not be running.]
лип 09 16:54:54 camserver2 zmwatch[1928]: INF [Restarting capture daemon for Reception_1, shared data not valid]
лип 09 16:54:54 camserver2 zmdc[5364]: INF ['zmc -m 4' started at 18/07/09 16:54:54]
лип 09 16:54:55 camserver2 zmdc[1651]: INF ['zmc -m 4' sending stop to pid 5364 at 18/07/09 16:54:55]
лип 09 16:54:55 camserver2 zmdc[1651]: INF ['zmc -m 4' exited, signal 14]
лип 09 16:54:55 camserver2 zmc_m1[5363]: INF [zmc_m1] [Starting Capture version 1.31.44]
лип 09 16:54:55 camserver2 zmc_m1[5363]: INF [zmc_m1] [Priming capture from rtsp://192.168.1.30:554/ch0_0.h264]
Logs:
-- Logs begin at пн 2018-07-09 16:01:37 EEST, end at пн 2018-07-09 16:58:16 EEST. --
лип 09 16:58:12 camserver2 zmc_m3[4835]: INF [zmc_m3] [Reception_2: images:9900 - Capturing at 14.29 fps, capturing bandwidth 149574bytes/sec]
лип 09 16:58:12 camserver2 zmc_m4[5639]: INF [zmc_m4] [Stream open rtsp://192.168.1.33/live/ch00_0, parsing streams...]
лип 09 16:58:14 camserver2 sudo[5636]: pam_unix(sudo:session): session closed for user root
лип 09 16:58:15 camserver2 zmwatch[1928]: ERR [Memory map file '/dev/shm/zm.mmap.1' does not exist. zmc might not be running.]
лип 09 16:58:15 camserver2 zmwatch[1928]: INF [Restarting capture daemon for Administrator, shared data not valid]
лип 09 16:58:16 camserver2 zmdc[1651]: WAR [Can't find process with command of 'zmc -m 1']
лип 09 16:58:16 camserver2 zmdc[1651]: INF ['zmc -m 1' starting at 18/07/09 16:58:16, pid = 5642]
лип 09 16:58:16 camserver2 zmdc[5642]: INF ['zmc -m 1' started at 18/07/09 16:58:16]
лип 09 16:58:16 camserver2 sudo[5643]: camserver2 : TTY=pts/3 ; PWD=/home/camserver2 ; USER=root ; COMMAND=/bin/journalctl -xn
лип 09 16:58:16 camserver2 sudo[5643]: pam_unix(sudo:session): session opened for user root by (uid=0)
Killbrum
Posts: 13
Joined: Mon Apr 09, 2018 5:11 am

Re: No image/video

Post by Killbrum »

This is my zoneminder.conf file:
#
# PLEASE NOTE THAT THIS FILE IS INTENDED FOR GUIDANCE ONLY AND MAY NOT BE APPROPRIATE FOR YOUR DISTRIBUTION
#
# This is for use with debian/ubuntu based distributions
#
# Sample configuration file for running ZoneMinder as name based virtual host
# Some values may need to manually adjusted to suit your setup
#
<VirtualHost *:80>
ServerAdmin webmaster@localhost

DocumentRoot "/usr/share/zoneminder/www"

# Order matters. This alias must come first.
Alias /zm/cache "/var/cache/zoneminder/cache"
# IF you aren't using /zm in the url to access ZM then uncomment the following line as well
# Alias /cache "/var/cache/zoneminder/cache"

<Directory "/var/cache/zoneminder/cache">
Options -Indexes +FollowSymLinks
AllowOverride None
<IfModule mod_authz_core.c>
# Apache 2.4
Require all granted
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order deny,allow
Allow from all
</IfModule>
</Directory>

ScriptAlias /zm/cgi-bin/ "/usr/lib/zoneminder/cgi-bin"
ScriptAlias /cgi-bin "/usr/lib/zoneminder/cgi-bin"
<Directory "/usr/lib/zoneminder/cgi-bin">
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
AllowOverride All
<IfModule mod_authz_core.c>
# Apache 2.4
Require all granted
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order deny,allow
Allow from all
</IfModule>
</Directory>

Alias /zm "/usr/share/zoneminder/www"
<Directory "/usr/share/zoneminder/www">
Options -Indexes +FollowSymLinks
AllowOverride All
<IfModule mod_authz_core.c>
# Apache 2.4
Require all granted
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order deny,allow
Allow from all
</IfModule>
</Directory>
# For better visibility, the following directives have been migrated from the
# default .htaccess files included with the CakePHP project.
# Parameters not set here are inherited from the parent directive above.
<Directory "/usr/share/zoneminder/www/api">
RewriteEngine on
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
RewriteBase /zm/api
</Directory>

<Directory "/usr/share/zoneminder/www/api/app">
RewriteEngine on
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
RewriteBase /zm/api
</Directory>

<Directory "/usr/share/zoneminder/www/api/app/webroot">
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
RewriteBase /zm/api
</Directory>
# Use the first option to have Apache logs written to the general log
# directory, or the second to have them written to the regular Apache
# directory (you may have to change the path to that used on your system)
ErrorLog /var/log/zm/apache-error.log
#ErrorLog /var/log/httpd/zm-error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

# Use the first option to have Apache logs written to the general log
# directory, or the second to have them written to the regular Apache
# directory (you may have to change the path to that used on your system)
CustomLog /var/log/zm/apache-access.log combined
#CustomLog /var/log/httpd/zm-access.log combined

</VirtualHost>
Killbrum
Posts: 13
Joined: Mon Apr 09, 2018 5:11 am

Re: No image/video

Post by Killbrum »

Guys... sorry for spam. Just recognized that in apache logs I have next thing:

Code: Select all

[Mon Jul 09 19:01:34.461585 2018] [authz_core:error] [pid 1449] [client 127.0.0.1:56978] AH01630: client denied by server configuration: /usr/lib/zoneminder/cgi-binnph-zms, referer: http://127.0.0.1/zm/index.php?view=watch&mid=3
[Mon Jul 09 19:01:35.493434 2018] [authz_core:error] [pid 1449] [client 127.0.0.1:56978] AH01630: client denied by server configuration: /usr/lib/zoneminder/cgi-binnph-zms, referer: http://127.0.0.1/zm/index.php?view=watch&mid=3
[Mon Jul 09 19:01:36.564012 2018] [authz_core:error] [pid 2717] [client 127.0.0.1:56980] AH01630: client denied by server configuration: /usr/lib/zoneminder/cgi-binnph-zms, referer: http://127.0.0.1/zm/index.php?view=watch&mid=3
[Mon Jul 09 19:02:01.316302 2018] [authz_core:error] [pid 17567] [client 127.0.0.1:56984] AH01630: client denied by server configuration: /usr/lib/zoneminder/cgi-binnph-zms, referer: http://127.0.0.1/zm/index.php?view=watch&mid=3
[Mon Jul 09 19:02:02.205847 2018] [authz_core:error] [pid 17567] [client 127.0.0.1:56984] AH01630: client denied by server configuration: /usr/lib/zoneminder/cgi-binnph-zms, referer: http://127.0.0.1/zm/index.php?view=watch&mid=3
[Mon Jul 09 19:02:02.968061 2018] [authz_core:error] [pid 17566] [client 127.0.0.1:56986] AH01630: client denied by server configuration: /usr/lib/zoneminder/cgi-binnph-zms, referer: http://127.0.0.1/zm/index.php?view=watch&mid=3
[Mon Jul 09 19:02:03.995199 2018] [authz_core:error] [pid 17566] [client 127.0.0.1:56986] AH01630: client denied by server configuration: /usr/lib/zoneminder/cgi-binnph-zms, referer: http://127.0.0.1/zm/index.php?view=watch&mid=3
[Mon Jul 09 19:02:05.030694 2018] [authz_core:error] [pid 17566] [client 127.0.0.1:56986] AH01630: client denied by server configuration: /usr/lib/zoneminder/cgi-binnph-zms, referer: http://127.0.0.1/zm/index.php?view=watch&mid=3
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: No image/video

Post by rockedge »

Code: Select all

Mon Jul 09 19:01:34.461585 2018] [authz_core:error] [pid 1449] [client 127.0.0.1:56978] AH01630: client denied by server configuration: /usr/lib/zoneminder/cgi-binnph-zms, referer: http://127.0.0.1/zm/index.php?view=watch&mid=3
has a syntax error! this path is missing a slash

Code: Select all

/usr/lib/zoneminder/cgi-binnph-zms
it should be

Code: Select all

/usr/lib/zoneminder/cgi-bin/nph-zms
Killbrum
Posts: 13
Joined: Mon Apr 09, 2018 5:11 am

Re: No image/video

Post by Killbrum »

Yep, but I found topic with the same issue viewtopic.php?t=25955

Seems it is apache bug and actually backslash is present in configuration file
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: No image/video

Post by rockedge »

I see......what does your /etc/zm/conf.d look like? I have to place a custom conf file called /etc/zm/conf.d/zmcustom.conf and specify the aliased /cgi-bin

Code: Select all

# /cgi-bin path 
ZM_PATH_ZMS=/cgi-bin/nph-zms
I am throwing out some ideas to get some troubleshooting going
Killbrum
Posts: 13
Joined: Mon Apr 09, 2018 5:11 am

Re: No image/video

Post by Killbrum »

Sorry for the delay. Here is my zm.conf
# ==========================================================================
#
# ZoneMinder Base Configuration
#
# ==========================================================================
#
# *** DO NOT EDIT THIS FILE ***
#
# To make custom changes to the variables below, create a new configuration
# file, with an extention of .conf, under the /etc/zm/conf.d
# folder, containing your desired modifications.
#

# Path to installed data directory, used mostly for finding DB upgrade scripts
ZM_PATH_DATA=/usr/share/zoneminder

# Path to ZoneMinder binaries
ZM_PATH_BIN=/usr/bin

# Path to ZoneMinder libraries (none at present, for future use)
ZM_PATH_LIB=/usr/lib/x86_64-linux-gnu

# Path to ZoneMinder configuration (this file only at present)
ZM_PATH_CONF=/etc/zm

# Path to ZoneMinder web files
ZM_PATH_WEB=/usr/share/zoneminder/www

# Path to ZoneMinder cgi files
ZM_PATH_CGI=/usr/lib/zoneminder/cgi-bin

# Username and group that web daemon (httpd/apache) runs as
ZM_WEB_USER=www-data
ZM_WEB_GROUP=www-data

# ZoneMinder database type: so far only mysql is supported
ZM_DB_TYPE=mysql

# ZoneMinder database hostname or ip address and optionally port or unix socket
# Acceptable formats include hostname[:port], ip_address[:port], or localhost:unix_socket
ZM_DB_HOST=localhost

# ZoneMinder database name
ZM_DB_NAME=zm

# ZoneMinder database user
ZM_DB_USER=zmuser

# ZoneMinder database password
ZM_DB_PASS=pass

# SSL CA certificate for ZoneMinder database
ZM_DB_SSL_CA_CERT=

# SSL client key for ZoneMinder database
ZM_DB_SSL_CLIENT_KEY=

# SSL client cert for ZoneMinder database
ZM_DB_SSL_CLIENT_CERT=

# Do NOT set ZM_SERVER_HOST if you are not using Multi-Server
# You have been warned
#
# The name specified here must have a corresponding entry
# in the Servers tab under Options
ZM_SERVER_HOST=
Killbrum
Posts: 13
Joined: Mon Apr 09, 2018 5:11 am

Re: No image/video

Post by Killbrum »

Guys, could you tell me if you need other logs? Maybe the problem is in changed DB password? Like I don't use default one. I changed it everywhere...
Obzerver
Posts: 1
Joined: Mon Aug 06, 2018 9:27 am

Re: No image/video

Post by Obzerver »

OS: Ubuntu 16.04 server
ZoneMinder v1.30.4

According to my experience, PATH_ZMS should be set to the path found in the file zoneminder.conf which is found in /etc/apache2/conf-available, with zms (or nph-zms) appended.
After following the installation instructions for zoneminder, this was not the case. PATH_ZMS was set to /cgi-bin/nph-zms.

zoneminder.conf contained the following in my system.

-- file begins --
# 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>

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>
-- file ends --

Note the path following the ScriptAlias directive.

From the ZoneMinder Console page, click "Options" and then the "Paths" tab.
In my case I set PATH_ZMS to /zm/cgi-bin/zms.

Regarding nph-zms vs. zms, on my system nph-zms is just a symlink to zms, so it seems there is no difference.

lrwxrwxrwx 1 root root 3 May 9 2017 nph-zms -> zms
-rwxr-xr-x 1 root root 1.3M May 9 2017 zms

However, this could change in future versions of ZoneMinder.

I hope this is helpful.
Locked