Ubuntu 14.04 new install issue
Ubuntu 14.04 new install issue
I started this in the 1.28 forum when it was suggested I should install 1.29 on 14.04.
cat /etc/issue
Ubuntu 14.04.3 LTS \n \l
Installed 1.29 and it installed with no errors. The webpage comes up, but Zoneminder does not start.
In the log I see:
2016-02-10 06:02:42.403760 zmpkg 2457 FAT Can't create missing temporary directory '/var/run/zm': Permission denied zmpkg.pl
As was suggested, I changed path on PATH_SWAP to /run/shm
Same error after that change.
Given that path PATH_SOCKS had /var/run/zm
I changed that also to /run/shm
Same error after that change.
But I am seeing in inti.d file
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: "
export TZ=:/etc/localtime
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
So I assume that is where the error is coming from?
There is no /var/run/zm directory and permissions on /var/run:
jmcgee@Burn:~$ ls -l /var/run
lrwxrwxrwx 1 root root 4 Feb 8 06:35 /var/run -> /run
any ideas?
cat /etc/issue
Ubuntu 14.04.3 LTS \n \l
Installed 1.29 and it installed with no errors. The webpage comes up, but Zoneminder does not start.
In the log I see:
2016-02-10 06:02:42.403760 zmpkg 2457 FAT Can't create missing temporary directory '/var/run/zm': Permission denied zmpkg.pl
As was suggested, I changed path on PATH_SWAP to /run/shm
Same error after that change.
Given that path PATH_SOCKS had /var/run/zm
I changed that also to /run/shm
Same error after that change.
But I am seeing in inti.d file
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: "
export TZ=:/etc/localtime
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
So I assume that is where the error is coming from?
There is no /var/run/zm directory and permissions on /var/run:
jmcgee@Burn:~$ ls -l /var/run
lrwxrwxrwx 1 root root 4 Feb 8 06:35 /var/run -> /run
any ideas?
Re: Ubuntu 14.04 new install issue
See: https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way
If you did not add the "sleep 15" ZM will not start on a reboot as it needs to wait for MySQL to get going.
You may find it easier to start over with a fresh Ubuntu install..
bb
If you did not add the "sleep 15" ZM will not start on a reboot as it needs to wait for MySQL to get going.
You may find it easier to start over with a fresh Ubuntu install..
bb
Re: Ubuntu 14.04 new install issue
I did go by the wiki, but it seems that fresh install is my only option left.
jmcgee@Burn:/etc/init.d$ cat zoneminder
#!/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
# Description: ZoneMinder CCTV recording and surveillance system
### END INIT INFO
# chkconfig: 2345 20 20
# Source function library.
. /lib/lsb/init-functions
prog=ZoneMinder
ZM_PATH_BIN="/usr/bin"
RUNDIR="/var/run/zm"
TMPDIR="/tmp/zm"
command="$ZM_PATH_BIN/zmpkg.pl"
start() {
sleep 15
echo -n "Starting $prog: "
start() {
echo -n "Starting $prog: "
export TZ=:/etc/localtime
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
}
jmcgee@Burn:/etc/init.d$ cat zoneminder
#!/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
# Description: ZoneMinder CCTV recording and surveillance system
### END INIT INFO
# chkconfig: 2345 20 20
# Source function library.
. /lib/lsb/init-functions
prog=ZoneMinder
ZM_PATH_BIN="/usr/bin"
RUNDIR="/var/run/zm"
TMPDIR="/tmp/zm"
command="$ZM_PATH_BIN/zmpkg.pl"
start() {
sleep 15
echo -n "Starting $prog: "
start() {
echo -n "Starting $prog: "
export TZ=:/etc/localtime
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
}
Re: Ubuntu 14.04 new install issue
OK, now on fresh install.
Here's a problem, I think I've had everytime I've used the wiki. It complains about some brackets missing in init.d/zoneminder. Maybe I am not editing the file correctly.
service apache2 restart
root@burn:/home/jmcgee# service zoneminder start
/etc/init.d/zoneminder: 96: /etc/init.d/zoneminder: Syntax error: end of file unexpected (expecting "}")
and here is that file:
root@burn:/home/jmcgee# cat /etc/init.d/zoneminder
#!/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
# Description: ZoneMinder CCTV recording and surveillance system
### END INIT INFO
# chkconfig: 2345 20 20
# Source function library.
. /lib/lsb/init-functions
prog=ZoneMinder
ZM_PATH_BIN="/usr/bin"
RUNDIR="/var/run/zm"
TMPDIR="/tmp/zm"
command="$ZM_PATH_BIN/zmpkg.pl"
start() {
sleep 15
echo -n "Starting $prog: "
start() {
echo -n "Starting $prog: "
export TZ=:/etc/localtime
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
Here's a problem, I think I've had everytime I've used the wiki. It complains about some brackets missing in init.d/zoneminder. Maybe I am not editing the file correctly.
service apache2 restart
root@burn:/home/jmcgee# service zoneminder start
/etc/init.d/zoneminder: 96: /etc/init.d/zoneminder: Syntax error: end of file unexpected (expecting "}")
and here is that file:
root@burn:/home/jmcgee# cat /etc/init.d/zoneminder
#!/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
# Description: ZoneMinder CCTV recording and surveillance system
### END INIT INFO
# chkconfig: 2345 20 20
# Source function library.
. /lib/lsb/init-functions
prog=ZoneMinder
ZM_PATH_BIN="/usr/bin"
RUNDIR="/var/run/zm"
TMPDIR="/tmp/zm"
command="$ZM_PATH_BIN/zmpkg.pl"
start() {
sleep 15
echo -n "Starting $prog: "
start() {
echo -n "Starting $prog: "
export TZ=:/etc/localtime
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
Re: Ubuntu 14.04 new install issue
OK, I stick the bracket on end of the init.d file and it started the service.
But I have the same error after fresh install exactly by the page at
https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way
2016-02-10 20:33:30.772030 zmpkg 5245 FAT Can't create missing temporary directory '/var/run/zm': Permission denied
But I have the same error after fresh install exactly by the page at
https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way
2016-02-10 20:33:30.772030 zmpkg 5245 FAT Can't create missing temporary directory '/var/run/zm': Permission denied
Re: Ubuntu 14.04 new install issue
I found this
https://askubuntu.com/questions/544794/ ... untu-12-04
It (temporarily) fixed my installation (At least this problem, but is not a good solution long term.
https://askubuntu.com/questions/544794/ ... untu-12-04
It (temporarily) fixed my installation (At least this problem, but is not a good solution long term.
Re: Ubuntu 14.04 new install issue
And for what it is worth, I don't see how this is not broken for anyone else following that wiki. I did two fresh installs, never varying from the wiki (other than setting static ip in /etc/network/interfaces. Both installs had the same error. And the ending bracket is missing from the text to insert into the init.d file.
-
- Posts: 494
- Joined: Sun Jun 29, 2014 1:12 pm
- Location: Melbourne, AU
Re: Ubuntu 14.04 new install issue
I see what you did there, you didn't read the instructions and assumed the quoted code should be directly inserted into init.d/zoneminder, but it actually wants you to add "sleep 15" after the existing start(){.
Add sleep 15 as shown:
start() {
sleep 15
echo -n "Starting $prog: "
Production Zoneminder 1.37.x (Living dangerously)
Random Selection of Cameras (Dahua and Hikvision)
Random Selection of Cameras (Dahua and Hikvision)
Re: Ubuntu 14.04 new install issue
You are absolutely right. I edited init.d/zoneminder as you said and I did not have the error.
Re: Ubuntu 14.04 new install issue
In the never ending battle to make instructions absolutely clear, I have modified the WIKI for 14.04 as follows:
Add sleep 15 after the existing "start() {" as shown:
start() {
sleep 15
echo -n "Starting $prog: "
Hope this clears this up!
bb
Add sleep 15 after the existing "start() {" as shown:
start() {
sleep 15
echo -n "Starting $prog: "
Hope this clears this up!
bb
Re: Ubuntu 14.04 new install issue
Updated my 1.28.1 using your wiki instructions and things went perfectly, Thanks!bbunge wrote:In the never ending battle to make instructions absolutely clear, I have modified the WIKI for 14.04 as follows:
bb