[solved] Service won't start on Debian 10 + ZM 1.34.15

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
ojIshefosk
Posts: 3
Joined: Wed Jun 03, 2020 1:40 pm

[solved] Service won't start on Debian 10 + ZM 1.34.15

Post by ojIshefosk »

I'm exploring Zoneminder and having a bear of a time with Debian 10 and Zoneminder 1.34.15. I followed the wiki guide here. The web interface is fine, AFAICT the database is accessible, but the Zoneminder service won't start and I'm not seeing any obvious errors in the logs/output. Below is output from starting the service, systemd logs, trying to start zmpkg.pl manually, and /var/logs/zm/stuff_that_seemed_important. I've found several troubleshooting guides and followed what seemed relevant without luck. Any advice on where to look for additional clues, or pointing out something I missed in the logs below would be much appreciated.

Code: Select all

root@vserver:/home/jimmy# systemctl start zoneminder
Job for zoneminder.service failed because the control process exited with error code.
See "systemctl status zoneminder.service" and "journalctl -xe" for details.

Code: Select all

root@vserver:/home/jimmy# systemctl status zoneminder.service
● zoneminder.service - ZoneMinder CCTV recording and surveillance system
   Loaded: loaded (/lib/systemd/system/zoneminder.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Wed 2020-06-03 09:32:07 EDT; 1s ago
  Process: 1581 ExecStart=/usr/bin/zmpkg.pl start (code=exited, status=1/FAILURE)

Code: Select all

root@vserver:/home/jimmy# journalctl -xe
-- A start job for unit zoneminder.service has begun execution.
--
-- The job identifier is 2794.
Jun 03 09:32:17 vserver zmpkg[1598]: INF [Sanity checking States table...]
Jun 03 09:32:17 vserver zmpkg[1598]: INF [Command: start]
Jun 03 09:32:17 vserver su[1606]: (to www-data) root on none
Jun 03 09:32:17 vserver su[1606]: pam_unix(su:session): session opened for user www-data by (uid=0) 
Jun 03 09:32:17 vserver systemd[1]: Started Session c17 of user www-data.
-- Subject: A start job for unit session-c17.scope has finished successfully
-- Defined-By: systemd
-- Support: https://www.debian.org/support--
-- A start job for unit session-c17.scope has finished successfully.
--
-- The job identifier is 2875.
Jun 03 09:32:17 vserver su[1606]: pam_unix(su:session): session closed for user www-data
Jun 03 09:32:17 vserver su[1609]: (to www-data) root on none
Jun 03 09:32:17 vserver su[1609]: pam_unix(su:session): session opened for user www-data by (uid=0) 
Jun 03 09:32:17 vserver systemd[1]: Started Session c18 of user www-data.
-- Subject: A start job for unit session-c18.scope has finished successfully
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit session-c18.scope has finished successfully.
--
-- The job identifier is 2960.
Jun 03 09:32:17 vserver systemd[1]: session-c17.scope: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The unit session-c17.scope has successfully entered the 'dead' state.
Jun 03 09:32:17 vserver su[1609]: pam_unix(su:session): session closed for user www-data
Jun 03 09:32:17 vserver systemd[1]: session-c18.scope: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The unit session-c18.scope has successfully entered the 'dead' state.
Jun 03 09:32:17 vserver systemd[1]: zoneminder.service: Control process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- An ExecStart= process belonging to unit zoneminder.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
Jun 03 09:32:17 vserver systemd[1]: zoneminder.service: Failed with result 'exit-code'.

Code: Select all

root@vserver:/usr/bin# zmpkg.pl version
1.34.15
root@vserver:/usr/bin# zmpkg.pl start
06/03/2020 09:55:16.513465 zmpkg[795].INF [main:310] [Sanity checking States table...]
06/03/2020 09:55:16.566363 zmpkg[795].INF [main:95] [Command: start]
06/03/2020 09:55:16.725896 zmsystemctl[801].INF [main:71] [Redirecting command through systemctl]
Job for zoneminder.service failed because the service did not take the steps required by its unit configuration.
See "systemctl status zoneminder.service" and "journalctl -xe" for details.

Code: Select all

root@vserver:/var/log/zm# cat ./zmpkg.log 
06/03/2020 09:55:16.513465 zmpkg[795].INF [main:310] [Sanity checking States table...]
06/03/2020 09:55:16.566363 zmpkg[795].INF [main:95] [Command: start]
06/03/2020 09:55:16.788538 zmpkg[812].INF [main:310] [Sanity checking States table...]
06/03/2020 09:55:16.790249 zmpkg[812].INF [main:95] [Command: start]
06/03/2020 09:55:18.186586 zmpkg[812].INF [main:203] [Single server configuration detected. Starting up services.]
06/03/2020 09:55:28.825673 zmpkg[926].INF [main:310] [Sanity checking States table...]
06/03/2020 09:55:28.827276 zmpkg[926].INF [main:95] [Command: start]
06/03/2020 09:55:39.071546 zmpkg[941].INF [main:310] [Sanity checking States table...]
06/03/2020 09:55:39.074625 zmpkg[941].INF [main:95] [Command: start]
.... over and over and over....
Last edited by ojIshefosk on Wed Jun 03, 2020 7:25 pm, edited 1 time in total.
SkippyDo
Posts: 221
Joined: Mon Nov 20, 2017 6:49 pm

Re: Service won't start on Debian 10 + ZM 1.34.15

Post by SkippyDo »

No idea what your web server is. But, in general (and this isn't for 1.34, but has, I think, relevance):

viewtopic.php?t=26113
ojIshefosk
Posts: 3
Joined: Wed Jun 03, 2020 1:40 pm

Re: Service won't start on Debian 10 + ZM 1.34.15

Post by ojIshefosk »

Thanks for the reply. I am using Apache. Every path I can think of has correct permissions. I even wiped the system clean and started from scratch following the previously mentioned guide in case I missed something or performed commands out of order. No luck, same situation.

I don't have /var/lib/zoneminder, but /var/lib/zm exists:

Code: Select all

root@vserver:/var/log# ls /var/lib/zm -lah
total 8.0K
drwxr-xr-x  2 www-data www-data 4.0K May 25 08:23 .
drwxr-xr-x 31 root     root     4.0K Jun  3 14:04 ..
The storage directory:

Code: Select all

root@vserver:/home/jimmy# ls -lah /var/cache/zoneminder/
total 24K
drwxr-xr-x  6 www-data www-data 4.0K Jun  3 14:04 .
drwxr-xr-x 12 root     root     4.0K Jun  3 14:04 ..
drwxr-xr-x  2 www-data www-data 4.0K Jun  3 14:08 cache
drwxr-xr-x  2 www-data www-data 4.0K May 25 08:23 events
drwxr-xr-x  2 www-data www-data 4.0K May 25 08:23 images
drwxr-xr-x  2 www-data www-data 4.0K May 25 08:23 temp
Everything else:

Code: Select all

root@vserver:/home/jimmy# grep PATH /etc/zm/conf.d/01-system-paths.conf
ZM_PATH_ZMS=/zm/cgi-bin/nph-zms
ZM_PATH_MAP=/dev/shm
ZM_PATH_SOCKS=/var/run/zm
ZM_PATH_LOGS=/var/log/zm
ZM_PATH_SWAP=/tmp/zm
ZM_PATH_ARP="/usr/sbin/arp"

root@vserver:/home/jimmy# ls -lah /dev/shm
total 0
drwxrwxrwt  2 root root   40 Jun  3 12:51 .
drwxr-xr-x 19 root root 3.5K Jun  3 12:51 ..

root@vserver:/home/jimmy# ls -lah /var/run/zm
total 0
drwxr-xr-x  2 www-data www-data  60 Jun  3 14:05 .
drwxr-xr-x 20 root     root     600 Jun  3 14:04 ..
srwxr-xr-x  1 www-data www-data   0 Jun  3 14:05 zmdc.sock

root@vserver:/home/jimmy# ls -lah /var/log/zm
total 48K
drwxr-xr-x 2 www-data root     4.0K Jun  3 14:08 .
drwxr-xr-x 8 root     root     4.0K Jun  3 14:04 ..
-rw-r--r-- 1 www-data www-data  759 Jun  3 14:08 web_php.log
-rw-r--r-- 1 www-data www-data    0 Jun  3 14:04 zmcamtool.log
-rw-r--r-- 1 www-data www-data 1.4K Jun  3 14:05 zmdc.log
-rw-r--r-- 1 www-data www-data  101 Jun  3 14:05 zmfilter_1.log
-rw-r--r-- 1 www-data www-data  101 Jun  3 14:05 zmfilter_2.log
-rw-r--r-- 1 www-data www-data  11K Jun  3 14:16 zmpkg.log
-rw-r--r-- 1 www-data www-data   93 Jun  3 14:05 zmstats.log
-rw-r--r-- 1 www-data www-data  161 Jun  3 14:05 zmupdate.log
-rw-r--r-- 1 www-data www-data   99 Jun  3 14:05 zmwatch.log

root@vserver:/home/jimmy# ls -lah /tmp/zm
total 8.0K
drwxr-xr-x  2 www-data www-data 4.0K Jun  3 14:04 .
drwxrwxrwt 11 root     root     4.0K Jun  3 14:09 ..
ojIshefosk
Posts: 3
Joined: Wed Jun 03, 2020 1:40 pm

Re: [solved] Service won't start on Debian 10 + ZM 1.34.15

Post by ojIshefosk »

I kept digging around in the forums and found this.

Code: Select all

root@vserver# vim /lib/systemd/system/zoneminder.service

# There is a commented line -- User= -- which should be uncommented
# User=www-data
Post Reply