zoneminder service start error

Forum for questions and support relating to the 1.30.x releases only.
Locked
thirsty
Posts: 2
Joined: Wed Aug 31, 2016 2:28 am

zoneminder service start error

Post by thirsty »

hello,

starting service from the the web interface and getting this error. not sure what conditions this zm directory would get deleted. but it has several times. reboot? so this error shows up until i manually start service once.

Code: Select all

2016-08-30 19:38:37.857940	zmpkg		9019	FAT	Can't create missing temporary directory '/var/run/zm': Permission denied	zmpkg.pl	
2016-08-30 19:38:37.750840	zmpkg		9019	INF	Command: start	zmpkg.pl	
2016-08-30 19:38:37.747310	zmpkg		9019	INF	Sanity checking States table...	zmpkg.pl	
2016-08-30 19:38:09.253890	zmdc		8776	INF	Server shutdown at 16/08/30 19:38:09	zmdc.pl
when starting from web interface there is an issue accessing the /var/run/zm directory as it is not there.

the zoneminder service script start function creates this /var/run/zm directory with appropriate permissions.

Code: Select all

sudo service zoneminder start
to repeat error:
stop zoneminder
delete the /var/run/zm
start zm from the web interface
view the error in log

this install is on ubuntu 14 using the distro from the installation instructions https://zoneminder.readthedocs.io/en/st ... buntu-14-x
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: zoneminder service start error

Post by knight-of-ni »

Working as intended.
ZoneMinder is designed to be started on boot via the init script, not the web console, which will create the necessary temp folders when it is first started.
You can't do that the first time from the web console because the start command is issued from the web user account, rather than root, which by design does not have permission to create the temp folders you need.

Note that issue does not exist on newer distros which used systemd as systemd has an internal mechanism to take care of this.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
thirsty
Posts: 2
Joined: Wed Aug 31, 2016 2:28 am

Re: zoneminder service start error

Post by thirsty »

thanks, yes i understand this better now. very helpful.

tdrl; setup zm with two cameras and it all worked worked. two issues I created around the same time:) mounted to zfs pool and linked two monitors. chaos ensued. all fixed now.

at some point i had linked the two cameras. a loop of sorts was created. figured out how to ctrl click linked monitors to shut them back off.

had switched to using a mounted drive (zfs). silly me was attempting to do via fstab. needless to say there was chaos on boot.
got familiar with zfs mount command.
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: zoneminder service start error

Post by knight-of-ni »

Yep, zfs handles mount points on its own. You don't use fstab.
Here is an excellent guide on how to setup and use zfs:
https://pthree.org/2012/04/17/install-z ... -gnulinux/

The guide says debian, but it applies to any linux distro. I refer to it often since I don't use zfs commands often enough the know them all by memory.

Note that I mount my zfs volume directly to my zoneminder events folder:

Code: Select all

[abauer@bauerhaus ~]$ sudo zfs list | grep zmevents
tank/zmevents        475G  25.3G   475G  /var/lib/zoneminder/events
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
Locked