ZM fails to start

Forum for questions and support relating to the 1.25.x releases only.
Locked
Imagineer
Posts: 4
Joined: Tue Mar 06, 2012 5:16 pm

ZM fails to start

Post by Imagineer »

Hi all,

I have compiled and installed ZoneMinder 1.25.0 from source (that was far from being easy for me, especially since I'm a novice at Linux) along with webmin 1.58 on a freshly installed and up to date Ubuntu server 11.10 x64 (it's a VM, running on VirtualBox), it seemed like all the steps I performed were OK, I mean I didn't notice any serious error during the installation.
I basically followed this tutorial from ZoneMinder Wiki: http://www.zoneminder.com/wiki/index.ph ... _Cambozola and at some time I was able to reach the ZM login page successfully (although I couldn't log in from the host computer - not directly from the VM - because I don't remember having specifically set up any password for ZM, I tried 'zmuser' and 'zmpass' but to no avail, that's yet another problem anyway ..), but I think it's since I rebooted Ubuntu that it's not working any longer.

The error I got in the terminal, when I called the start up script, is as follows:

Starting ZoneMinder: Bareword "ZM_PATH_LOGS" not allowed while "strict subs" in use at /usr/local/share/perl/5.12.4/ZoneMinder/Logger.pm line 153.
BEGIN not safe after errors--compilation aborted at /usr/local/share/perl/5.12.4/ZoneMinder/Logger.pm line 168.
Compilation failed in require at /usr/local/share/perl/5.12.4/ZoneMinder.pm line 34.
BEGIN failed--compilation aborted at /usr/local/share/perl/5.12.4/ZoneMinder.pm line 34.
Compilation failed in require at /usr/local/bin/zmpkg.pl line 37.
BEGIN failed--compilation aborted at /usr/local/bin/zmpkg.pl line 37.
failure


From this message, I guess the issue is related to permissions and/or a conflict for a file being simultaneously used by different processes, but I don't really see how I am supposed to fix that.

Any help would be greatly appreciated,

Thank you.
mastertheknife
Posts: 678
Joined: Wed Dec 16, 2009 4:32 pm
Location: Israel

Re: ZM fails to start

Post by mastertheknife »

This error is usually caused by a bad "Config" table in the database.

mastertheknife
Kfir Itzhak.
Imagineer
Posts: 4
Joined: Tue Mar 06, 2012 5:16 pm

Re: ZM fails to start

Post by Imagineer »

Hi,

thank you for your input and sorry for the late answer, but I couldn't access my computer before to check out your proposition.

I had a look in the database, and especially in the config table as you suggested, but unfortunately I didn't see any variable that could correspond to the error message I got :( .

My previous installation of ZM 1.24.2 (from a .deb package, not from sources) was working fine, so I don't know whether ZM 1.25 is really worth the hassle over ZM 1.24.2 or not?
dgwsoft
Posts: 2
Joined: Fri Oct 28, 2011 5:38 pm

This error is caused by spiders!

Post by dgwsoft »

mastertheknife wrote:This error is usually caused by a bad "Config" table in the database.

mastertheknife
Yes, I had the same error "Starting ZoneMinder: Bareword "ZM_PATH_LOGS" not allowed while "strict subs" in use at /usr/lib/perl5/site_perl/5.8.8/ZoneMinder/Logger.pm line 153. ... "

I fixed it by editing a copy of the script zm_create.sql to leave only the commands for the Config table, then running it:

mysql -u root -p zm < db/zm_create_config.sql

That left my camera settings intact (which was nice).

This happened after I had been running Zoneminder for several months. A spider spun a web over the camera, causing continuous events, which filled up the disk and eventually crashed the computer. That must have been when the config table was corrupted. Does anyone have any anti-spider tips?
User avatar
nightcrawler
Posts: 71
Joined: Fri Aug 12, 2011 9:54 am
Location: the netherlands

Re: ZM fails to start

Post by nightcrawler »

For users with this problem.

I attached an SQL file with and modified zm_create.sql from the 1.25.0 source.
I've commend-out all table creates,drops, and inserts except that from the CONFIG table.

So you will have your events,monitors,filters and presets back. only the general configuration is restored to default.

so this is and short walk-trough how to restore:
  • open and commando box (like putty) and go to your source directory (like @ubuntu: /usr/src/zm)
  • run

    Code: Select all

    mysql -u -p zm < db/zm_update_config.sql
  • insert your database username and password
  • if it's done your getting back to your commandline
  • restart your ZM service (@ubuntu: service zm restart)
  • open your ZM webpage and your done!
  • (edit the global settings to your wish, and If your are an smart-ass> make an copy of the table when your done)
Attachments
zm_update_config.zip
unzip, upload to your server
(34.37 KiB) Downloaded 405 times
Zoneminder @Ubuntu 11 server, ZM 1.25.0 , FFMPEG, 4 Analoge cameras, 1.6ghz P4mobile, 2GB ram, 60GB-HDD.
I also have an (homeseer) domotica system up-and-running with touchscreens,light controllers,weather forecast etc.
DRAGSTER_TUNER
Posts: 39
Joined: Fri Apr 17, 2009 1:42 am

Re: ZM fails to start

Post by DRAGSTER_TUNER »

ERROR 1045 (28000): Access denied for user '-p'@'localhost' (using password: NO)


some clue how fix?
User avatar
nightcrawler
Posts: 71
Joined: Fri Aug 12, 2011 9:54 am
Location: the netherlands

Re: ZM fails to start

Post by nightcrawler »

...access denied...
did you even made and educated guess whats happening?

Right. wrong user /password combination for mysql ZM database it's not your ZM front-end!
Zoneminder @Ubuntu 11 server, ZM 1.25.0 , FFMPEG, 4 Analoge cameras, 1.6ghz P4mobile, 2GB ram, 60GB-HDD.
I also have an (homeseer) domotica system up-and-running with touchscreens,light controllers,weather forecast etc.
AndyMcc
Posts: 4
Joined: Fri May 11, 2012 6:10 pm

Re: ZM fails to start

Post by AndyMcc »

THANK YOU NIGHTCRAWLER!! Your script worked perfectly for me. Many thanks!
Classic
Posts: 16
Joined: Mon Aug 02, 2010 10:48 pm

Re: ZM fails to start

Post by Classic »

Hi, i use your script, and can access without login but when try to enable login, can't access whit default admin/admin, the config create this user, or not? Thanks for all.
p/d: sorry for my english.
snake61
Posts: 64
Joined: Thu Jul 17, 2008 1:44 pm
Location: South Carolina

Re: ZM fails to start, Another bad move on my part

Post by snake61 »

Just updated from Ubuntu 10.04 LTS to Ubuntu 12.04 LTS. That broke ZM 1.24.2 Went to the app section, downloaded the ZM 1.25 app, installed. Nadda. Removed app. Went to Wiki, followed destructions for ZM 1.25. ZM installed, won't start. In upper right corner of ZM console, this is displayed:


2 Monitors
Options / Can't write log entry 'insert into Logs ( TimeKey, Component, Pid, Level, Code, Message, File, Line ) values ( 1346087617.441736, 'web_php', 2699, -3, 'FAT', 'SQL-ERR \'Table \'zm.Logs\' doesn\'t exist\', statement was \'select Level, count(Level) as LevelCount from Logs where Level < 0 and from_unixtime(TimeKey) + interval 900 second > now() group by Level order by Level asc\'', '/usr/share/zoneminder/includes/database.php', 78 )': Table 'zm.Logs' doesn't exist

Anyone have any ideas about what this means?
Thanks for all the Help.
New to Linux
Carrier82
Posts: 96
Joined: Sat Jul 28, 2012 8:30 pm

Re: ZM fails to start

Post by Carrier82 »

I got some weird errors as well when upgrading and/or experimenting too much. The resolution to these kind of errors has always been (for me) apt-get purge zoneminder, then locate any files related to zoneminder and delete them, drop zm sql database (should be done already by apt-get purge?) and install zoneminder again. This will erase all config and event data but is quite easy to do.
snake61
Posts: 64
Joined: Thu Jul 17, 2008 1:44 pm
Location: South Carolina

Re: ZM fails to start

Post by snake61 »

Found that if you "upgrade" from Ubuntu 10.04 to 12.04, t just doesn't work. Best thing to do is to download the ISO for Ubuntu 12.04 and install from there. The go to Wiki for ZM 1.25 and follow instructions. The ZN app in Ubuntu software center appears to be junk and will not work. You would think that these so called geniuses would ensure the ZM 1.25 package provided for install with Ubuntu 12.04 was a working package. Word to the wise, even following the Wiki install for ZM 1.25, it's still not 100%. There are some issues. Again, why would one so haphazardly upload a package that has flaws? If you fixed a car for someone, wouldn't you have enough pride to ensure it was absolutely correct before you returned it to the customer? So why would you upload a damaged package?
Thanks for all the Help.
New to Linux
Carrier82
Posts: 96
Joined: Sat Jul 28, 2012 8:30 pm

Re: ZM fails to start

Post by Carrier82 »

I did an upgrade from 10.04 to 12.04 and purging zoneminder, deleting all related files and installing it using apt-get install zoneminder worked for me. I do not think there is much wrong with the ZM package in Ubuntu. Except for having to add 'sleep 15' in zoneminder init script to make sure mysqld starts before zm. And having to link zoneminder to apache.
bb99
Posts: 943
Joined: Wed Apr 02, 2008 12:04 am

Re: ZM fails to start

Post by bb99 »

Built 12.04 ZM last night after reading your post using PV-143 and 1 ip monitor; 12 hours later everything appears to work fine. This is not an upgrade though so maybe you have remnants of older install (one possible answer).
Locked