No playback images, missing sockets and zombie processes

Forum for questions and support relating to the 1.26.x releases only.
Tumult
Posts: 10
Joined: Wed Aug 28, 2013 4:22 pm

No playback images, missing sockets and zombie processes

Post by Tumult »

Cannot get image streaming on playback.

Previous level of experience with same hardware/server: successfully did package install of ZoneMinder 1.25, all worked, image streaming, video streaming, only complaint was although "working", playback and playback control was just sucky (meaning way too slow, way too fast, choppy, controls confusing, and had an unacceptable lag time between click and response, sometimes no response). So, decided to upgrade.

Now, starting over:
-Clean install of Ubuntu server 12.04
-Installed ZoneMinder 1.26.3, from source, per instructions http://www.zoneminder.com/forums/viewto ... 30&t=21304
-Installed Cambozola V0.22 and configured to use Cambozola
-Configured to stream jpeg (vs. mpeg)
-Installed 2 monitors, an IP camera, and a USB webcam, both set to Monitor, both connect (orange), log is reporting that they are both capturing.

I power up the server, once running, I go to the console (from another computer running Chrome), and start ZoneMinder, at this point, a zombie process is produced (on server), who's parent process is zmdc.pl

But I pretend I didn't notice that and continue ...

I go to the view=watch view, I get all controls, and a window (where the image streaming should be) simply stating the Cambozola info (Cambozola V0.22 (c) Andy Wilcock, 2001) ... no images.

When I go to the view=watch view, the log immediately starts complaining about missing .sock files.:

getStreamCmdResponse stream error: socket_sendto( /tmp/zm/zms-629300s.sock ) failed: No such file or directory - checkStreamForErrors()
socket_sendto( /tmp/zm/zms-629300s.sock ) failed: No such file or directory

Watching the /tmp/zm directory, a .sock file is being repeatedly created/destroyed, same name, but with a "w" in place of the "s".

I've googled to the very end of the internet, and although this .sock issue has been reported all over the place for nearly every version of ZoneMinder, there seems to be no understood solution, just lots of guesses and magic. A popular fix is to edit the apache.conf, httpd.conf and/or zoneminder.conf files, usually something associated with entering, or removing the ScriptAlias line. I've tried every variant of this fix I can find (restarting each time), but to no avail, seems to have no effect what-so-ever.

I've got about 16 hours into debugging this with no success, any suggestions?
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Re: No playback images, missing sockets and zombie processes

Post by jameswilson »

Ive been with zm for a long time and I have never successfully built from source. That's my limitation not the codes.
However I have built the betas using the puppy module one of the main men provide with great success. Before that I was using apt and Ubuntu to do it for me. Id say the build went wrong. It does work and it works well.
At some point the apt way will be updated but in the mean time id say use the puppy module
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Tumult
Posts: 10
Joined: Wed Aug 28, 2013 4:22 pm

Re: No playback images, missing sockets and zombie processes

Post by Tumult »

I've seen a few references to this "puppy module". What is it? Where is it? What does it do?

With respect to installing from source, I am attempting to create a very detailed description of the process, so that it can be reproduced, even by mere mortals. So it would be nice to understand the issues I'm having if at all possible.
Tumult
Posts: 10
Joined: Wed Aug 28, 2013 4:22 pm

Re: No playback images, missing sockets and zombie processes

Post by Tumult »

OK, found something called Puppy Linux : WatchDog. Downloaded iso, burned dvd, tried to boot from dvd. Unfortunately, I cannot get this computer to recognize this dvd as a bootable option, I suspect its related to the whole UEFI buffoonery associated with the new computers. So switched BIOS back to legacy, got boot menu with DVD as option, selected it, and get:

ISOLINUX 3.31 Debian-2007-03-09 Copyright (C) 1994-2005 H. Peter Anvin
isolinux: Disk error 04, AX = 4274, drive EF

Boot failed: press a key to retry ...

I press a key, and it boots up into the previously installed Ubuntu 12.04.

The download appears to be good (there seems to be no checksum through which I could check). I can browse the disk, all seems to be there and intact.

Since my goal is to put together an zoneminder installation set of instruction for the mere mortal, this path appears to not be a good candidate. Again, any suggestions with the original questions?
linuxsense
Posts: 374
Joined: Wed Nov 07, 2007 1:59 am
Location: Huntington Beach, California
Contact:

Re: No playback images, missing sockets and zombie processes

Post by linuxsense »

Tumult wrote:I've seen a few references to this "puppy module". What is it? Where is it? What does it do?

With respect to installing from source, I am attempting to create a very detailed description of the process, so that it can be reproduced, even by mere mortals. So it would be nice to understand the issues I'm having if at all possible.
I am pretty sure he was speaking of 'puppet'. This works well on a minimal Ubuntu 13.04 server installation. Just do the bare min install with SSH, run a upgrade with apt-get, then follow the instructions on the website.

edit: Oops...forgot the URL: https://github.com/kylejohnson/puppet-zoneminder
linuxsense
Posts: 374
Joined: Wed Nov 07, 2007 1:59 am
Location: Huntington Beach, California
Contact:

Re: No playback images, missing sockets and zombie processes

Post by linuxsense »

One thought on your missing sockets and lack of playback: If you are running Apache with SSL enabled make sure that you setup the non-ssl vhost to redirect all requests to the ssl host. I used mod_rewrite. This might not be an issue for you but its required for my setup and I overlooked it for quite a while. Kicked myself when I figured it out.
Tumult
Posts: 10
Joined: Wed Aug 28, 2013 4:22 pm

Re: No playback images, missing sockets and zombie processes

Post by Tumult »

Good point, but I'm not running Apache with SSL enabled, so probably not the issue.

Going to attempt the puppet install. Tried to install 13.04, but computer goes tango-uniform (no indication of life other than the power light) after grub menu when booting up from install disk. Not going to try to figure that one out, I'm already 12 levels of distraction from my original goal (installing 32 cameras at four sites). Reinstalling 12.04 with only ssh support. Will attempt to do puppet install there.
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Re: No playback images, missing sockets and zombie processes

Post by jameswilson »

yeah sorry was meant to be puppet
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Tumult
Posts: 10
Joined: Wed Aug 28, 2013 4:22 pm

Re: No playback images, missing sockets and zombie processes

Post by Tumult »

So far, this puppet install works ... not at all. Here's what I've done:

Reinstalled Ubuntu 12.04 server with only ssh support

# sudo su
# apt-get update
# apt-get upgrade
# apt-get dist-upgrade
# nano /etc/network/interfaces

auto eth0
iface eth0 inet static
address 192.168.2.10
network 192.168.2.0
netmask 255.255.255.0
broadcast 192.168.2.255
gateway 192.168.2.2
dns-nameservers 192.168.2.2

# shutdown -r now

$ sudo apt-get update && sudo apt-get install puppet git-core -y
$ git clone git://github.com/kylejohnson/puppet-zoneminder.git zoneminder
$ sudo puppet apply --verbose --modulepath=`pwd` -e 'include zoneminder'
$ sudo shutdown -r now

Other computer, via Chrome: http://192.168.2.10
...
Apache/2.2.22 (Ubuntu) Server at 192.168.2.10 Port 80

So, apache server is running, addresses good, etc.

Other computer, via Chrome: http://192.168.2.10/zm
Not Found
The requested URL /zm/ was not found on this server.
Apache/2.2.22 (Ubuntu) Server at 192.168.2.10 Port 80

Check server for /var/www/zm/ ... Present, but empty

Searched for zoneminder.conf ... found at /etc/ld.so.conf.d/zoneminder.conf, but can find no apache include and/or symlinks to it

Tried to stop service: $ sudo /etc/init.d/zm stop

Stopping ZoneMinder: /etc/init.d/zm: 22: /etc/init.d/zm: /usr/local/bin/zmpkg.pl: not found
failure

And of course, same with starting service: $ sudo /etc/init.d/zm start

Starting ZoneMinder: /etc/init.d/zm: 14: /etc/init.d/zm: /usr/local/bin/zmpkg.pl: not found
failure

Checked the mysql database server, there is no zm database: mysql -e 'show databases' ... no zm database.

Tried running ldconfig, and then starting (although not clear whats going on here, but was suggested in sites notes), but still nothing.

Am I missing something? Are there additional steps beyond what is given at the site and README file? It seems that there are zoneminder pieces laying around, but the application itself seems to be missing.
Tumult
Posts: 10
Joined: Wed Aug 28, 2013 4:22 pm

Re: No playback images, missing sockets and zombie processes

Post by Tumult »

Tried again, noticed after puppet apply command:

warning: Could not retrieve fact fqdn
info: Applying configuration version '1379524137'
err: /Stage[main]/Zoneminder::Install::Ffmpeg/Exec[clone-ffmpeg]/returns: change from notrun to 0 failed: Command exceeded timeout at /home/prowash/zoneminder/manifests/install/ffmpeg.pp:8
notice: /Stage[main]/Zoneminder::Install::Ffmpeg/Exec[configure-ffmpeg]: Dependency Exec[clone-ffmpeg] has failures: true
warning: /Stage[main]/Zoneminder::Install::Ffmpeg/Exec[configure-ffmpeg]: Skipping because of failed dependencies
notice: /Stage[main]/Zoneminder::Install::Ffmpeg/Exec[make-ffmpeg]: Dependency Exec[clone-ffmpeg] has failures: true
warning: /Stage[main]/Zoneminder::Install::Ffmpeg/Exec[make-ffmpeg]: Skipping because of failed dependencies
notice: /Stage[main]/Zoneminder::Install::Ffmpeg/Exec[make-install-ffmpeg]: Dependency Exec[clone-ffmpeg] has failures: true
warning: /Stage[main]/Zoneminder::Install::Ffmpeg/Exec[make-install-ffmpeg]: Skipping because of failed dependencies
notice: /Stage[main]/Zoneminder::Install::Ffmpeg/Exec[make-install-libs-ffmpeg]: Dependency Exec[clone-ffmpeg] has failures: true
warning: /Stage[main]/Zoneminder::Install::Ffmpeg/Exec[make-install-libs-ffmpeg]: Skipping because of failed dependencies
notice: /Stage[main]/Zoneminder::Install::Zoneminder/Exec[clone-zoneminder]: Dependency Exec[clone-ffmpeg] has failures: true
warning: /Stage[main]/Zoneminder::Install::Zoneminder/Exec[clone-zoneminder]: Skipping because of failed dependencies
notice: /Stage[main]/Zoneminder::Install::Zoneminder/File[/usr/local/src/zoneminder/configure.sh]: Dependency Exec[clone-ffmpeg] has failures: true
warning: /Stage[main]/Zoneminder::Install::Zoneminder/File[/usr/local/src/zoneminder/configure.sh]: Skipping because of failed dependencies
notice: /Stage[main]/Zoneminder::Install::Zoneminder/Exec[configure-zm]: Dependency Exec[clone-ffmpeg] has failures: true
warning: /Stage[main]/Zoneminder::Install::Zoneminder/Exec[configure-zm]: Skipping because of failed dependencies
notice: /Stage[main]/Zoneminder::Install::Zoneminder/Exec[make-zm]: Dependency Exec[clone-ffmpeg] has failures: true
warning: /Stage[main]/Zoneminder::Install::Zoneminder/Exec[make-zm]: Skipping because of failed dependencies
notice: /Stage[main]/Zoneminder::Install::Zoneminder/Exec[make-install-zm]: Dependency Exec[clone-ffmpeg] has failures: true
warning: /Stage[main]/Zoneminder::Install::Zoneminder/Exec[make-install-zm]: Skipping because of failed dependencies
notice: /Stage[main]/Zoneminder::Config/Exec[create-schema]: Dependency Exec[clone-ffmpeg] has failures: true
warning: /Stage[main]/Zoneminder::Config/Exec[create-schema]: Skipping because of failed dependencies
notice: /Stage[main]/Zoneminder::Config/Exec[ldconfig]: Dependency Exec[clone-ffmpeg] has failures: true
warning: /Stage[main]/Zoneminder::Config/Exec[ldconfig]: Skipping because of failed dependencies
notice: /Stage[main]/Zoneminder::Config/Exec[grant-schema-privileges]: Dependency Exec[clone-ffmpeg] has failures: true
warning: /Stage[main]/Zoneminder::Config/Exec[grant-schema-privileges]: Skipping because of failed dependencies
notice: /Stage[main]/Zoneminder::Service/Service[apache2]: Dependency Exec[clone-ffmpeg] has failures: true
warning: /Stage[main]/Zoneminder::Service/Service[apache2]: Skipping because of failed dependencies
notice: /Stage[main]/Zoneminder::Service/Service[zm]: Dependency Exec[clone-ffmpeg] has failures: true
warning: /Stage[main]/Zoneminder::Service/Service[zm]: Skipping because of failed dependencies
notice: Finished catalog run in 600.16 seconds


ffmpeg seems to be a problem, so I:

$ sudo apt-get ffmpeg
$ sudo puppet apply --verbose --modulepath=`pwd` -e 'include zoneminder'

and get much better (installation) results.

ZoneMinder is now running, but sadly the playback on the monitor is even worse (1 frame every 9 seconds) than it was when I started this experiment four weeks ago, with a package install of v1.25. :(

I can't imagine I need more than a dedicated 3.4 GHz AMD Quad-Core A10-5700 with 8GB RAM to monitor a single IP camera. Not sure where to go from here ...


Oh, and one more thing, I'm still getting a zombie process out of zmdc.pl when I start zoneminder. I'm beginning to believe this is a common zoneminder bug. To check if you've got one, after starting zoneminder:

$ ps aux | awk '{print $8 " " $2'} | grep -w Z
Z 1393
If it returns a pid, identify its parent:

$ pstree -ps 1393
init(1)───zmdc.pl(1392)───killall(1393)

In this case (as always) its zmdc.pl that is not reaping this process. I don't know if it adversely affects zoneminder, but it does interfer with my attempts at doing remote reboots (i.e., sudo shutdown -r now); it will not actually fully shutdown when there is a zombie process, at least on my machine.
Last edited by Tumult on Wed Sep 18, 2013 6:41 pm, edited 1 time in total.
linuxsense
Posts: 374
Joined: Wed Nov 07, 2007 1:59 am
Location: Huntington Beach, California
Contact:

Re: No playback images, missing sockets and zombie processes

Post by linuxsense »

Sounds like you might need the Cambozola package installed. Grab this:

http://www.andywilcock.com/code/cambozo ... est.tar.gz

Unpack it and copy the cambozola.jar package from the 'dist' folder and place it in your 'zm' folder under your web root. Chown it to www-data:www-data then enable the option to use it in ZM's options under 'Images'.
Tumult
Posts: 10
Joined: Wed Aug 28, 2013 4:22 pm

Re: No playback images, missing sockets and zombie processes

Post by Tumult »

Installed Cambozola, that did make it work better, its now usable. Unfortunately, the playback controls haven't really changed since 1.25, where I started (and unfortunately, my client's only concern seems to be that he wants easy play back controls). They behave as they always have. Would be nice if it looked like the controls one gets with an export ... maybe I'll dive into it one day.

Also, still occasionally losing sockets during playback. Nothing like before (constant creation/losing of sockets). Its intermittent, but still there.
codabiz
Posts: 59
Joined: Sun Jan 04, 2009 10:16 am
Location: London, UK

Re: No playback images, missing sockets and zombie processes

Post by codabiz »

I also have the no video problem with ZM 1.26.3 on Ubuntu Server 12.04.
Logs show:

getStreamCmdResponse stream error: socket_sendto( /tmp/zm/zms-629300s.sock ) failed: No such file or directory - checkStreamForErrors()
socket_sendto( /tmp/zm/zms-629300s.sock ) failed: No such file or directory

There are numerous comments around the web about this problem but the Zoneminder Wiki for Fedora 18 install holds a clue: "Make sure your cgi-bin ScriptAlias is correct"

I haven't resolved this problem yet!
c128
Posts: 88
Joined: Sat Sep 14, 2013 3:36 pm

Re: No playback images, missing sockets and zombie processes

Post by c128 »

Just to add another "and me".

I went from a previously working 1.25 install to the latest 1.26 installed using Puppet.
A known good 1.25 camera and config with 1.26 won't generate any live video, I just get multiple entries in the log along the lines of:

Code: Select all

2013-09-22 14:09:36.202410	web_js	26152	ERR	getStreamCmdResponse stream error: socket_sendto( /tmp/zm/zms-260348s.sock ) failed: No such file or directory - checkStreamForErrors()	?view=watch	
2013-09-22 14:09:36.105172	web_php	26152	ERR	socket_sendto( /tmp/zm/zms-260348s.sock ) failed: No such file or directory	includes/functions.php	2323
2013-09-22 14:09:30.116367	web_js	26152	ERR	getStreamCmdResponse stream error: socket_sendto( /tmp/zm/zms-260348s.sock ) failed: No such file or directory - checkStreamForErrors()	?view=watch	
2013-09-22 14:09:30.000374	web_php	26152	ERR	socket_sendto( /tmp/zm/zms-260348s.sock ) failed: No such file or directory	includes/functions.php	2323
2013-09-22 14:09:23.841918	web_js	26152	ERR	getStreamCmdResponse stream error: socket_sendto( /tmp/zm/zms-260348s.sock ) failed: No such file or directory - checkStreamForErrors()	?view=watch	
2013-09-22 14:09:23.745996	web_php	26152	ERR	socket_sendto( /tmp/zm/zms-260348s.sock ) failed: No such file or directory	includes/functions.php	2323
linuxsense
Posts: 374
Joined: Wed Nov 07, 2007 1:59 am
Location: Huntington Beach, California
Contact:

Re: No playback images, missing sockets and zombie processes

Post by linuxsense »

You guys with socket issues, did you do an upgrade or a fresh install of the DB? I had some issues upgrading the DB, got much better results just starting from scratch. If any of you are still stuck feel free to PM me and I can SSH to your box and check it out if you would like.
Locked