JSS Database error

Nguyen
New Contributor III

Hi Everyone

How could i go and fix this error "Lookup logs:java.sql.SQLException: com.jamfsoftware.HTTPRequestActions.Controller.processRequest: SQLException from executeQuery: java.sql.SQLException: Table './jamfsoftware/log_actions' is marked as crashed and should be repaired
org.apache.jasper.JasperException: org.apache.jasper.JasperException: java.lang.NullPointerException"

when i go to Policy -> chose on any policy -> click on view status -> then the error above show up.

Thank you for your help

2 REPLIES 2

macguy
New Contributor II

Hi Nguyen,

I have come across exactly the same error - further investigation shows that on my Casper instance the log_actions.MYD is 121GB!!!

Any chance you can fill me in on what you did to correct your issue?

JPDyson
Valued Contributor

Macguy, it's time to set up a retention policy. I'm at 30 days for all tables, but 6 months may be feasible for your org. It's largely size dependent. Just that step will help in a lot of cases.

If you have a scheduled log deletion, make sure it's not the same time as your database backups. For example, I dump logs at midnight and backup at 3am.

Now, this last bit isn't a recommendation per se, but I did have a corrupted table and did solve it this way: Drop the table and re-run the JSS installer. You lose whatever was in that table, but with a 30-day retention policy in place, I was back up to normal within.... 30 days. Functionally, the required information was mostly complete far sooner, and I did lose whatever "historical" data I had for machines that hadn't checked in for 30 days or more (remember, the last record is never deleted, even if older than 30 days). But, hey - I got past the error. I AM NOT SAYING THAT YOU SHOULD DO THIS. IF YOU DO, YOU'LL LOSE DATA. But it works.