Source shows red and running status confusion

Forum for questions and support relating to the 1.27.x releases only.
Locked
WayneM
Posts: 6
Joined: Tue Dec 10, 2013 3:25 pm

Source shows red and running status confusion

Post by WayneM »

i was using v1.27 on an Arm board.
the status in Console is always 'Stopped', the Name list showed Black without poplink and the Source list showed red.
all the log messages seem right. and I can record videos using ffmpeg.

when i ran '/usr/bin/zmdc.pl check' in console, it got 'running';
and when i ran '/usr/bin/zmdc.pl status' in console, it got the following:

Code: Select all

'zmaudit.pl -c' running since 14/03/16 09:31:53, pid = 568, valid
'zmfilter.pl' running since 14/03/16 09:31:53, pid = 560, valid
'zmc -m 3' running since 14/03/16 09:31:51, pid = 542, valid
'zmc -d /dev/video0' running since 14/03/16 09:31:52, pid = 551, valid
'zmupdate.pl -c' running since 14/03/16 09:31:55, pid = 589, valid
'zmwatch.pl' running since 14/03/16 09:31:54, pid = 580, valid
but, i added some debug print in /var/www/html/includes/functions.php, i found:
in function daemonCheck(), '/usr/bin/zmdc.pl check' got 'stopped';

why can this happened ? what is the difference between running perl script on console and calling by the php script ?


the log:

Code: Select all

2014-04-06 12:06:31.948974	zmc_dvideo0	2043	INF	Monitor-1: 4000 - Capturing at 33.33 fps	zm_monitor.cpp	2831
2014-04-06 12:06:01.985260	zmc_dvideo0	2043	INF	Monitor-1: 3000 - Capturing at 34.48 fps	zm_monitor.cpp	2831
2014-04-06 12:05:32.011962	zmc_dvideo0	2043	INF	Monitor-1: 2000 - Capturing at 33.33 fps	zm_monitor.cpp	2831
2014-04-06 12:05:02.053558	zmc_dvideo0	2043	INF	Monitor-1: 1000 - Capturing at 32.26 fps	zm_monitor.cpp	2831
2014-04-06 12:04:35.216920	zmupdate	2081	ERR	Error check failed: '501 Protocol scheme 'http' is not supported'	zmupdate.pl	
2014-04-06 12:04:35.150630	zmupdate	2081	INF	Checking for updates	zmupdate.pl	
2014-04-06 12:04:34.309330	zmdc	2016	INF	'zmupdate.pl -c' starting at 14/04/06 12:04:34, pid = 2081	zmdc.pl	
2014-04-06 12:04:34.305540	zmdc	2081	INF	'zmupdate.pl -c' started at 14/04/06 12:04:34	zmdc.pl	
2014-04-06 12:04:34.037140	zmwatch	2068	INF	Watchdog pausing for 30 seconds	zmwatch.pl	
2014-04-06 12:04:34.033750	zmwatch	2068	INF	Watchdog starting	zmwatch.pl	
2014-04-06 12:04:33.428680	zmfilter	2052	INF	Scanning for events	zmfilter.pl	
2014-04-06 12:04:33.398990	zmdc	2068	INF	'zmwatch.pl' started at 14/04/06 12:04:33	zmdc.pl	
2014-04-06 12:04:33.378780	zmdc	2016	INF	'zmwatch.pl' starting at 14/04/06 12:04:33, pid = 2068	zmdc.pl	
2014-04-06 12:04:32.280700	zmdc	2060	INF	'zmaudit.pl -c' started at 14/04/06 12:04:32	zmdc.pl	
2014-04-06 12:04:32.280670	zmdc	2016	INF	'zmaudit.pl -c' starting at 14/04/06 12:04:32, pid = 2060	zmdc.pl	
2014-04-06 12:04:31.572600	zmdc	2052	INF	'zmfilter.pl' started at 14/04/06 12:04:31	zmdc.pl	
2014-04-06 12:04:31.568330	zmdc	2016	INF	'zmfilter.pl' starting at 14/04/06 12:04:31, pid = 2052	zmdc.pl	
2014-04-06 12:04:31.160430	zmc_dvideo0	2043	INF	Starting Capture	zmc.cpp	195
2014-04-06 12:04:31.080108	zmc_dvideo0	2043	INF	No direct match for the selected palette and target colorspace. Format conversion is required, performance penalty expected	zm_local_camera.cpp	408
2014-04-06 12:04:31.078979	zmc_dvideo0	2043	INF	Selected capture palette: YUV 4:2:2 (YUYV) (YUYV)	zm_local_camera.cpp	346
2014-04-06 12:04:30.924870	zmdc	2043	INF	'zmc -d /dev/video0' started at 14/04/06 12:04:30	zmdc.pl	
2014-04-06 12:04:30.924500	zmdc	2016	INF	'zmc -d /dev/video0' starting at 14/04/06 12:04:30, pid = 2043	zmdc.pl	
2014-04-06 12:04:27.119050	zmdc	2016	INF	Server starting at 14/04/06 12:04:27	zmdc.pl	
2014-04-06 12:04:25.912720	zmpkg	1998	INF	Command: start	zmpkg.pl		
Attachments
zm.PNG
zm.PNG (7.28 KiB) Viewed 3027 times
proxenus
Posts: 3
Joined: Mon Apr 07, 2014 2:13 pm

Re: Source shows red and running status confusion

Post by proxenus »

Did you ever figure this out? I am having the exact same problem.

Systemctl starts zoneminder with no problems, all the daemons are running, but when I open the console in a browser the status is "stopped". I can't click the links to view live streams, but events get recorded and the counters are updated on the page.

I'm on Fedora 20 and v1.27
proxenus
Posts: 3
Joined: Mon Apr 07, 2014 2:13 pm

Re: Source shows red and running status confusion

Post by proxenus »

I got it! I found that when I started the console with "systemctl start zoneminder.service" the file zmdc.sock was created in /tmp/zm/

THEN I saw that when I started zoneminder from the console zmdc.sock was created in /tmp/systemd-httpd.service-XWAEDkq/tmp/zm/

I had to modify /usr/lib/systemd/system/httpd.service and change PrivateTmp=true to false. This is not advised due to security risks, but in my case it was acceptable.
WayneM
Posts: 6
Joined: Tue Dec 10, 2013 3:25 pm

Re: Source shows red and running status confusion

Post by WayneM »

I have not found the real reason till now.
I was running the zoneminder on pandaboard using minimal linux rootfs, not any linux distribution.
I checked my system and found there is only one zmdc.sock in /tmp/zm . so your solution does not suit mine.
WayneM
Posts: 6
Joined: Tue Dec 10, 2013 3:25 pm

Re: Source shows red and running status confusion

Post by WayneM »

it fails here in zmdc.pl:

Code: Select all

my $server_up = connect( CLIENT, $saddr );
if ( !$server_up )
{
    if ( $command eq "logrot" )
    {
        exit();
    }
    if ( $command eq "check" )
    {
        print( "stopped\n" );
        exit();
    }
it is certain now:
1. run "zmdc.pl check" in console , connecting to /tmp/zm/zmdc.sock succeeds it can run throuth to Line 180 and print "running";
2. "zmdc.pl check" called by php script, connecting to /tmp/zm/zmdc.sock fails, and it print "stopped" at Line 143.
proxenus
Posts: 3
Joined: Mon Apr 07, 2014 2:13 pm

Re: Source shows red and running status confusion

Post by proxenus »

I would try stopping your zoneminder from the CLI, then starting it from the web interface, does it create a zmdc.sock in /tmp/zm/? If it's not there I was run a search and see if it's being put somewhere else.

If it is there perhaps there is a difference of ownership or permissions?
Locked