Upgraded to Fedora 15, zoneminder won't start

Forum for questions and support relating to the 1.24.x releases only.
jm3
Posts: 6
Joined: Sun Apr 24, 2011 6:40 pm

Upgraded to Fedora 15, zoneminder won't start

Post by jm3 »

I upgraded from Fedora 14 (zm 1.24.2) to Fedora 15 (zm 1.24.3).

Code: Select all

[root@nagarjuna ~]# yum info zoneminder
Loaded plugins: langpacks, presto, refresh-packagekit
Installed Packages
Name        : zoneminder
Arch        : x86_64
Version     : 1.24.3
Release     : 4.20110324svn3310.fc15
Zoneminder will not start. I suspect this will be an interesting learning experience since I have no idea how systemd works :-).

I first noticed that there was nothing at all in /var/log/messages. It turns out this is a bug in the Fedora upgrade, wherein the rsyslog service is not given a proper systemd init script.

since ls /etc/systemd/system/*.wants/rsyslog.service returned no file, I enabled the service:

Code: Select all

systemctl enable rsyslog.service
and started it:

Code: Select all

systemctl start rsyslog.service
Now I at least have logs to look at.

Zoneminder does not start, and a restart attempt does not produce any useful information:

Code: Select all

[root@nagarjuna ~]# systemctl restart zoneminder.service
Job failed. See system logs and 'systemctl status' for details.

[root@nagarjuna ~]# /etc/init.d/zoneminder restart
Restarting zoneminder (via systemctl):  Job failed. See system logs and 'systemctl status' for details.
                                                           [FAILED]
/var/log/messages:

Code: Select all

May 29 12:11:47 nagarjuna kernel: [ 3023.206255] systemd[1]: zoneminder.service: control process exited, code=exited status=255
May 29 12:11:47 nagarjuna kernel: [ 3023.220376] systemd[1]: Unit zoneminder.service entered failed state.
[root@nagarjuna ~]# 

[root@nagarjuna ~]# systemctl status zoneminder.service
zoneminder.service - SYSV: ZoneMinder is the top Linux video camera security and surveillance solution. ZoneMinder is intended for use in single or multi-camera video security applications.Copyright: Philip Coombes, Corey DeLasaux 2003-2008
	  Loaded: loaded (/etc/rc.d/init.d/zoneminder)
	  Active: failed since Sun, 29 May 2011 12:14:03 -0400; 33s ago
	 Process: 4878 ExecStart=/etc/rc.d/init.d/zoneminder start (code=exited, status=255)
	  CGroup: name=systemd:/system/zoneminder.service
[root@nagarjuna ~]#
I'll update this post with what I find, and I appreciate any assistance.
jm3
Posts: 6
Joined: Sun Apr 24, 2011 6:40 pm

Re: Upgraded to Fedora 15, zoneminder won't start

Post by jm3 »

Config doesn't seem to have changed much:

Code: Select all

[root@nagarjuna ~]# diff /etc/zm.conf /etc/zm.conf.backup
3c3
< # ZoneMinder Base Configuration, $Date: 2008-07-25 04:48:16 -0500 (Fri, 25 Jul 2008) $, $Revision: 2612 $
---
> # ZoneMinder Base Configuration, $Date: 2008-07-25 10:48:16 +0100 (Fri, 25 Jul 2008) $, $Revision: 2612 $
13c13
< ZM_VERSION=1.24.3
---
> ZM_VERSION=1.24.2
19c19
< ZM_TIME_BUILD=1301032182
---
> ZM_TIME_BUILD=1296002313
[root@nagarjuna ~]#
Looked at the init script and started zmpkg.pl from the command line to see any errors:

Code: Select all

[root@nagarjuna ~]# . /etc/zm.conf
[root@nagarjuna ~]# /usr/bin/zmpkg.pl 
Bareword "PROT_READ" not allowed while "strict subs" in use at /usr/share/perl5/vendor_perl/ZoneMinder/Memory/Mapped.pm line 91.
Bareword "PROT_WRITE" not allowed while "strict subs" in use at /usr/share/perl5/vendor_perl/ZoneMinder/Memory/Mapped.pm line 91.
Bareword "MAP_SHARED" not allowed while "strict subs" in use at /usr/share/perl5/vendor_perl/ZoneMinder/Memory/Mapped.pm line 91.
Compilation failed in require at /usr/share/perl5/vendor_perl/ZoneMinder/Memory.pm line 120.
Compilation failed in require at /usr/share/perl5/vendor_perl/ZoneMinder.pm line 37.
BEGIN failed--compilation aborted at /usr/share/perl5/vendor_perl/ZoneMinder.pm line 37.
Compilation failed in require at /usr/bin/zmpkg.pl line 46.
BEGIN failed--compilation aborted at /usr/bin/zmpkg.pl line 46.
[root@nagarjuna ~]# 
jm3
Posts: 6
Joined: Sun Apr 24, 2011 6:40 pm

Re: Upgraded to Fedora 15, zm won't start (WORKAROUND ENABLE

Post by jm3 »

/usr/share/perl5/vendor_perl/ZoneMinder/Memory/Mapped.pm:

Code: Select all

 91         my $mmap_addr = mmap( $mmap, $size, PROT_READ|PROT_WRITE, MAP_SH        ARED, \*MMAP );
     
If I comment out use strict zoneminder starts and seems to be working (All I tried so far is verifying I can see the video feeds):

Code: Select all

 27 #use strict;
    
systemctl now shows active(exited). I'm not sure what that means, but Zoneminder is running now.

Code: Select all

[root@nagarjuna ~]# systemctl status zoneminder.service
zoneminder.service - SYSV: ZoneMinder is the top Linux video camera security and surveillance solution. ZoneMinder is intended for use in single or multi-camera video security applications.Copyright: Philip Coombes, Corey DeLasaux 2003-2008
	  Loaded: loaded (/etc/rc.d/init.d/zoneminder)
	  Active: active (exited) since Sun, 29 May 2011 12:32:39 -0400; 2min 32s ago
	 Process: 4982 ExecStart=/etc/rc.d/init.d/zoneminder start (code=exited, status=0/SUCCESS)
	  CGroup: name=systemd:/system/zoneminder.service
[root@nagarjuna ~]#

I don't know perl at all, so I'm not sure if this is something that should be changed in the zoneminder code or in the Fedora package. Can anyone shed light on the Bareword "FILE" not allowed while "strict subs" error? It looks like this might have something to do with it: http://www.perlmonks.org/?node_id=397758
jm3
Posts: 6
Joined: Sun Apr 24, 2011 6:40 pm

Re: Upgraded to Fedora 15, zoneminder won't start

Post by jm3 »

Just a note, EyeZM stopped working too. It turns out that Fedora 14->15 upgrade also closed port 80 through the firewall. I opened the port and EyeZM works fine now. I really need to set up SSL anyway...
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Re: Upgraded to Fedora 15, zoneminder won't start

Post by zoneminder »

You can switch off memory mapping by adding --use-mmap=no to the configure line. I don't have a Fedora 15 system ready yet but I will set one up and take a closer look. Removing 'use strict' is not always a good idea :(
Phil
DREMA
Posts: 162
Joined: Fri Dec 12, 2008 2:39 am
Location: México

Re: Upgraded to Fedora 15, zoneminder won't start

Post by DREMA »

[root@nagarjuna ~]# /usr/bin/zmpkg.pl
Bareword "PROT_READ" not allowed while "strict subs" in use at /usr/share/perl5/vendor_perl/ZoneMinder/Memory/Mapped.pm line 91.
Bareword "PROT_WRITE" not allowed while "strict subs" in use at /usr/share/perl5/vendor_perl/ZoneMinder/Memory/Mapped.pm line 91.
Bareword "MAP_SHARED" not allowed while "strict subs" in use at /usr/share/perl5/vendor_perl/ZoneMinder/Memory/Mapped.pm line 91.
Compilation failed in require at /usr/share/perl5/vendor_perl/ZoneMinder/Memory.pm line 120.
Compilation failed in require at /usr/share/perl5/vendor_perl/ZoneMinder.pm line 37.
BEGIN failed--compilation aborted at /usr/share/perl5/vendor_perl/ZoneMinder.pm line 37.
Compilation failed in require at /usr/bin/zmpkg.pl line 46.
BEGIN failed--compilation aborted at /usr/bin/zmpkg.pl line 46.
[root@nagarjuna ~]#
Got a lot of testing sytems got screwed like this, it hs nothing to do with the memory mapping.
Bareword "PROT_READ" not allowed while "strict subs" in use...


Not the same error, but always the "Bareword" thing, it seem to be the database is getting corrupted or something like that. Recompiling, reinstalling, nothing solves this, only dropping and recreating the entire database.
Just... enjoy life! :D
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Re: Upgraded to Fedora 15, zoneminder won't start

Post by zoneminder »

If you get bareword errors with things that start with ZM_ then it can be due to the configuration not being correctly loaded into the DB.

In this case PROT_READ is a standard Linux constant imported from the perl Sys::Mmap module and used in the call to the mmap function itself. In this specific case I would suspect that used shared memory instead will remove the error. However until I have a Fedora 15 system up and running I can't be absolutely sure.
Phil
DREMA
Posts: 162
Joined: Fri Dec 12, 2008 2:39 am
Location: México

Re: Upgraded to Fedora 15, zoneminder won't start

Post by DREMA »

Hi Phil!

Call it casuality, but I was checking one of my systems, and froze a few times, so I have to keep hard reseting it.

Now I'm stuck on the bareword errors! How can I fix this??
root@camaras:~# zmpkg.pl start
Bareword "ZM_PATH_LOGS" not allowed while "strict subs" in use at /usr/local/share/perl/5.12.3/ZoneMinder/Debug.pm line 265.
Compilation failed in require at /usr/local/share/perl/5.12.3/ZoneMinder.pm line 34.
BEGIN failed--compilation aborted at /usr/local/share/perl/5.12.3/ZoneMinder.pm line 34.
Compilation failed in require at /usr/local/bin/zmpkg.pl line 46.
BEGIN failed--compilation aborted at /usr/local/bin/zmpkg.pl line 46.
If I acces http://192.168.0.146/zm it redirects me to http://192.168.0.146/zm/undefined

Any help appreciated, this is an important setup :S
Just... enjoy life! :D
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Re: Upgraded to Fedora 15, zoneminder won't start

Post by zoneminder »

Check your database is healthy, it may be that one of the tables is corrupted?
Phil
DREMA
Posts: 162
Joined: Fri Dec 12, 2008 2:39 am
Location: México

Re: Upgraded to Fedora 15, zoneminder won't start

Post by DREMA »

I just run "mysqlcheck --all-databases --auto-repair -u root -p" and everything says OK, but I accessed http://192.168.0.146/zm/index.php?view=options and all the tabs are in blank, nothing appears at all.

How can I recreate my configs without dropping the entire db or without deleting all my events and monitors? Or what should I do?

Thanks again for the help.
Just... enjoy life! :D
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Re: Upgraded to Fedora 15, zoneminder won't start

Post by zoneminder »

zm_create.sql will contain a schema for the whole DB. So you can just go and find the bits for the Config table and extract and insert those. I don't know why your Config table should be empty though, nothing does anything other than update it. Have you checked if it'sreally all gone using mysql?
Phil
DREMA
Posts: 162
Joined: Fri Dec 12, 2008 2:39 am
Location: México

Re: Upgraded to Fedora 15, zoneminder won't start

Post by DREMA »

This machine froze and I hard rebooted it a couple times, maybe that screw the database? Also note that this is not the firts time this exact same "bareword" error heppen to me.

I really don't know anything of mysql, could you point me on the right direction??
Just... enjoy life! :D
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Re: Upgraded to Fedora 15, zoneminder won't start

Post by cordel »

SysV init scripts are not going to be used any more in Fedora....

http://www.zoneminder.com/forums/viewto ... 21&t=17733
https://fedoraproject.org/wiki/Packagin ... es:Systemd

Sorry I missed this thread :(
DREMA
Posts: 162
Joined: Fri Dec 12, 2008 2:39 am
Location: México

Re: Upgraded to Fedora 15, zoneminder won't start

Post by DREMA »

Another power shourtage, the exacly same problem.
ZM 1.24.4, any help ?
Thanks
Just... enjoy life! :D
Locked