New 1.30.4 on C6 on Vbox: 20FPS, but intermittent video in Monitor

Forum for questions and support relating to the 1.30.x releases only.
Locked
Baylink
Posts: 338
Joined: Sun Jun 19, 2005 3:19 am

New 1.30.4 on C6 on Vbox: 20FPS, but intermittent video in Monitor

Post by Baylink »

[ Edited to correct version; this is 1.30.4, just downloaded 2 weeks ago. ]

(on W7 on a Q920 -- this is just a test; the deployment will be on a quad Xeon HP; installed from ZMREPO based on instructions on the page linked from zoneminder.com)

I bulled my way through a lot of stuff to get to where I have a stable monitor set up that will capture at 20fps, and can *intermittently* get a video image in a monitor window.

I'm still getting a couple recurrent errors, though, only when the view window is up, akin to the ones mentioned in this thread.

From web_php.log:

Code: Select all

06/12/17 22:57:19.010576 web_php[4326].ERR [Socket /var/lib/zoneminder/sock/zms-747369s.sock 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/latest/faq.html#why-can-t-i-see-streamed-images-when-i-can-see-stills-in-the-zone-window-etc for more information.] at /usr/share/zoneminder/www/includes/functions.php line 2033
06/12/17 22:57:24.911027 web_php[3422].ERR [Socket /var/lib/zoneminder/sock/zms-747369s.sock 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/latest/faq.html#why-can-t-i-see-streamed-images-when-i-can-see-stills-in-the-zone-window-etc for more information.] at /usr/share/zoneminder/www/includes/functions.php line 2033
From web_js.log:

Code: Select all

06/12/17 22:57:13.222572 web_js[3425].ERR [getStreamCmdResponse stream error: Socket /var/lib/zoneminder/sock/zms-747369s.sock 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/latest/faq.html#why-can-t-i-see-streamed-images-when-i-can-see-stills-in-the-zone-window-etc for more information. - checkStreamForErrors()] at ?view=watch line
06/12/17 22:57:13.328520 web_js[3421].ERR [TypeError: streamImg.src is undefined] at https://10.20.40.240/zm/skins/classic/views/js/watch.js line 217
06/12/17 22:57:19.096502 web_js[3420].ERR [getStreamCmdResponse stream error: Socket /var/lib/zoneminder/sock/zms-747369s.sock 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/latest/faq.html#why-can-t-i-see-streamed-images-when-i-can-see-stills-in-the-zone-window-etc for more information. - checkStreamForErrors()] at ?view=watch line
06/12/17 22:57:19.177770 web_js[3425].ERR [TypeError: streamImg.src is undefined] at https://10.20.40.240/zm/skins/classic/views/js/watch.js line 217
I have a socket in that directory, but it's got a different number in its name -- or at least, it did when I looked.

The embed link is this:

https://10.20.40.240/cgi-bin/zm/nph-zms ... 1497322148

and when I go there, I get an empty page, but no error in the ssl_access_log -- the request is there with a 200 status, just no video.

The undocumented problem after all the documented ones was 'setenforce 0'; that got me my first video embed, but it doesn't seem reliable.

I put the playback in mpeg mode, as you can see, but now I can't find that knob in the Options; it has a path to FFMPEG, which is the mode the monitor is in, and the binary is there and runs and has exec permissions for all, as does nph-zms. You can see what [edit:]I had to change ZMS path to, and the location [edit:]in which the repo installed nph-zms is:

/usr/libexec/zoneminder/cgi-bin/nph-zms

which [edit:]matches what the installed apache config file points to:

Code: Select all

[jra@zones zoneminder]$ cat /etc/httpd/conf.d/zoneminder.conf
#
# ZoneMinder Apache configuration file
# With SSLRequire and HTTPS auto redirect
# Modify this configuration to suit your requirements
#

# Auto Redirect HTTP requests to HTTPS
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(zm)(.*) https://%{SERVER_NAME}/$1$2 [R,L]

Alias /zm "/usr/share/zoneminder/www"
<Directory "/usr/share/zoneminder/www">
    SSLRequireSSL
    Options -Indexes MultiViews FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

ScriptAlias /cgi-bin/zm "/usr/libexec/zoneminder/cgi-bin"
<Directory "/usr/libexec/zoneminder/cgi-bin">
    SSLRequireSSL
    AllowOverride All
    Options ExecCGI FollowSymLinks
    Order allow,deny
    Allow from all
</Directory>
[edit:]I had to change the PATH to match, but the other two parts are as it came out of the tin.

My shm is around 40%, my load below 3, my disk below 50%. One camera, it's an ip314-pi Trendnet, which I'm told is a Hikvision, but that model's not on the wiki page. I've set all the relevant speeds at 20fps, and that's what the logs are showing me, as long as the monitor isn't open.

As noted above, this is on a VM for testing and workout purposes; I'll have it on a real machine for deployment -- though it may be over KVM, as it has to share the box with Concerto.

Any obvious or non-obvious things I should mention?
Last edited by Baylink on Tue Jun 13, 2017 3:28 pm, edited 1 time in total.
Baylink
Posts: 338
Joined: Sun Jun 19, 2005 3:19 am

Re: New 1.30.4 on C6 on Vbox: 20FPS, but intermittent video in Monitor

Post by Baylink »

FWIW: I put this in Mocord, and it immediately went into continuous-event, continuous-record mode, even though the camera was on a static interior night show.
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: New 1.30.4 on C6 on Vbox: 20FPS, but intermittent video in Monitor

Post by knight-of-ni »

Well, you didn't follow the README so it is not a surprise you ran into problems.

Step 7 instructs the user to use setenforce then goes on to describe how to make that permanent. You then modified your Script Alias, which got you into the trouble you are currently experiencing.

I suggest you start over, and this time follow the steps in the README, exactly as it is written. These steps are tested every week. They work perfectly as long as the end user does not deviate from them or skip any steps.

NOTE: Support for Centos 6 is approaching end of life. We have been run into build problems due to this distros age, and we expect there will be a show stopper here in the foreseeable future. Suggest you you use CentOS 7.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
Baylink
Posts: 338
Joined: Sun Jun 19, 2005 3:19 am

Re: New 1.30.4 on C6 on Vbox: 20FPS, but intermittent video in Monitor

Post by Baylink »

I see your attitude hasn't moderated one little bit, sir.

Yes, I did setenforce 0, and yes, I modified /etc/selinux/config. If you're suggesting that *when during the install I do that matters*, you need to be much clearer about it than you just were. :-)

If you are, in turn, suggesting that *that's why the code appears to be looking for a different sock file than exists*, then you need to be clearer about that, since that appears to be my root cause, at the moment.

And yes, I saw the note about C6.

*Well* after I should have. If you're going to deprecate it, you should probably do so *on the distributions page*, if not at least on the ZMrepo instructions page ... not inside the README on the target machine, after the user's already done the work of installing the distro.

And I didn't modify the ScriptAlias in the /etc/httpd.conf/zoneminder.conf file, if that's what you're suggesting; that's exactly as it came out of the tin.

So. You had your coffee yet? You in a mood to be helpful, instead of sniping?
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: New 1.30.4 on C6 on Vbox: 20FPS, but intermittent video in Monitor

Post by knight-of-ni »

I wasn't giving you any attitude. You asked if the reader saw anything obvious, and the obvious thing that came out of your statement was the directions were not followed. That's not a personal attack. That's based on the experience of many of those before you who have gone down the exact path as you. Do you want to get the problem fixed or not? You need to get your system into a known good state before you do anything else, and that is done by following each and every step.

If you want to argue about it, then maybe someone else will help you.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
Baylink
Posts: 338
Joined: Sun Jun 19, 2005 3:19 am

Re: New 1.30.4 on C6 on Vbox: 20FPS, but intermittent video in Monitor

Post by Baylink »

"""
Well, you didn't follow the README so it is not a surprise you ran into problems.

Step 7 instructs the user to use setenforce then goes on to describe how to make that permanent. You then modified your Script Alias, which got you into the trouble you are currently experiencing.
"""

If that's not attitude, I'm not as Aspie as you. :-)

But in fact, you still failed to answer my clarifying question, or my underlying one.

  • *Does* it matter *when* setenforce is done?
  • Why *do* you think I changed the location of nph-zms, or the ScriptAlias, when I did not?
  • Why *am* I getting errors about the sock file, and the Javascript object?
  • And what about Naomi?
What, exactly, is it that you believe I didn't do, and when?
Baylink
Posts: 338
Joined: Sun Jun 19, 2005 3:19 am

Re: New 1.30.4 on C6 on Vbox: 20FPS, but intermittent video in Monitor

Post by Baylink »

I infer from a posting you made elsewhere, Knnnigghtt, that you *are* the zmrepo maintainer.

Do you think you might update https://zmrepo.zoneminder.com/ first *to say that C6 is deprecated*? Maybe? Please?
Baylink
Posts: 338
Joined: Sun Jun 19, 2005 3:19 am

Re: New 1.30.4 on C6 on Vbox: 20FPS, but intermittent video in Monitor

Post by Baylink »

I guess not.

Well, this makes me *extremely* nervous about having specced this into a big expensive system for a client; clearly, it's regressed in the years since I touched it last.

<sigh>

Ok; it's open source; I'll do all the hard work myself. Until I locate a replacement. And then I'll update the world on all these things.
Last edited by Baylink on Wed Jun 28, 2017 1:40 am, edited 1 time in total.
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: New 1.30.4 on C6 on Vbox: 20FPS, but intermittent video in Monitor

Post by bbunge »

OK, I'll chime in on the fact that you were trying to use a Zoneminder on a vbox with a 20 fps camera. Not a great idea either the vbox or 20 fps. This is a security camera system not a production video outfit! Guess by C6 you mean Centos 6? If you are having issues with that give Ubuntu or Debian a try. Good install procedures for those in the WIKI! Yes, I'll admit that the readme may not be up to date. I could challenge you to use an old PC for a server like I do and you may be surprised how good Zoneminder does work! But we've likely hurt your feelings enough that you will go play in some other back yard. But if you decide to stay we will be glad to continue to work with you...
Baylink
Posts: 338
Joined: Sun Jun 19, 2005 3:19 am

Re: New 1.30.4 on C6 on Vbox: 20FPS, but intermittent video in Monitor

Post by Baylink »

*Everything* isn't up to date. :-}

The production box will be a dual-quad E5420 (I think) HP 2U, with 24GB of RAM and SAS drives.

But my problems didn't look like under-power, they looked like mis-config.

I'm about to go back and redo the whole thing from my notes, on U16.04LTS, and yes, with the camera turned way down, which I should have been smart enough to do from jumpstreet... while the memtest is finishing on the jet plane over on the other side of the room. :-)

But I suspect there's some question as to whether anyone *will* given this post sat here with valid questions at its end for over a week. We'll see, I guess.

You can ignore that image size question I tailgated on a thread elsewhere for now, to you; it likely won't be important here for a bit.

Thanks for the response.
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: New 1.30.4 on C6 on Vbox: 20FPS, but intermittent video in Monitor

Post by bbunge »

I usually check the forum for Ubuntu install problems daily and run the procedures on the WIKI every coup!e of weeks. I recommend Mariadb but make sure to make the required changes!
Baylink
Posts: 338
Joined: Sun Jun 19, 2005 3:19 am

Re: New 1.30.4 on C6 on Vbox: 20FPS, but intermittent video in Monitor

Post by Baylink »

Oh, Maria *is* usable?

Everything I read suggested 'how dare you?'. :-)
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: New 1.30.4 on C6 on Vbox: 20FPS, but intermittent video in Monitor

Post by bbunge »

Baylink wrote: Wed Jun 28, 2017 2:37 am Oh, Maria *is* usable?

Everything I read suggested 'how dare you?'. :-)
Yes, Mariadb is default on Centos and Debian 9. With either database setting adjustments will need to be made as the number of events build. innodb_buffer_pool_size for one. Mysqltuner works well for suggestions.
Baylink
Posts: 338
Joined: Sun Jun 19, 2005 3:19 am

Started over; 1.30.4 from ppa on C16.04.2LTS

Post by Baylink »

Followed the "quick and easy" guide (which isn't quite; gotta find out if my wiki password still works), and had the predictable troubles with ZMS_PATH -- with a new twist!

It doesn't space-strip what you put in the Config panels, and I accidentally put a trailing space... which I only finally located by looking at /var/log/apache2/access.log. It doesn't much like trailing spaces, but they're impossible to spot.

It's working now; 6 of my 14 Trend ip314pi cameras are configured and working, at 1280x720. Load is up over 10, which isn't especially promising, but shm is down around 27% of a GB, so that's not my problem. I have lots of tuning to do, I know.

A few questions:

Can I bookmark a montage *of a specific group*? Can I limit users to only specific groups?

How many viewers, either live or montage, can I hang on a single camera?

The machine in question is a 2x4 core E5225 (A Dell SC1420 office server, which is quiet enough for the enduser location; I was overruled), presently with 4GB of RAM and 20GB of swap (to 7200rpm SATA in hardware RAID 1 on an Adaptec 2410. I can go to 8 or 16GB, I'm pretty sure; possibly 32.

1 minute load averages are running from 5 to 19, depending on what I'm doing; that with 7 monitors -- 6 at 20fps FFMPEG to the Trend IP cams, and one pulling a weather radar JPG from a website.

Oh, another question: I'd like to create a script which extracts a Tech Support Sheet for people to include in forum posts with all the data in it necessary for people to assist them in diagnoses.

I assume such a thing would need to stick its fingers into both the database and the filesystem?

Would it actually be helpful to you folks who answer questions here?
Locked