Failure to spawn leads to multiple failure in service?

Forum for questions and support relating to the 1.31.x releases only.
Locked
fsardone
Posts: 19
Joined: Thu Jan 25, 2018 10:39 pm

Failure to spawn leads to multiple failure in service?

Post by fsardone »

Good evening,
this is my first post and I hope I am not repeating things already said, but a search of the forum did not yield results.
I did follow the install instructions in the wiki at
https://wiki.zoneminder.com/Debian_9_64 ... der_1.30.4
and I am on debian and installing 1.30.4
All went well but at the end of the install of zoneminder I get
---<snip>------
Selecting previously unselected package zoneminder.
(Reading database ... 24217 files and directories currently installed.)
Preparing to unpack .../zoneminder_2%3a1.30.4-dmo1+deb9u1_amd64.deb ...
Unpacking zoneminder (2:1.30.4-dmo1+deb9u1) ...
Setting up zoneminder (2:1.30.4-dmo1+deb9u1) ...
apache2_invoke: Enable configuration zoneminder
Processing triggers for systemd (232-25+deb9u1) ...
FATAL -> Failed to fork.
root@zoneminder:/home/fabio#
---------<snip>------------
apparently though everything works because I get into the web page I can add a monitor but then something crashes as follows:

------<snip>--------------
* 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 Thu 2018-01-25 22:45:50 UTC; 7s ago
Process: 4385 ExecStop=/usr/bin/zmpkg.pl stop (code=exited, status=1/FAILURE)
Main PID: 2023 (code=exited, status=255)

Jan 25 22:45:48 zoneminder zmpkg[4385]: INF [Command: stop]
Jan 25 22:45:49 zoneminder su[4394]: Successful su for www-data by root
Jan 25 22:45:49 zoneminder su[4394]: + ??? root:www-data
Jan 25 22:45:49 zoneminder su[4394]: pam_unix(su:session): session opened for user www-data by (uid=0)
Jan 25 22:45:49 zoneminder su[4399]: Successful su for www-data by root
Jan 25 22:45:49 zoneminder su[4399]: + ??? root:www-data
Jan 25 22:45:49 zoneminder su[4399]: pam_unix(su:session): session opened for user www-data by (uid=0)
Jan 25 22:45:50 zoneminder systemd[1]: zoneminder.service: Control process exited, code=exited status=1
Jan 25 22:45:50 zoneminder systemd[1]: zoneminder.service: Unit entered failed state.
Jan 25 22:45:50 zoneminder systemd[1]: zoneminder.service: Failed with result 'exit-code'.
-----------<snip>------------------

Then after adding a monitor I am unable to display the strea.
I am no sure this is related to the perl error (not sure what the crashing module does) and if the problem is related to the failure to fork during install.

Any suggestions? Or pointers on how to better identify the issue?

Journalctl -xe reurns:
----------------<snip>----------
-- Unit zoneminder.service has begun starting up.
Jan 25 20:50:13 zoneminder zmpkg.pl[1585]: DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysq
ld/mysqld.sock' (111 "Connection refused") at /usr/share/perl5/ZoneMinder/Config.pm line 106.
Jan 25 20:50:13 zoneminder zmpkg.pl[1585]: Can't connect to db at /usr/share/perl5/ZoneMinder/Config.pm line 129.
Jan 25 20:50:13 zoneminder zmpkg.pl[1585]: BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder/Config.pm line 129.
Jan 25 20:50:13 zoneminder zmpkg.pl[1585]: Compilation failed in require at /usr/share/perl5/ZoneMinder.pm line 33.
Jan 25 20:50:13 zoneminder zmpkg.pl[1585]: BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder.pm line 33.
Jan 25 20:50:13 zoneminder zmpkg.pl[1585]: Compilation failed in require at /usr/bin/zmpkg.pl line 48.
Jan 25 20:50:13 zoneminder zmpkg.pl[1585]: BEGIN failed--compilation aborted at /usr/bin/zmpkg.pl line 48.
Jan 25 20:50:13 zoneminder systemd[1]: zoneminder.service: Control process exited, code=exited status=255
Jan 25 20:50:13 zoneminder 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.
Jan 25 20:50:13 zoneminder systemd[1]: zoneminder.service: Unit entered failed state.
Jan 25 20:50:13 zoneminder systemd[1]: zoneminder.service: Failed with result 'exit-code'.
-----------<snip>-----------
Thanks for any help

Fabio
fsardone
Posts: 19
Joined: Thu Jan 25, 2018 10:39 pm

Re: Failure to spawn during install leads to multiple failure in service?

Post by fsardone »

Sorry I forgot to add this is a brand new Stretch install in a fully PV Xen Userdomain.
also the error a get trying to access the camera in preview mode (I can see it camera choosing ONVIF) is:

Unable to connect to ZM db.SQLSTATE[HY000] [2002] Connection refused
once I get that, the homepage of zm also return the same.

I am not sure if this is a Packaging issue or a bug and were to initiate investigating the issue.
bbunge
Posts: 2930
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Failure to spawn leads to multiple failure in service?

Post by bbunge »

Your post should be in the 1.30x area of the forum.

However, as I have stated several times, I am not pleased with the operation of Zoneminder on Debian 9. My recommendation is to switch to Ubuntu as I feel it is better supported. If I have time this weekend I will run the Debian install to see if something has changed.

bb
fsardone
Posts: 19
Joined: Thu Jan 25, 2018 10:39 pm

Re: Failure to spawn leads to multiple failure in service?

Post by fsardone »

Hi BB,
sorry my bad, I did not realise the latest package for Debian was not the latest after all! And I even posted the version number!
Do not waste your time I know what it is wrong. Just found out.
I was actually running out of memory in the VM. Increasing swap file and allocation fixed my issue.

Concerning the Ubuntu suggestion. I can and I might do that since running it in a VM allows me to switch to the best suited distro.
Trying to get some experience with it in order to assess what it is best.

Thanks for your reply
Fabio
Locked