View unanswered posts | View active topics It is currently Fri Aug 01, 2014 10:50 am



Reply to topic  [ 14 posts ] 
Table './zm/Events' is marked as crashed and should be... 
Author Message

Joined: Sat Mar 31, 2007 10:18 pm
Posts: 1059
Location: Houston, TX
Post Table './zm/Events' is marked as crashed and should be...
I woke up to a new console...
I tried the Wiki http://www.zoneminder.com/wiki/index.ph ... atabase.3F and a few others... 'mysqlcheck --all-databases --auto-repair' and a few reboots. No luck. Any hints?

Console
Code:
Table './zm/Events' is marked as crashed and should be repaired
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /usr/share/zoneminder/zm_html_view_console.php on line 81

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /usr/share/zoneminder/zm_html_view_console.php on line 82

Warning: array_merge() [function.array-merge]: Argument #3 is not an array in /usr/share/zoneminder/zm_html_view_console.php on line 91
Table './zm/Events' is marked as crashed and should be repaired
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /usr/share/zoneminder/zm_html_view_console.php on line 81

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /usr/share/zoneminder/zm_html_view_console.php on line 82

Warning: array_merge() [function.array-merge]: Argument #3 is not an array in /usr/share/zoneminder/zm_html_view_console.php on line 91
Table './zm/Events' is marked as crashed and should be repaired
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /usr/share/zoneminder/zm_html_view_console.php on line 81

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /usr/share/zoneminder/zm_html_view_console.php on line 82

Warning: array_merge() [function.array-merge]: Argument #3 is not an array in /usr/share/zoneminder/zm_html_view_console.php on line 91
Table './zm/Events' is marked as crashed and should be repaired
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /usr/share/zoneminder/zm_html_view_console.php on line 81

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /usr/share/zoneminder/zm_html_view_console.php on line 82

Warning: array_merge() [function.array-merge]: Argument #3 is not an array in /usr/share/zoneminder/zm_html_view_console.php on line 91
Table './zm/Events' is marked as crashed and should be repaired
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /usr/share/zoneminder/zm_html_view_console.php on line 81

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /usr/share/zoneminder/zm_html_view_console.php on line 82

Warning: array_merge() [function.array-merge]: Argument #3 is not an array in /usr/share/zoneminder/zm_html_view_console.php on line 91
Table './zm/Events' is marked as crashed and should be repaired
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /usr/share/zoneminder/zm_html_view_console.php on line 81

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /usr/share/zoneminder/zm_html_view_console.php on line 82

Warning: array_merge() [function.array-merge]: Argument #3 is not an array in /usr/share/zoneminder/zm_html_view_console.php on line 91
Table './zm/Events' is marked as crashed and should be repaired
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /usr/share/zoneminder/zm_html_view_console.php on line 81

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /usr/share/zoneminder/zm_html_view_console.php on line 82

Warning: array_merge() [function.array-merge]: Argument #3 is not an array in /usr/share/zoneminder/zm_html_view_console.php on line 91
Table './zm/Events' is marked as crashed and should be repaired
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /usr/share/zoneminder/zm_html_view_console.php on line 81

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /usr/share/zoneminder/zm_html_view_console.php on line 82

Warning: array_merge() [function.array-merge]: Argument #3 is not an array in /usr/share/zoneminder/zm_html_view_console.php on line 91
Table './zm/Events' is marked as crashed and should be repaired
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /usr/share/zoneminder/zm_html_view_console.php on line 81

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /usr/share/zoneminder/zm_html_view_console.php on line 82

Warning: array_merge() [function.array-merge]: Argument #3 is not an array in /usr/share/zoneminder/zm_html_view_console.php on line 91
Table './zm/Events' is marked as crashed and should be repaired
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /usr/share/zoneminder/zm_html_view_console.php on line 81

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /usr/share/zoneminder/zm_html_view_console.php on line 82

Warning: array_merge() [function.array-merge]: Argument #3 is not an array in /usr/share/zoneminder/zm_html_view_console.php on line 91
Table './zm/Events' is marked as crashed and should be repaired
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /usr/share/zoneminder/zm_html_view_console.php on line 81

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /usr/share/zoneminder/zm_html_view_console.php on line 82

Warning: array_merge() [function.array-merge]: Argument #3 is not an array in /usr/share/zoneminder/zm_html_view_console.php on line 91


/var/log/messages
Code:
Jun 19 14:34:02 neteye zmc_dvideo1[5406]: WAR [Buffer overrun at index 12, slow down capture, speed up analysis or increase ring buffer size]
Jun 19 14:34:03 neteye zmc_dvideo0[5400]: WAR [Buffer overrun at index 31, slow down capture, speed up analysis or increase ring buffer size]
Jun 19 14:34:05 neteye zmc_dvideo1[5406]: WAR [Buffer overrun at index 24, slow down capture, speed up analysis or increase ring buffer size]
Jun 19 14:34:14 neteye zmc_dvideo1[5406]: WAR [Buffer overrun at index 12, slow down capture, speed up analysis or increase ring buffer size]
Jun 19 14:34:15 neteye zmc_dvideo0[5400]: WAR [Buffer overrun at index 31, slow down capture, speed up analysis or increase ring buffer size]
Jun 19 14:34:17 neteye zmc_dvideo1[5406]: WAR [Buffer overrun at index 24, slow down capture, speed up analysis or increase ring buffer size]
Jun 19 14:34:26 neteye zmc_dvideo1[5406]: WAR [Buffer overrun at index 12, slow down capture, speed up analysis or increase ring buffer size]
Jun 19 14:34:27 neteye zmc_dvideo0[5400]: WAR [Buffer overrun at index 31, slow down capture, speed up analysis or increase ring buffer size]
Jun 19 14:34:29 neteye zmc_dvideo1[5406]: WAR [Buffer overrun at index 24, slow down capture, speed up analysis or increase ring buffer size]
Jun 19 14:34:30 neteye zma_m5[5747]: INF [Office: 1000 - Processing at 3.37 fps]
sysop@neteye:/var/log$ tail messages
Jun 19 14:39:06 neteye zmc_dvideo1[5406]: WAR [Buffer overrun at index 24, slow down capture, speed up analysis or increase ring buffer size]
Jun 19 14:39:13 neteye zmc_dvideo0[5400]: WAR [Buffer overrun at index 21, slow down capture, speed up analysis or increase ring buffer size]
Jun 19 14:39:14 neteye zmc_dvideo1[5406]: WAR [Buffer overrun at index 11, slow down capture, speed up analysis or increase ring buffer size]
Jun 19 14:39:15 neteye zmc_dvideo0[5400]: WAR [Buffer overrun at index 29, slow down capture, speed up analysis or increase ring buffer size]
Jun 19 14:39:18 neteye zmc_dvideo1[5406]: WAR [Buffer overrun at index 24, slow down capture, speed up analysis or increase ring buffer size]
Jun 19 14:39:21 neteye zmdc[5378]: INF [Starting pending process, zma -m 5]
Jun 19 14:39:21 neteye zmdc[5863]: INF ['zma -m 5' started at 07/06/19 14:39:21]
Jun 19 14:39:21 neteye zmdc[5378]: INF ['zma -m 5' starting at 07/06/19 14:39:21, pid = 5863]
Jun 19 14:39:21 neteye zma_m5[5863]: INF [Debug Level = 0, Debug Log = <none>]
Jun 19 14:39:21 neteye zma_m5[5863]: INF [In mode 3/1, warming up]
sysop@neteye:/var/log$


Tue Jun 19, 2007 8:40 pm
Profile
User avatar

Joined: Fri Mar 05, 2004 5:47 pm
Posts: 5218
Location: /USA/Washington/Seattle
Post 
Did you stop the data base and try the other method I have posted in the wiki?

If that fails as well, You are welcome to PM me ssh info, and I can most likily fix it, Just if it goes beyond those simple fixes, it usualy gets pretty involved so no simple how to other than lots of reading on the mysql site to understand whats really going on and how to fix.


Tue Jun 19, 2007 8:48 pm
Profile WWW

Joined: Sat Mar 31, 2007 10:18 pm
Posts: 1059
Location: Houston, TX
Post 
Yes, I tried both things in the Wiki. You will have a PM in 5... However, I would love to know what happened, and what you did. I am all about learn'in and stuff. :)


Tue Jun 19, 2007 10:49 pm
Profile

Joined: Mon Feb 12, 2007 6:18 am
Posts: 11
Location: Kelso, WA, USA
Post 
I had the same thing start happening yesterday too. What did you discover? Maybe I can fix my system too. Unfortunately in trying to figure what went wrong I went to the Zones screen and resaved the zones on one of my cameras and now I get an error that ./zm/Frames is marked as crashed and should be fixed. Any Ideas on this one?

Thank you,

David


Thu Jun 21, 2007 6:40 am
Profile

Joined: Sat Mar 31, 2007 10:18 pm
Posts: 1059
Location: Houston, TX
Post 
One thing I discovered is that Cordel is awesome! He fixed it in no time. This is from our off line discussion...
Quote:
Unable to use the database repair tool myisamchk
Code:
 myisamchk --force --update-state -O key_buffer=64M -O sort_buffer=64M -O read_buffer=1M -O write_buffer=1M /var/lib/mysql/zm/*.MYI
myisamchk: error: File '/var/lib/mysql/zm/*.MYI' doesn't exist

I managed to get around it. by executing directly in the database repair table Events.

You should be good to go.

When I asked how he did that, he replied with,
Quote:
From this chapter at mysql:
http://dev.mysql.com/doc/refman/5.0/en/ ... e-sql.html
Analysis showed the the index was off, but for the most part everything else was okay in zm.Events. So I ran a repair table Events from within the database.

The man is good!


Thu Jun 21, 2007 6:43 pm
Profile

Joined: Mon Jan 15, 2007 4:29 am
Posts: 13
Location: Canberra, Australia
Post 
OK looks like I am next in line for the problem. Have tried the recommended actions and YES with the database closed. I even tried to repair the events table from within the database - no joy.

Can I take you up on the offer of a PM to look at the system?


Sat Sep 08, 2007 8:27 am
Profile

Joined: Sat Mar 31, 2007 10:18 pm
Posts: 1059
Location: Houston, TX
Post 
There is something going on with the posted command line instructions and Debian. I have been looking into it, but not found an answer yet. So to fix it, install phpmyadmin. Then stop ZM, and use phpmyadmin to check and repair the database. You should actually only need to repair the tables marked 'in use' when ZM is stopped, but I do a full check, and repair. Then for security remove, or otherwise disable phpmyadmin.


Sat Sep 08, 2007 6:33 pm
Profile

Joined: Mon Jan 15, 2007 4:29 am
Posts: 13
Location: Canberra, Australia
Post Fixed :-)
Lee,

Thanks for the info. The process worked like a charm and I am back on deck. For what it is worth the message when I ran the repair was "Number of rows changed from 456918 to 456920". Not sure if it helps with any debugging.

For the newbies...

I am using Ubuntu 7.05 server.
    Using the web interface stop zm
    SSH into your server...
    My commands were:
    Code:
    sudo apt-get install phpmyadmin

    Add the password and watch it install.
    Open a web browser and go to http://your.server.ip.address/phpmyadmin
    I suggest you go in as root
    If you have a password (and you should) enter it else leave it blank
    On the left select the zm database
    bottom of screen
    Code:
    Check all

    Drop down box (says "With selected") change to "Repair Table"
    Wait for it to do its stuff
    Now go back into your web interface for zm and select and delete all events (I have six cameras so it took a bit). This gets rid of broken links.
    Make sure zm is started again...


Job Done! :wink:

Smiles all round :D

Thanks again

Jerji


Sun Sep 09, 2007 6:32 am
Profile

Joined: Sat Jul 28, 2007 1:27 pm
Posts: 52
Location: Kinzweiler, Germany and Beith, Scotland
Post Re: Fixed :-)
jerji wrote:
Job Done! :wink:

Smiles all round :D

Thanks again

Jerji


Thank you so much!
Your advice was easily to follow!

You saved my Computer as well! :) :) :)
Cyrus

_________________
Serenity is not freedom from storm; it's peace within the storm


Sun Sep 09, 2007 12:36 pm
Profile WWW

Joined: Sat Mar 31, 2007 10:18 pm
Posts: 1059
Location: Houston, TX
Post Re: Fixed :-)
cyrulution wrote:
Thank you so much!
Your advice was easily to follow!

You saved my Computer as well! :) :) :)
Cyrus

I post the solution and he gets the thanks? That's it. I'm outta here! :lol:

For the record, I have seen about 6 of these crashed tables. Almost all of them seem to coincide with a unscheduled reboot. Only 2 were from an unknown cause. Right now I have 6 ZM machines on Ubuntu running. 1 Edgy, and the rest Feisty 32bit. I also do not delete the old events. The broken links leave soon enough on there own. :)


Sun Sep 09, 2007 9:58 pm
Profile

Joined: Mon Jan 15, 2007 4:29 am
Posts: 13
Location: Canberra, Australia
Post zm/events and reboot
Hi Lee,

I was not trying to steal your kudos :oops:

You might be onto something with the unscheduled reboot. I had a power failure that took out the server at the remote site (and yes I went out and bought a bigger UPS). Maybe the system was in the middle of writing to the database and something may have got out of sync on the reboot.

Jerji


Sun Sep 09, 2007 10:07 pm
Profile

Joined: Sat Mar 31, 2007 10:18 pm
Posts: 1059
Location: Houston, TX
Post 
It is a security camera. It is always writing to the database. :)


Sun Sep 09, 2007 10:15 pm
Profile
User avatar

Joined: Fri Mar 05, 2004 5:47 pm
Posts: 5218
Location: /USA/Washington/Seattle
Post Re: zm/events and reboot
jerji wrote:
You might be onto something with the unscheduled reboot. I had a power failure that took out the server at the remote site (and yes I went out and bought a bigger UPS). Maybe the system was in the middle of writing to the database and something may have got out of sync on the reboot.

Jerji

This is the number two culprit, with the first being a system lockup. You are absolutely correct in if there is a transaction in progress when the system goes down, the tables involved will still be marked as open, thus showing that there is a potential error in the table and it is locked since the sever thinks a process is still using the table.


Sun Sep 09, 2007 10:20 pm
Profile WWW

Joined: Sat Jul 28, 2007 1:27 pm
Posts: 52
Location: Kinzweiler, Germany and Beith, Scotland
Post Re: Fixed :-)
Lee Sharp wrote:
cyrulution wrote:
Thank you so much!
Your advice was easily to follow!

You saved my Computer as well! :) :) :)
Cyrus

I post the solution and he gets the thanks? That's it. I'm outta here! :lol:



Sorry Lee!
I made a wrong quote!
At least he was praising you.

Cyrus :oops:

_________________
Serenity is not freedom from storm; it's peace within the storm


Sun Sep 09, 2007 11:51 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 14 posts ] 

Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group