[SOLVED] Live View not working due to missing socket

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
zmeggyesi
Posts: 19
Joined: Mon Mar 05, 2018 12:10 pm

[SOLVED] Live View not working due to missing socket

Post by zmeggyesi »

Hi All,

I've recently installed ZoneMinder by building it via packpack (since the Raspbian/Debian packages are still on 1.30), following the docs here: https://zoneminder.readthedocs.io/en/la ... kpack.html

I managed to link up two TP-Link NC450 cameras (that were linked up previously too), and I get a green source, with seemingly recording going on, but for the life of me I cannot figure out why Live View is not working.
The Chrome DevTool displays a stream of errors saying

Code: Select all

getStreamCmdResponse stream error: Socket /var/run/zm/zms-127723s.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.
, but if I'm running watch -n 1 ls -lah /var/run/zm, I can see the socket being created then destroyed, while .lock files fill up the directory.

The configs are mostly defaults, I only changed the ZMS path from nph-zms to zms only, but as far as I can tell, Apache ScriptAlias directives don't overlap (what I've seen to be a common cause based on Github issues and forum posts), and the paths are otherwise good.

Can anyone lend me a hand with this?
Last edited by zmeggyesi on Thu Sep 27, 2018 11:17 am, edited 1 time in total.
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Live View not working due to missing socket

Post by knight-of-ni »

Changing nph-zms to zms is guaranteed to break things. Yes, it's a symlink, but zms behaves differently when called by a different name.

Since you used the build system, we know what your PATH_ZMS should be. See:
https://github.com/ZoneMinder/zoneminde ... /rules#L28

It needs to match that, exactly, w/o the quotes or any extra whitespace following it.
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/
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Live View not working due to missing socket

Post by knight-of-ni »

Once you fix path_zms, if that still does not fix things, can you post your zoneminder apache config?

I'm looking at the apache config in the debian build folder, and it looks suspiciously too simple:
https://github.com/ZoneMinder/zoneminde ... pache.conf

If yours matches that, make a backup of it, then replace it with the one that ships with Ubuntu:
https://github.com/ZoneMinder/zoneminde ... inder.conf

None of us develop on Debian, so this might very well be a case of your particular build needing some love.
We might very well need someone to be a temporary guinea pig to get it right for Debian builds.
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/
zmeggyesi
Posts: 19
Joined: Mon Mar 05, 2018 12:10 pm

Re: Live View not working due to missing socket

Post by zmeggyesi »

Thanks for the tips. I'll make the changes tomorrow (once I'm back on one subnet with the box), and let you know if either option worked.

As it stands, I'd be willing to run a few tests on said box, if they're not time-critical, and let you know how things work out. I would need some sort of guide as to how to run those tests, though.
zmeggyesi
Posts: 19
Joined: Mon Mar 05, 2018 12:10 pm

Re: Live View not working due to missing socket

Post by zmeggyesi »

I reset the ZMS path, but apparently, the Apache config was already the Ubuntu version, introduced by the build system - so at least that's good.
The error still persists, though.

I notice a repeated line through the log:

Code: Select all

zmc_m3		11860	WAR	libjpeg-turbo is required for reading a JPEG directly into a RGB32 buffer, reading into a RGB24 buffer instead.	zm_image.cpp	1148
This is only warning-level, not an error, so it might not be related, but since libjpeg-turbo is already installed according to apt-cache, it's strange nonetheless.

Code: Select all

root@observer:/etc/apache2/conf-enabled# apt-cache policy libjpeg62-turbo
libjpeg62-turbo:
  Installed: 1:1.5.1-2
  Candidate: 1:1.5.1-2
  Version table:
 *** 1:1.5.1-2 500
        500 http://raspbian.raspberrypi.org/raspbian stretch/main armhf Packages
        100 /var/lib/dpkg/status
But let's deal with one problem at a time...
Attachments
zoneminder.conf.txt
TXT extension only to allow uploading
(1.61 KiB) Downloaded 131 times
zmeggyesi
Posts: 19
Joined: Mon Mar 05, 2018 12:10 pm

Re: Live View not working due to missing socket

Post by zmeggyesi »

So it turns out that this line

Code: Select all

WAR [zmc_m4] [libjpeg-turbo is required for reading a JPEG directly into a RGB32 buffer, reading into a RGB24 buffer instead.]
is not a warning. It seems to be, in fact a fatal error, and once I set the color space to 24-bit to get around this (despite libjpeg-turbo being installed), the Live view started working just fine.
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: [SOLVED] Live View not working due to missing socket

Post by knight-of-ni »

This is strange. This is one of those things that we though was done and settled years ago.

In Debian packaging, the control file contains the list of build dependencies:
https://github.com/ZoneMinder/zoneminde ... an/control

Looking at that, it is missing the libjpeg-turbo package. I'd expect a line like the one in the Ubuntu control file:
https://github.com/ZoneMinder/zoneminde ... ontrol#L20

First, make sure a libjpeg-turbo package is available in Debian with one of those three names shown in the link above.
If yes, then copy paste that line into your Debian control file and re-build zoneminder.
If no, then we have more work to do to figure out what libjpeg-turbo header files we need and where they are in your flavor of Debian.
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/
Post Reply