Problems starting zm

Support and queries relating to all previous versions of ZoneMinder
zarkov
Posts: 2
Joined: Sun Jan 22, 2006 10:19 pm

Post by zarkov »

Just out of interest, I had a similar problem when upgrading from version 1.21.4.

I found that if I ran zmfix and zmupdate -f as root, all was fine afterwards. Saved me having to re-install from scratch.
rl03
Posts: 9
Joined: Tue Jan 24, 2006 9:54 pm

Post by rl03 »

Same problem on a fresh install of 1.22.0

running the first version of the test script gives:
ZM_SHM_KEY

Second version gives:
Undefined subroutine &main::ZM_SHM_KEY called at ./test line 9.

mysql query returns a row.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

zoneminder wrote:Can you confirm that if you do

Code: Select all

mysql -u<your db user> -p<your db pass> <your db>
select * from Config where Name = "ZM_SHM_KEY";
quit;
that you get a row of data out?
Can you try this and post what you get?
Phil
rl03
Posts: 9
Joined: Tue Jan 24, 2006 9:54 pm

Post by rl03 »

mysql> select * from Config where Name = "ZM_SHM_KEY";
+-----+------------+------------+-------------+--------------+-------------+-----------------------------------+-----------+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+----------+----------+
| Id | Name | Value | Type | DefaultValue | Hint | Pattern | Format | Prompt | Help | Category | Readonly | Requires |
+-----+------------+------------+-------------+--------------+-------------+-----------------------------------+-----------+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+----------+----------+
| 109 | ZM_SHM_KEY | 0x7a6d2000 | hexadecimal | 0x7a6d2000 | hexadecimal | (?-xism:^(?:0x)?([0-9a-f]{1,8})$) | "0x".$1 | Shared memory root key to use | ZoneMinder uses shared memory to speed up communication between modules. To identify the right area to use shared memory keys are used. This option controls what the base key is, each monitor will have it's Id or'ed with this to get the actual key used. You will not normally need to change this value unless it clashes with another instance of ZoneMinder on the same machine. | system | 0 | |
+-----+------------+------------+-------------+--------------+-------------+-----------------------------------+-----------+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+----------+----------+
1 row in set (0.00 sec)
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Thanks. Do you have a zm.conf in the current directory and if so is it the same as the installed one?
Phil
rl03
Posts: 9
Joined: Tue Jan 24, 2006 9:54 pm

Post by rl03 »

There is no zm.conf in the current directory.
Vadim
Posts: 2
Joined: Mon Jan 23, 2006 8:17 am

Post by Vadim »

I have the same problem when upgrading from 1.21.4

# zmupdate.pl –version=1.21.4
Bareword "ZM_SHM_KEY" not allowed while "strict subs" in use at /usr/lib/perl5/site_perl/5.8.7/ZoneMinder/SharedMem.pm line 221.
Compilation failed in require at /usr/lib/perl5/site_perl/5.8.7/ZoneMinder.pm line 36.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.7/ZoneMinder.pm line 36.
Compilation failed in require at /usr/local/bin/zmupdate.pl line 48.
BEGIN failed--compilation aborted at /usr/local/bin/zmupdate.pl line 48.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Check your zm.config and make sure that you have the same login info for the database in the new conf.
If you're cut and pasting from one to the other, be aware that the variable ZM_DB_SERVER is now ZM_DB_HOST.

If you filled out the configure line correctly ( same as your previous 1.21.4 build) and added the correct db login to the end on the configure line then it should be set to go.

I suspect that something is off with your zm.conf.

Corey
rl03
Posts: 9
Joined: Tue Jan 24, 2006 9:54 pm

Post by rl03 »

/etc/zm.conf appears to be correct
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Check all your logs and make sure that access to the database is not being denied. I'm not sure yet how to check to see where zm thinks its zm.conf should be but you might look in /usr/local/etc and make sure that is not one there ( I think this is the default location if you don't specify in the configure).

Corey
rl03
Posts: 9
Joined: Tue Jan 24, 2006 9:54 pm

Post by rl03 »

No db errors anywhere in logs, so it appears to be fine. Definitely nothing in /usr/local/etc
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

I'm a bit stumped then. I will have to come up with another test script to explore other possibilities.
Phil
djsb
Posts: 53
Joined: Mon Apr 05, 2004 2:50 am

Post by djsb »

Hi,

I had the same problems.
Just runing zmfix and then zmupdate -f solved my problem.

cheers,
rl03
Posts: 9
Joined: Tue Jan 24, 2006 9:54 pm

Post by rl03 »

zmfix completes successfully. zmupdate dies with the same error

Code: Select all

$ zmpkg.pl
Bareword "ZM_SHM_KEY" not allowed while "strict subs" in use at /usr/lib/perl5/site_perl/5.8.7/ZoneMinder/SharedMem.pm line 221.
Compilation failed in require at /usr/lib/perl5/site_perl/5.8.7/ZoneMinder.pm line 36.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.7/ZoneMinder.pm line 36.
Compilation failed in require at /usr/bin/zmpkg.pl line 45.
BEGIN failed--compilation aborted at /usr/bin/zmpkg.pl line 45.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

It might be useful if everyone wwho has this error can report their system details as per the first post on this thread. It might throw up something in common which will help to track down this problem.
Phil
Locked