Help: ZoneMinder won't start

Support and queries relating to third party Live CDs and DVD, VM images and other packaged distributions
pcalleros
Posts: 56
Joined: Sun Oct 02, 2005 4:53 pm

ISO Install

Post by pcalleros »

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.
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

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.
pcalleros
Posts: 56
Joined: Sun Oct 02, 2005 4:53 pm

chkconfig

Post by pcalleros »

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?
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

OK the zm service is either "running" or it's "stopped". I'm guessing that when you say
It is up when I reboot but not running.
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.

"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.
pcalleros
Posts: 56
Joined: Sun Oct 02, 2005 4:53 pm

Post by pcalleros »

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?
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

I see that upgrading my DB is failing and that is what is causing my problem.
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.

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.
pcalleros
Posts: 56
Joined: Sun Oct 02, 2005 4:53 pm

ZM_Version

Post by pcalleros »

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
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

Would you stop zm and then run "service zm start" and post the output here.

I need to track down where the start script is getting the incorrect info about the zm version.
pcalleros
Posts: 56
Joined: Sun Oct 02, 2005 4:53 pm

ZM stop and start

Post by pcalleros »

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]
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

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

Code: Select all

echo 'select Value from Config where Name = "ZM_DYN_DB_VERSION";'|mysql -u XXXX -pXXXX zm
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.
pcalleros
Posts: 56
Joined: Sun Oct 02, 2005 4:53 pm

DB Error

Post by pcalleros »

Here is the clip and paste Ross,

[root@ICS-ZM ~]# echo 'select Value from Config where Name = "ZM_DYN_DB_VERSION";'|mysql -uXXXXX -pXXXXXX zm
Value
1.22.0
[root@ICS-ZM ~]#

I am not attached to the data so do not mind purging DB.
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

OK first try this

Code: Select all

echo 'update Config set  Value = "1.22.1"  where Name = "ZM_DYN_DB_VERSION";'|mysql -u XXXX -pXXXX zm
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.

Code: Select all

echo "drop database zm;"|mysql -u root -p
And then run /usr/lib/zm/bin/zminit
pcalleros
Posts: 56
Joined: Sun Oct 02, 2005 4:53 pm

DB

Post by pcalleros »

Thanks Ross that did the trick. Starting ok now.
Post Reply