Help: ZoneMinder won't start
ISO Install
atlreguy
Might be some wierd HW issue or a bad CD. Watch it before it reboots. I have seen what appears to be the Linux BSOD sometimes when the install sees something in the hardware which conflicts. Usually doesn't reboot though.
Might be some wierd HW issue or a bad CD. Watch it before it reboots. I have seen what appears to be the Linux BSOD sometimes when the install sees something in the hardware which conflicts. Usually doesn't reboot though.
pcalleros,
Sorry I guess I could be a little more verbose
As root run the command "chkconfig zm on" in a terminal (konsole).
atlreguy,
pcalleros is correct about the problem being a hardware incompatability. I've come across this before.
One thing you might try is to remove any video capture cards, and if that helps you can reinstall the card(s) after the software is installed. I have found a couple of cards the will cause a reboot if the pallette in zm is set to rgb24 but if you switch to yuv422p they work fine.
If this doesn't resolve the problem you might try the Mdv_2006 install CD or cordel's CTU fedora installer. A distro using a newer kernel might not have the same problem.
Sorry I guess I could be a little more verbose
As root run the command "chkconfig zm on" in a terminal (konsole).
atlreguy,
pcalleros is correct about the problem being a hardware incompatability. I've come across this before.
One thing you might try is to remove any video capture cards, and if that helps you can reinstall the card(s) after the software is installed. I have found a couple of cards the will cause a reboot if the pallette in zm is set to rgb24 but if you switch to yuv422p they work fine.
If this doesn't resolve the problem you might try the Mdv_2006 install CD or cordel's CTU fedora installer. A distro using a newer kernel might not have the same problem.
chkconfig
rdmelin,
When I do:
chkconfig zm on
logged in as root it makes ZM run.
But when I reboot server it boots fine but ZM comes in in a stopped state and I have to put it in a running state by typing "chkconfig zm on".
If I type:
[root@ICS-ZM /]# chkconfig --list zm
zm 0:off 1:off 2:on 3:on 4:on 5:on 6:off
So I believe the service start up script is supposed to run ZM at levels 2, 3, 4 and 5. So is this supposed to run ZM and start ZM? It is up when I reboot but not running.
Is this what I am supposed to see?
When I do:
chkconfig zm on
logged in as root it makes ZM run.
But when I reboot server it boots fine but ZM comes in in a stopped state and I have to put it in a running state by typing "chkconfig zm on".
If I type:
[root@ICS-ZM /]# chkconfig --list zm
zm 0:off 1:off 2:on 3:on 4:on 5:on 6:off
So I believe the service start up script is supposed to run ZM at levels 2, 3, 4 and 5. So is this supposed to run ZM and start ZM? It is up when I reboot but not running.
Is this what I am supposed to see?
OK the zm service is either "running" or it's "stopped". I'm guessing that when you say
"chkconfig zm on" configures the service to run at boot time but will not actually start zm when stopped. For that you must use the web interface or run the command "service zm start" or "/etc/init.d/zm start" or "zmpkg.pl start" which are pretty much all the same thing.
So here is my guess about what you are seeing. At bootup it's common for the desktop to load up and be able to start a web browser and load up the zm console before zm has had time to start up completely. There are a number of things going on in the background that take a little time, like loading up the ring buffer with 40 or more frames of video for each monitor, etc. So at first the web interface may say that zm is stopped when in fact it is in the proccess of starting up.
Try reloading the web interface with the refresh button on your browser or simply wait a few minutes until the page reloads on its own.
If this is not what is happening with your system you will need to supply more detail. Which Mandake version, log files, etc.
that the web interface loads up and appears normal exept that the state at the top shows "stopped". Please clarify if this is not what you mean.It is up when I reboot but not running.
"chkconfig zm on" configures the service to run at boot time but will not actually start zm when stopped. For that you must use the web interface or run the command "service zm start" or "/etc/init.d/zm start" or "zmpkg.pl start" which are pretty much all the same thing.
So here is my guess about what you are seeing. At bootup it's common for the desktop to load up and be able to start a web browser and load up the zm console before zm has had time to start up completely. There are a number of things going on in the background that take a little time, like loading up the ring buffer with 40 or more frames of video for each monitor, etc. So at first the web interface may say that zm is stopped when in fact it is in the proccess of starting up.
Try reloading the web interface with the refresh button on your browser or simply wait a few minutes until the page reloads on its own.
If this is not what is happening with your system you will need to supply more detail. Which Mandake version, log files, etc.
rdmelin,
Yes the web interface loads up and appears normal except the state at the top shows "stopped".
It is "stopped" after refresh and never starts unless I manually start it either on the web interface or by typing "chkconfig zm on".
Here is a quick clip and paste from the logs:
Linux version 2.6.12-12mdk (apatard@n1.mandriva.com) (gcc version 4.0.1 (4.0.1-5mdk for Mandriva Linux release 2006.0)) #1 Fri Sep 9 18:15:22 CEST 2005
May 18 23:21:42 ICS-ZM kernel: 0MB HIGHMEM available.
May 18 23:21:42 ICS-ZM kernel: 511MB LOWMEM available.
May 18 23:21:42 ICS-ZM kernel: On node 0 totalpages: 131056
May 18 23:21:42 ICS-ZM kernel: DMA zone: 4096 pages, LIFO batch:1
May 18 23:21:42 ICS-ZM kernel: Normal zone: 126960 pages, LIFO batch:31
May 18 23:21:42 ICS-ZM kernel: HighMem zone: 0 pages, LIFO batch:1
May 18 23:21:58 ICS-ZM zm: Initiating database upgrade to version 1.22.1
May 18 23:21:58 ICS-ZM zm:
May 18 23:21:58 ICS-ZM zm: Upgrading database to version 1.22.1
May 18 23:21:58 ICS-ZM zm: ERROR 1060 (42S21) at line 8: Duplicate column name 'LinkedMonitors'
May 18 23:21:58 ICS-ZM zm: Output:
May 18 23:21:58 ICS-ZM zm: Command 'mysql -hlocalhost -uXXXX -pXXXX zm < /usr/lib/zm/upgrade/zm_update-1.22.0.sql' exited with status: 1
May 18 23:21:58 ICS-ZM zm: ^[[65G
May 18 23:21:58 ICS-ZM zm: [^[[1;31m
May 18 23:21:58 ICS-ZM zm: FAILED
May 18 23:21:58 ICS-ZM zm:
May 18 23:21:58 ICS-ZM rc: Starting zm: failed
May 18 23:31:15 ICS-ZM zmpkg[4333]: INF [Command: start]
May 18 23:31:15 ICS-ZM zmdc[4345]: INF [Server starting at 06/05/18 23:31:15]
May 18 23:31:19 ICS-ZM zmdc[4345]: INF ['zmc -d /dev/video1' starting at 06/05/18 23:31:19, pid = 4368]
May 18 23:31:19 ICS-ZM zmdc[4368]: INF ['zmc -d /dev/video1' started at 06/05/18 23:31:19]
May 18 23:31:19 ICS-ZM zmc_dvideo1[4368]: INF [Debug Level = 0, Debug Log = <none>]
May 18 23:31:19 ICS-ZM zmc_dvideo1[4368]: INF [Starting Capture]
Looking at my log above - I see that upgrading my DB is failing and that is what is causing my problem. Can I repair it? Curious why I do not have any high memory?
Yes the web interface loads up and appears normal except the state at the top shows "stopped".
It is "stopped" after refresh and never starts unless I manually start it either on the web interface or by typing "chkconfig zm on".
Here is a quick clip and paste from the logs:
Linux version 2.6.12-12mdk (apatard@n1.mandriva.com) (gcc version 4.0.1 (4.0.1-5mdk for Mandriva Linux release 2006.0)) #1 Fri Sep 9 18:15:22 CEST 2005
May 18 23:21:42 ICS-ZM kernel: 0MB HIGHMEM available.
May 18 23:21:42 ICS-ZM kernel: 511MB LOWMEM available.
May 18 23:21:42 ICS-ZM kernel: On node 0 totalpages: 131056
May 18 23:21:42 ICS-ZM kernel: DMA zone: 4096 pages, LIFO batch:1
May 18 23:21:42 ICS-ZM kernel: Normal zone: 126960 pages, LIFO batch:31
May 18 23:21:42 ICS-ZM kernel: HighMem zone: 0 pages, LIFO batch:1
May 18 23:21:58 ICS-ZM zm: Initiating database upgrade to version 1.22.1
May 18 23:21:58 ICS-ZM zm:
May 18 23:21:58 ICS-ZM zm: Upgrading database to version 1.22.1
May 18 23:21:58 ICS-ZM zm: ERROR 1060 (42S21) at line 8: Duplicate column name 'LinkedMonitors'
May 18 23:21:58 ICS-ZM zm: Output:
May 18 23:21:58 ICS-ZM zm: Command 'mysql -hlocalhost -uXXXX -pXXXX zm < /usr/lib/zm/upgrade/zm_update-1.22.0.sql' exited with status: 1
May 18 23:21:58 ICS-ZM zm: ^[[65G
May 18 23:21:58 ICS-ZM zm: [^[[1;31m
May 18 23:21:58 ICS-ZM zm: FAILED
May 18 23:21:58 ICS-ZM zm:
May 18 23:21:58 ICS-ZM rc: Starting zm: failed
May 18 23:31:15 ICS-ZM zmpkg[4333]: INF [Command: start]
May 18 23:31:15 ICS-ZM zmdc[4345]: INF [Server starting at 06/05/18 23:31:15]
May 18 23:31:19 ICS-ZM zmdc[4345]: INF ['zmc -d /dev/video1' starting at 06/05/18 23:31:19, pid = 4368]
May 18 23:31:19 ICS-ZM zmdc[4368]: INF ['zmc -d /dev/video1' started at 06/05/18 23:31:19]
May 18 23:31:19 ICS-ZM zmc_dvideo1[4368]: INF [Debug Level = 0, Debug Log = <none>]
May 18 23:31:19 ICS-ZM zmc_dvideo1[4368]: INF [Starting Capture]
Looking at my log above - I see that upgrading my DB is failing and that is what is causing my problem. Can I repair it? Curious why I do not have any high memory?
I'm thinking that the db was upgraded on the first restart and is failing now because it keeps trying to apply changes already made.I see that upgrading my DB is failing and that is what is causing my problem.
Check what ZM_VERSION is set in /etc/zm.conf. The first 1.22.1 RPM I posted reused the old zm.conf without changing the version. Maybe this is confusing the zm start script into reapplying the db update.
ZM_Version
Hello Ross,
Here is a clip and paste:
# Current version of ZoneMinder
ZM_VERSION=1.22.1
# Path to build directory, used mostly for finding DB upgrade scripts
ZM_PATH_BUILD=/home/ross/rpm/BUILD/zm-1.22.0
ZM_PATH_UPDATE=/usr/lib/zm/upgrade
Here is a clip and paste:
# Current version of ZoneMinder
ZM_VERSION=1.22.1
# Path to build directory, used mostly for finding DB upgrade scripts
ZM_PATH_BUILD=/home/ross/rpm/BUILD/zm-1.22.0
ZM_PATH_UPDATE=/usr/lib/zm/upgrade
ZM stop and start
Ross, here is the output:
[root@ICS-ZM ~]# service zm start
Upgrade ZoneMinder database: Update agent starting at 06/05/19 10:48:34
Initiating database upgrade to version 1.22.1
Upgrading database to version 1.22.1
ERROR 1060 (42S21) at line 8: Duplicate column name 'LinkedMonitors'
Output:
Command 'mysql -hlocalhost -uXXXX -pXXXXX zm < /usr/lib/zm/upgrade/zm_update-1.22.0.sql' exited with status: 1
[FAILED]
[root@ICS-ZM ~]# service zm start
Upgrade ZoneMinder database: Update agent starting at 06/05/19 10:48:34
Initiating database upgrade to version 1.22.1
Upgrading database to version 1.22.1
ERROR 1060 (42S21) at line 8: Duplicate column name 'LinkedMonitors'
Output:
Command 'mysql -hlocalhost -uXXXX -pXXXXX zm < /usr/lib/zm/upgrade/zm_update-1.22.0.sql' exited with status: 1
[FAILED]
Hmm
I have tried to reproduce this here by starting with 1.21.4 and upgrading to 1.22.0 and then 1.22.1. No luck
Please run this query in a terminal and post the output
Also do you have a lot of data you are attached to? If not it may be the simplest fix to drop the database and reinitialize.
I have tried to reproduce this here by starting with 1.21.4 and upgrading to 1.22.0 and then 1.22.1. No luck
Please run this query in a terminal and post the output
Code: Select all
echo 'select Value from Config where Name = "ZM_DYN_DB_VERSION";'|mysql -u XXXX -pXXXX zm
OK first try this
That should have been set by the db upgrade script. If that doesn't resolve the problem, or if other weirdness happens just drop the database.
And then run /usr/lib/zm/bin/zminit
Code: Select all
echo 'update Config set Value = "1.22.1" where Name = "ZM_DYN_DB_VERSION";'|mysql -u XXXX -pXXXX zm
Code: Select all
echo "drop database zm;"|mysql -u root -p