Page 1 of 1

ZM fails to start

Posted: Tue Mar 06, 2012 5:58 pm
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.

Re: ZM fails to start

Posted: Wed Mar 07, 2012 4:06 pm
by mastertheknife
This error is usually caused by a bad "Config" table in the database.

mastertheknife

Re: ZM fails to start

Posted: Sat Mar 10, 2012 10:51 pm
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?

This error is caused by spiders!

Posted: Thu Mar 15, 2012 11:18 pm
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?

Re: ZM fails to start

Posted: Fri Mar 30, 2012 6:48 pm
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)

Re: ZM fails to start

Posted: Thu Apr 05, 2012 4:36 am
by DRAGSTER_TUNER
ERROR 1045 (28000): Access denied for user '-p'@'localhost' (using password: NO)


some clue how fix?

Re: ZM fails to start

Posted: Thu Apr 05, 2012 7:23 am
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!

Re: ZM fails to start

Posted: Wed Jun 20, 2012 8:56 pm
by AndyMcc
THANK YOU NIGHTCRAWLER!! Your script worked perfectly for me. Many thanks!

Re: ZM fails to start

Posted: Mon Jul 30, 2012 2:06 am
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.

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

Posted: Mon Aug 27, 2012 5:15 pm
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?

Re: ZM fails to start

Posted: Mon Aug 27, 2012 5:29 pm
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.

Re: ZM fails to start

Posted: Mon Sep 03, 2012 1:46 am
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?

Re: ZM fails to start

Posted: Mon Sep 03, 2012 6:38 am
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.

Re: ZM fails to start

Posted: Mon Sep 03, 2012 2:29 pm
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).