Power failure: Zoneminder won't start
Posted: Fri May 10, 2013 2:54 pm
Hello all,
We had a power failure and the ZoneMinder server was improperly shut down. After I have restarted it again I got the following error: -
#service zm status
httpd (pid 1858 1857 1856 1855 1854 1853 1852 1851 1850 1833) is running...
mysqld (pid 1719) is running...
DBD::mysql::st execute failed: Table './zm/Logs' is marked as crashed and should be repaired at /usr/local/share/perl5/ZoneMinder/Logger.pm line 609.
While I tried to http the server I got another error: -
Can't write log entry 'insert into Logs ( TimeKey, Component, Pid, Level, Code, Message, File, Line ) values ( 1368195917.303554, 'web_php', 1856, -3, 'FAT', 'SQL-ERR \'Table \'./zm/Logs\' is marked as crashed and should be repaired\', 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\'', '/home/www/html/zm/includes/database.php', 78 )': Table './zm/Logs' is marked as crashed and should be repaired
In Logs
May 10 15:59:32 Video zmpkg[2105]: FAT [Can't execute log entry 'insert into Logs ( TimeKey, Component, Pid, Level, Code, Message, File, Line ) values ( ?, ?, ?, ?, ?, ?, ?, NULL )': Table './zm/Logs' is marked as crashed and should be repaired]
May 10 16:16:46 Video web_php[1853]: FAT [SQL-ERR 'Table './zm/Logs' is marked as crashed and should be repaired', 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']
May 10 16:16:46 Video web_php[1853]: FAT [Can't write log entry 'insert into Logs ( TimeKey, Component, Pid, Level, Code, Message, File, Line ) values ( 1368195406.295318, 'web_php', 1853, -3, 'FAT', 'SQL-ERR \'Table \'./zm/Logs\' is marked as crashed and should be repaired\', 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\'', '/home/www/html/zm/includes/database.php', 78 )': Table './zm/Logs' is marked as crashed and should be repaired]
May 10 16:17:22 Video zmpkg[2180]: FAT [Can't execute log entry 'insert into Logs ( TimeKey, Component, Pid, Level, Code, Message, File, Line ) values ( ?, ?, ?, ?, ?, ?, ?, NULL )': Table './zm/Logs' is marked as crashed and should be repaired]
May 10 16:17:23 Video web_php[1855]: FAT [SQL-ERR 'Table './zm/Logs' is marked as crashed and should be repaired', 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']
May 10 16:17:23 Video web_php[1855]: FAT [Can't write log entry 'insert into Logs ( TimeKey, Component, Pid, Level, Code, Message, File, Line ) values ( 1368195443.018944, 'web_php', 1855, -3, 'FAT', 'SQL-ERR \'Table \'./zm/Logs\' is marked as crashed and should be repaired\', 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\'', '/home/www/html/zm/includes/database.php', 78 )': Table './zm/Logs' is marked as crashed and should be repaired]
How can I repair this issue??
Any advice/help would be appreciated
Thanks
We had a power failure and the ZoneMinder server was improperly shut down. After I have restarted it again I got the following error: -
#service zm status
httpd (pid 1858 1857 1856 1855 1854 1853 1852 1851 1850 1833) is running...
mysqld (pid 1719) is running...
DBD::mysql::st execute failed: Table './zm/Logs' is marked as crashed and should be repaired at /usr/local/share/perl5/ZoneMinder/Logger.pm line 609.
While I tried to http the server I got another error: -
Can't write log entry 'insert into Logs ( TimeKey, Component, Pid, Level, Code, Message, File, Line ) values ( 1368195917.303554, 'web_php', 1856, -3, 'FAT', 'SQL-ERR \'Table \'./zm/Logs\' is marked as crashed and should be repaired\', 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\'', '/home/www/html/zm/includes/database.php', 78 )': Table './zm/Logs' is marked as crashed and should be repaired
In Logs
May 10 15:59:32 Video zmpkg[2105]: FAT [Can't execute log entry 'insert into Logs ( TimeKey, Component, Pid, Level, Code, Message, File, Line ) values ( ?, ?, ?, ?, ?, ?, ?, NULL )': Table './zm/Logs' is marked as crashed and should be repaired]
May 10 16:16:46 Video web_php[1853]: FAT [SQL-ERR 'Table './zm/Logs' is marked as crashed and should be repaired', 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']
May 10 16:16:46 Video web_php[1853]: FAT [Can't write log entry 'insert into Logs ( TimeKey, Component, Pid, Level, Code, Message, File, Line ) values ( 1368195406.295318, 'web_php', 1853, -3, 'FAT', 'SQL-ERR \'Table \'./zm/Logs\' is marked as crashed and should be repaired\', 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\'', '/home/www/html/zm/includes/database.php', 78 )': Table './zm/Logs' is marked as crashed and should be repaired]
May 10 16:17:22 Video zmpkg[2180]: FAT [Can't execute log entry 'insert into Logs ( TimeKey, Component, Pid, Level, Code, Message, File, Line ) values ( ?, ?, ?, ?, ?, ?, ?, NULL )': Table './zm/Logs' is marked as crashed and should be repaired]
May 10 16:17:23 Video web_php[1855]: FAT [SQL-ERR 'Table './zm/Logs' is marked as crashed and should be repaired', 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']
May 10 16:17:23 Video web_php[1855]: FAT [Can't write log entry 'insert into Logs ( TimeKey, Component, Pid, Level, Code, Message, File, Line ) values ( 1368195443.018944, 'web_php', 1855, -3, 'FAT', 'SQL-ERR \'Table \'./zm/Logs\' is marked as crashed and should be repaired\', 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\'', '/home/www/html/zm/includes/database.php', 78 )': Table './zm/Logs' is marked as crashed and should be repaired]
How can I repair this issue??
Any advice/help would be appreciated
Thanks