zonminder 1.30.4 on Debian Stretch (armhf) does not start anymore

Forum for questions and support relating to the 1.30.x releases only.
Locked
rdorsch
Posts: 10
Joined: Sat Jun 03, 2017 7:26 am

zonminder 1.30.4 on Debian Stretch (armhf) does not start anymore

Post by rdorsch »

Hello,

since quite some time, my zoneminder (1.30.4) installation on Debian Stretch (9.3) does not start anymore.

Code: Select all

root@home:~# systemctl start zoneminder.service
Job for zoneminder.service failed because the control process exited with error code.
See "systemctl status zoneminder.service" and "journalctl -xe" for details.
root@home:~# systemctl status zoneminder.service
● zoneminder.service - ZoneMinder CCTV recording and surveillance system
   Loaded: loaded (/lib/systemd/system/zoneminder.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2018-02-25 12:46:22 CET; 4s ago
     Docs: http://zoneminder.readthedocs.org/en/latest/
  Process: 16173 ExecStart=/usr/bin/zmpkg.pl start (code=exited, status=95)

Feb 25 12:46:20 home systemd[1]: Starting ZoneMinder CCTV recording and surveillance system...
Feb 25 12:46:22 home zmpkg[16173]: INF [Sanity checking States table...]
Feb 25 12:46:22 home zmpkg[16173]: INF [Command: start]
Feb 25 12:46:22 home zmpkg.pl[16173]: Insecure directory in $ENV{PATH} while running with -T switch at /usr/bin/zmpkg.pl line 386.
Feb 25 12:46:22 home systemd[1]: zoneminder.service: Control process exited, code=exited status=95
Feb 25 12:46:22 home systemd[1]: Failed to start ZoneMinder CCTV recording and surveillance system.
Feb 25 12:46:22 home systemd[1]: zoneminder.service: Unit entered failed state.
Feb 25 12:46:22 home systemd[1]: zoneminder.service: Failed with result 'exit-code'.
root@home:~# 
Similar output shows journalctl -xe

Code: Select all

Feb 25 12:46:20 home systemd[1]: Starting ZoneMinder CCTV recording and surveillance system...
-- Subject: Unit zoneminder.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit zoneminder.service has begun starting up.
Feb 25 12:46:22 home zmpkg[16173]: INF [Sanity checking States table...]
Feb 25 12:46:22 home zmpkg[16173]: INF [Command: start]
Feb 25 12:46:22 home zmpkg.pl[16173]: Insecure directory in $ENV{PATH} while running with -T switch at /usr/bin/zmpkg.pl line 386.
Feb 25 12:46:22 home systemd[1]: zoneminder.service: Control process exited, code=exited status=95
Feb 25 12:46:22 home systemd[1]: Failed to start ZoneMinder CCTV recording and surveillance system.
-- Subject: Unit zoneminder.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit zoneminder.service has failed.
-- 
-- The result is failed.
Feb 25 12:46:22 home systemd[1]: zoneminder.service: Unit entered failed state.
Feb 25 12:46:22 home systemd[1]: zoneminder.service: Failed with result 'exit-code'.
Not sure if this one is the root cause: Insecure directory in $ENV{PATH} while running with -T switch at /usr/bin/zmpkg.pl line 386.

Code: Select all

my $output = qx(ps -o comm="" -p 1);
shows the relevant line in zmpkg.pl, the context is

Code: Select all

sub systemdRunning
{
    my $result = 0;

    my $output = qx(ps -o comm="" -p 1);
    chomp( $output );

    if ($output =~ /systemd/) {
        $result = 1;
    }

    return $result;
}
I have no idea where to start debugging, any hint is welcome.
bbunge
Posts: 2932
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: zonminder 1.30.4 on Debian Stretch (armhf) does not start anymore

Post by bbunge »

Looks like systemd is doing its job and preventing Zoneminder from starting due to a permissions error (of course you know that). Possible an update changed something. Since the install instructions on the WIKI are tested with a 64 bit OS there could be something with your armhf 32 bit system is different.

Set permissions of /etc/zm/zm.conf to root:www-data 740

chmod 740 /etc/zm/zm.conf

chown root:www-data /etc/zm/zm.conf

and

Change permissions in /usr/share/zoneminder/

chown -R www-data:www-data /usr/share/zoneminder/
rdorsch
Posts: 10
Joined: Sat Jun 03, 2017 7:26 am

Re: zonminder 1.30.4 on Debian Stretch (armhf) does not start anymore

Post by rdorsch »

Thanks for responding.

Code: Select all

chmod 740 /etc/zm/zm.conf
does not make too much sense for me, I have 640 (which is the Debian default, I think).

I must have had tomatoes on my eyes (I did not really understand that ENV(PATH) is my system path), the error message tells what is the problem.

My /usr/local/bin was 777 which is certainly not a good idea, but I edited a file as user in there and put that workaround in place to save the file (and forgot to restore 755).
Locked