Upgrade from 1.32 to 1.34

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
JBertrand
Posts: 5
Joined: Tue May 16, 2017 8:21 am

Upgrade from 1.32 to 1.34

Post by JBertrand »

Hello,

I'm trying to upgrade my ZM installation (on a debian/testing server). I use package from deb-multimedia.

Of course, 1.32 ran as expected.

After installation of mew package, I have launched zmupdate.pl that ends without error. But I cannot start zoneminder anymore:

Code: Select all

root@hilbert:/var/cache# /etc/init.d/zoneminder start
Starting zoneminder (via systemctl): zoneminder.serviceJob for zoneminder.service failed because the control process exited with error code.
See "systemctl status zoneminder.service" and "journalctl -xe" for details.
 failed!
In logs, I obtain:

Code: Select all

mars 25 09:14:12 hilbert systemd[1]: Starting ZoneMinder CCTV recording and surveillance system...
mars 25 09:14:12 hilbert systemd[2950509]: zoneminder.service: Failed to determine user credentials: No such process
mars 25 09:14:12 hilbert systemd[2950509]: zoneminder.service: Failed at step USER spawning /usr/bin/zmpkg.pl: No such process
mars 25 09:14:13 hilbert systemd[1]: zoneminder.service: Control process exited, code=exited, status=217/USER
mars 25 09:14:13 hilbert systemd[1]: zoneminder.service: Failed with result 'exit-code'.
mars 25 09:14:13 hilbert systemd[1]: Failed to start ZoneMinder CCTV recording and surveillance system.
I have written in /etc/systemd/system/zoneminder.service:

Code: Select all

[Unit]
Description=ZoneMinder CCTV recording and surveillance system
After=network.target
Documentation=http://zoneminder.readthedocs.org/en/latest/

[Service]
#Environment=TZ=:/etc/localtime
User=www-data
Group=www-data
Type=forking
ExecStart=/usr/bin/zmpkg.pl start
ExecReload=/usr/bin/zmpkg.pl restart
ExecStop=/usr/bin/zmpkg.pl stop
PIDFile=/run/zm/zm.pid
Restart=on-abnormal

[Install]
WantedBy=multi-user.target
as my database server is located on a second server.

If I modify this unit to start zoneminder as root:root, it starts !

I have checked that all cache files are owned by www-data:www-data. All other files are owned by root but are accessible for reading. I suppose I have done a mistake but I cannot find it.

Best regards,

JB
JBertrand
Posts: 5
Joined: Tue May 16, 2017 8:21 am

Re: Upgrade from 1.32 to 1.34

Post by JBertrand »

I have modified zmpkg.pl :

Code: Select all

# Check if we are running systemd and if we have been called by the system
#if ( $command =~ /^(start|stop|restart)$/ ) {
# We have to detaint to keep perl from complaining
#  $command = $1;

#  if ( systemdRunning() && !calledBysystem() ) {
#    qx(/usr/bin/zmsystemctl.pl $command);
#    $command = '';
#  }
#}
and I can start zoneminder with zmpkg.pl start:

Code: Select all

root@hilbert:/etc# ps auwx | grep zm
root     2956162  0.2  0.0  17412  9548 pts/4    S+   12:13   0:00 vim /usr/bin/zmpkg.pl
www-data 2956216  0.0  0.1  33004 17064 pts/37   S    12:14   0:00 /usr/bin/perl -wT /usr/bin/zmdc.pl startup
www-data 2956245  0.8  0.4 277884 71592 pts/37   SL   12:14   0:00 /usr/bin/zmc -d /dev/video0
www-data 2956255  1.8  0.2  47968 36484 pts/37   S    12:14   0:00 /usr/bin/perl -wT /usr/bin/zmfilter.pl --filter_id=1 --daemon
www-data 2956260  1.8  0.2  47956 36296 pts/37   S    12:14   0:00 /usr/bin/perl -wT /usr/bin/zmfilter.pl --filter_id=2 --daemon
www-data 2956266  2.4  0.5 288532 91076 pts/37   SL   12:14   0:00 /usr/bin/zma -m 2
www-data 2956267  1.2  0.1  32372 20668 pts/37   S    12:14   0:00 /usr/bin/perl -wT /usr/bin/zmwatch.pl
www-data 2956273  1.2  0.1  37256 25628 pts/37   S    12:14   0:00 /usr/bin/perl -wT /usr/bin/zmtelemetry.pl
If I try:

Code: Select all

root@hilbert:/etc# zmsystemctl.pl start
I obtain:

Code: Select all

25/03/2020 12:18:45.847548 zmsystemctl[2956403].INF [main:71] [Redirecting command through systemctl]
Job for zoneminder.service failed because the control process exited with error code.
See "systemctl status zoneminder.service" and "journalctl -xe" for details.
Something seems to be broken in zmsystemctl.

JB
bbunge
Posts: 2975
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Upgrade from 1.32 to 1.34

Post by bbunge »

Post Reply