cannot start zoneminder

Forum for questions and support relating to the 1.28.x releases only.
Locked
DasBrot
Posts: 23
Joined: Fri Jun 12, 2015 9:50 am

cannot start zoneminder

Post by DasBrot »

Hi
when i Start, the Zoneminder is stopped.
but when i create '/var/run/zm' at hand, Zoneminder is starting.
the error massage is Can't create missing temporary directory '/var/run/zm': Permission denied

What user must have more rights ?

Video data export is not working.
The massage is Command 'cat 'temp/zmFileList.txt' | zip -q 'temp/zmExport.zip' -@' returned with status 12
is it a right problem too ?
Last edited by DasBrot on Tue Jul 14, 2015 12:02 pm, edited 1 time in total.
Southcross
Posts: 43
Joined: Tue Feb 10, 2015 9:17 pm

Re: cannot start zoneminder / Video export not working

Post by Southcross »

had this error once... did you recently disable the zoneminder service from starting? in any case, all I did was reboot the server
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: cannot start zoneminder / Video export not working

Post by knight-of-ni »

That means two things:
1) You don't have zoneminder installed correctly. When installed correctly that folder and the others it needs will get created automatically. We need to know what distro you are on and how you installed zoneminder to troubleshoot this.
2) you are trying to start zoneminder for the first time after boot up from the web console. Instead, you should configure zoneminder to start as a service, which gets us back to item 1. When starting as a service, zoneminder briefly has root privileges, which allows it to add any missing folders. This is not true if you try to start zoneminder from the web console.
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/
DasBrot
Posts: 23
Joined: Fri Jun 12, 2015 9:50 am

Re: cannot start zoneminder / Video export not working

Post by DasBrot »

Yes ist posible.
i have install it on Ubuntu lts with the Isaac Connor package.
i dont found a appliance with new Zoneminder so i tried this way.
i used this guide http://www.zoneminder.com/wiki/index.ph ... e_easy_way but install The Zoneminder 1.28

How can i fix it ?

With your Tip i found this guide to start Zoneminder as service ...

http://www.zoneminder.com/wiki/index.ph ... se_systemd

is this the right way ? (but www-data -> root)

Bernd
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: cannot start zoneminder / Video export not working

Post by knight-of-ni »

We need to know exactly which version of Ubuntu you are using.
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/
DasBrot
Posts: 23
Joined: Fri Jun 12, 2015 9:50 am

Re: cannot start zoneminder / Video export not working

Post by DasBrot »

its Ubuntu 14.04.2 LTS GNU/Linux 3.16.0-43-generic x86_64
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: cannot start zoneminder / Video export not working

Post by knight-of-ni »

Ubuntu 14.04 has the legacy Sys V Init, which means it does not have systemd.

You need to make sure you you init service file exists:

Code: Select all

ls /etc/init.d/zoneminder
Then you start zoneminder from the command line by:

Code: Select all

sudo service zoneminder start
The zoneminder package from iconnor's ppa should configure your system to start zoneminder automatically at boot up, but just to be sure:

Code: Select all

sudo update-rc.d zoneminder defaults
To verify zoneminder has started:

Code: Select all

sudo service zoneminder status
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/
DasBrot
Posts: 23
Joined: Fri Jun 12, 2015 9:50 am

Re: cannot start zoneminder / Video export not working

Post by DasBrot »

on sudo service zoneminder start i have an error :


/etc/init.d/zoneminder: 91: /etc/init.d/zoneminder: Syntax error: Unterminated quoted string

but there i dont found a cr

Code: Select all

zmfix -a" sleep 15
#!/bin/sh
### BEGIN INIT INFO
# Provides:          zoneminder
# Required-Start:    $network $remote_fs $syslog
# Required-Stop:     $network $remote_fs $syslog
# Should-Start:      mysql
# Should-Stop:       mysql
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description:  Control ZoneMinder as a Service
### END INIT INFO
# description: Control ZoneMinder as a Service
# chkconfig: 2345 20 20

# Source function library.
#. /etc/rc.d/init.d/functions

prog=ZoneMinder
ZM_PATH_BIN="/usr/bin"
RUNDIR=/var/run/zm
TMPDIR=/tmp/zm
command="$ZM_PATH_BIN/zmpkg.pl"

start() {
	echo -n "Starting $prog: "
	mkdir -p $RUNDIR && chown www-data:www-data $RUNDIR
	mkdir -p $TMPDIR && chown www-data:www-data $TMPDIR
	$command start
	RETVAL=$?
	[ $RETVAL = 0 ] && echo success
	[ $RETVAL != 0 ] && echo failure
	echo
	[ $RETVAL = 0 ] && touch /var/lock/zm
	return $RETVAL
}
stop() {
	echo -n "Stopping $prog: "
	#
	# Why is this status check being done?
	# as $command stop returns 1 if zoneminder 
	# is stopped, which will result in 
	# this returning 1, which will stuff 
	# dpkg when it tries to stop zoneminder before
	# uninstalling . . . 
	#
	result=`$command status`
	if [ ! "$result" = "running" ]; then
		echo "Zoneminder already stopped"
		echo
		RETVAL=0
	else
		$command stop
		RETVAL=$?
		[ $RETVAL = 0 ] && echo success
		[ $RETVAL != 0 ] && echo failure
		echo
		[ $RETVAL = 0 ] && rm -f /var/lock/zm
	fi
}
status() {
	result=`$command status`
	if [ "$result" = "running" ]; then
		echo "ZoneMinder is running"
		RETVAL=0
	else
		echo "ZoneMinder is stopped"
		RETVAL=1
	fi
}

case "$1" in
'start')
	start
	;;
'stop')
	stop
	;;
'restart' | 'force-reload')
	stop
	start
	;;
'status')
	status
	;;
*)
	echo "Usage: $0 { start | stop | restart | status }"
	RETVAL=1
	;;
esac
exit $RETVAL
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: cannot start zoneminder / Video export not working

Post by knight-of-ni »

You made a typo when you tried to add "sleep 15".

Delete the first line. Then place the "sleep 15" statement under "start() {" per the instructions.
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/
DasBrot
Posts: 23
Joined: Fri Jun 12, 2015 9:50 am

Re: cannot start zoneminder / Video export not working

Post by DasBrot »

Thank you.
now zoneminder starts from console.

Code: Select all


0 packages can be updated.
0 updates are security updates.

Last login: Mon Jul 13 13:12:12 2015 from 192.168.101.61
root@video:~# ls /etc/init.d/zoneminder
/etc/init.d/zoneminder
root@video:~# service zoneminder start
Starting ZoneMinder: success

root@video:~# update-rc.d zoneminder defaults
 System start/stop links for /etc/init.d/zoneminder already exist.
root@video:~# service zoneminder status
ZoneMinder is running
root@video:~#
but it doesn't start automatically at boot.

I do not know if it is related but
Video Export makes an error
Command 'cat 'temp/zmFileList.txt' | zip -q 'temp/zmExport.zip' -@' returned with status 12

with *.tar there is no error, but the File is empty

Bernd
DasBrot
Posts: 23
Joined: Fri Jun 12, 2015 9:50 am

Re: cannot start zoneminder / Video export not working

Post by DasBrot »

Ok, it seems another Problem with Video Export, so i make a new Post with this new Problem.
Locked