Table 'Monitors' is read only
Table 'Monitors' is read only
Odd error. I'm logged in as admin. It worked fine for quite some time. I haven't spent a lot of time debugging, but if there's an easy answer it would save me time.
I can't change the state of Zone minder (from stopped to start for example) or change the funciton of the cameras because "Table 'Monitors' is read only"
-David
I can't change the state of Zone minder (from stopped to start for example) or change the funciton of the cameras because "Table 'Monitors' is read only"
-David
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Not that I'm aware of. I didn't change any of the database permissions and I tried rebooting which in theory should have released any rogue applications.
There's nothing much in the log files either...
It is possible the machine was compromised by someone mischevious, but there are none of the usual signs (missing log files, odd file entries, etc.)
-David
There's nothing much in the log files either...
It is possible the machine was compromised by someone mischevious, but there are none of the usual signs (missing log files, odd file entries, etc.)
-David
Check the database integrity. Sounds like something might have gotten corrupted.
first you can try:
and If that can't repair everything then stop zm and mysql and run:
Corey
first you can try:
Code: Select all
mysqlcheck --all-databases --auto-repair -ppassword -u user
Code: Select all
myisamchk --silent --force --fast --update-state -O key_buffer=64M \
-O sort_buffer=64M -O read_buffer=1M -O write_buffer=1M \
/var/lib/mysql/*/*.MYI
fixed - bad blocks
After much futzing it became apparent that this was a hardware problem with the /var partition. As this is mounted as /dev/hda6, what I needed to do was fsck it in a fairly agressive way to get the blocks mapped out and any thus broken files remapped. Fortunately nothing critical seems to have been hosed.
unmounts the drive
does a non-destructive read/write and found 27 bad blocks (total, most probably on the OEM table, but reverified).
-p found errors, but they were a bit too serious to fix in "not likely to hose" mode. There is some risk of totally hosing your drive, so backup first.[/code]
Code: Select all
umount /dev/hda6
Code: Select all
e2fsck -c -c -D -f -F -k -v -y /dev/hda6
-p found errors, but they were a bit too serious to fix in "not likely to hose" mode. There is some risk of totally hosing your drive, so backup first.[/code]
-
- Posts: 5111
- Joined: Wed Jun 08, 2005 8:07 pm
- Location: Midlands UK
having probs myself
tried the usual
im having this too niether ofthe fix commands do fix it
any clues?
tried the usual
Code: Select all
Stopping ZoneMinder: [ OK ]
[root@id1461 ~]# myisamchk --silent --force --fast --update-state -O key_buffer= 64M \
> -O sort_buffer=64M -O read_buffer=1M -O write_buffer=1M \
> /var/lib/mysql/*/*.MYI
myisamchk: MyISAM file /var/lib/mysql/zm/Events.MYI
myisamchk: warning: 1 client is using or hasn't closed the table properly
myisamchk: MyISAM file /var/lib/mysql/zm/Frames.MYI
myisamchk: warning: Table is marked as crashed and last repair failed
myisamchk: warning: Size of indexfile is: 262320128 Should be: 136311808
myisamchk: warning: Size of datafile is: 204207030 Should be: 194865450
myisamchk: error: Can't read indexpage from filepos: -1
myisamchk: Error writing file '/var/lib/mysql/zm/Frames.MYI' (Errcode: 5)
myisamchk: MyISAM file /var/lib/mysql/zm/Frames.MYI
myisamchk: error: 5 when fixing table
any clues?
James Wilson
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
helpful
In the end, my drive got flaky. I have had a chron job running fsck daily ever since my last post, and haven't had the same problems since. This is not recommended procedure, your mileage may vary, but it is working for me. The server is running headless at the moment, so I can't pull up the command to reference it.
Check df to make sure you're good on space too.
Check df to make sure you're good on space too.
-
- Posts: 5111
- Joined: Wed Jun 08, 2005 8:07 pm
- Location: Midlands UK
its not full. that was my first thought!
i have tried running fsck but as i need it to run on md0 i dont know how
thanks anyway. I reakon its had a bad power down, but as mqsql cant repair it self the thing is currently down!
i have tried running fsck but as i need it to run on md0 i dont know how
thanks anyway. I reakon its had a bad power down, but as mqsql cant repair it self the thing is currently down!
James Wilson
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
This looks like an I/O error so it may be that your disk is on the way out. Any other errors in /var/log/messages? md0 is a RAID partition usually, do you have it striped or mirrored? It may be that you can add in a different disk and rebuild the RAID but I'm afraid I don't know exactly how.jameswilson wrote:myisamchk: Error writing file '/var/lib/mysql/zm/Frames.MYI' (Errcode: 5)
Phil
In case it helps anyone else, here's how the above problem worked out for me.
The symptoms in my case were that filters weren't being run. A check of /var/zmdc.log revealed
After running
it output the following
As of the time of this writing I can't be sure if the filter is being run now. It doesn't appear to. After checking with the ZM options via the web interface, it appears the filters should've run by now. I'll keep you all posted.
The symptoms in my case were that filters weren't being run. A check of /var/zmdc.log revealed
Code: Select all
05/27/2008 23:27:03.079696 zmdc[22862].INF [Starting pending process, zmaudit.pl -c]
05/27/2008 23:27:03.088442 zmdc[22862].INF ['zmaudit.pl -c' starting at 08/05/27 23:27:03, pid = 23277]
05/27/2008 23:27:05.127264 zmdc[22862].ERR ['zmaudit.pl -c' exited abnormally, exit status 9]
Code: Select all
mysqlcheck --all-databases --auto-repair -ppassword -u user
Code: Select all
mysql.columns_priv OK
mysql.db OK
mysql.func OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
mysql.proc OK
mysql.procs_priv OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
zm.Config OK
zm.ControlPresets OK
zm.Controls OK
zm.Devices OK
zm.Events OK
zm.Filters OK
zm.Frames OK
zm.Groups OK
zm.MonitorPresets OK
zm.Monitors OK
zm.States OK
zm.Stats
error : Table './zm/Stats' is marked as crashed and should be repaired
zm.TriggersX10 OK
zm.Users OK
zm.ZonePresets OK
zm.Zones OK
Repairing tables
zm.Stats OK