Page 1 of 1
ZM fails to start at boot
Posted: Mon Feb 13, 2012 2:51 pm
by camsystem
I have an existing installation of ZM 1.24.2 working great on top of Ubuntu server 10.04 LTS 32 bit. Upgraded to ZM 1.24.4 and everything seems to be working OK. I had to create my cameras but that was no problem. Only issue I have left is that when I reboot the server ZM fails to start automatically. I have to connect to ZM over web and then start ZM. Server has now ran over night with no issues. I have confirmed via web admin that ZM is set to start at boot. Checked logs, dmesg, syslog, & messages, but cannot find anything to indicate why ZM does not start at boot.
Can anyone give me an idea of why ZM does not start at boot since the upgrade to 1.24.4?
Thanks in advance.
Re: ZM fails to start at boot
Posted: Mon Feb 13, 2012 4:06 pm
by PacoLM
I think is a know topic, something like ZM starting before mysql. The fix was adding a sleep 10 in the /etc/init.d/zoneminder startup file:
Code: Select all
start() {
echo -n "Starting $prog: "
--> sleep 10
$command start
RETVAL=$?
[ $RETVAL = 0 ] && echo success
[ $RETVAL != 0 ] && echo failure
return $RETVAL
}
Give it try or search the forum, I'm writing from memory, I could be wrong.
Hope it helps,
PacoLM
Re: ZM fails to start at boot
Posted: Mon Feb 13, 2012 4:19 pm
by camsystem
Thanks a heap PacoLM
I will give that a try.
Re: ZM fails to start at boot
Posted: Mon Feb 13, 2012 4:36 pm
by camsystem
Put
into the startup but ZM still will not start on a reboot. O' well it was a good tip that I will remember. Still researching the issue. Any other ideas will be appreciated.
Re: ZM fails to start at boot
Posted: Tue Feb 14, 2012 9:25 pm
by camsystem
Updated all packages on server as follows: The following packages will be upgraded:
base-files libapache2-mod-php5 libldap-2.4-2 libldap2-dev php5-common
php5-mysql
Ran make install
Still cannot get ZM to start on boot buts seems to work. It would be useful to be able to start and stop ZM from the command line. I have tried the following:
service zoneminder start zoneminder: unrecognized service
service zm start zm: unrecognized service
zoneminder start zoneminder: command not found
zm start zm: command not found
Tried the commands from the /etc/init.d/ directory but got the same results.
Anybody got any ideas or know some different way to get ZM to start and stop from the command line???? or why ZM is not starting on boot???
Thanks in advance as all ideas are appreciated.
Re: ZM fails to start at boot
Posted: Wed Feb 15, 2012 5:38 am
by PacoLM
To run ZM as a service, install chkconfig or rcconf, then select zoneminder to startup at boot. The command line to start zm is usually
or
, depending on how you install it / compile it.
Re: ZM fails to start at boot
Posted: Wed Feb 15, 2012 1:50 pm
by camsystem
That is what I thought PacoLM. I have tried both of these commands.
zoneminder: unrecognized service
zm: unrecognized service
Weird! Maybe this is somehow tied to why ZM does not start from boot. Always starts just fine from web console.
Thanks anyway PacoLM. Any other ideas will be welcome.
Re: ZM fails to start at boot
Posted: Wed Feb 15, 2012 8:16 pm
by zSeries
I had this problem too, Zoneminder was starting before mysql and so failed to start at boot. Try this
update-rc.d -f zoneminder remove
then
update-rc.d zoneminder defaults 92
Re: ZM fails to start at boot
Posted: Wed Feb 15, 2012 10:35 pm
by camsystem
Thanks for the suggestion zseries (sounds like IBM?) Since this is my experimental box, I decided to through caution to the wind, Tried the suggestion even though I do not understand what was trying to accomplish.
Removing any system startup links for /etc/init.d/zoneminder ...
Died at /usr/sbin/update-rc.d line 57.
Did not look promising but tried the second line anyway
Code: Select all
update-rc.d zoneminder defaults 92
update-rc.d: /etc/init.d/zoneminder: file does not exist
Hmmmmmm maybe the syntax is wrong.
No change in the way ZM behaves. ZM does not start at boot but can be started from the web console. ZM works great after it is up and running. If ZM was trying to start before SQL would not I see some errors in /var/log/messages or one of the ZM logs? was the syntax wrong?
Re: ZM fails to start at boot
Posted: Thu Feb 16, 2012 5:26 am
by PacoLM
Maybe you do not have the startup script, check if you have one of these files:
ls -l /etc/init.d/zoneminder
ls -l /etc/init.d/zm
If so, check that the paths are ok, and correspond to your system.