Database Error

sperakosr
New Contributor

I'm not sure how to fix this. Our guy that was in charge of Casper left and I have been trying to work with it but have a lot to learn. I'm getting this error and am not sure how to repair it "java.sql.SQLException: com.jamfsoftware.HTTPRequestActions.Controller.processRequest: SQLException from executeQuery: java.sql.SQLException: Table './jamfsoftware/hardware_reports' is marked as crashed and should be repaired" Does anybody know how I can go about fixing this. The only reason I found it is that when we login to the web console and check our inventory, the computers show up but no information for them like hardware and software show up. They are all blank. Any information or help would be greatly appreciated. Thanks, Robbie

2 REPLIES 2

were_wulff
Valued Contributor II

Hi Robbie,

Sorry to hear about the crashed table. Always a pain when that happens, but it’s usually a pretty quick and easy fix.

Usually, when we run into these, I like to do a full repair and optimize on the database just to catch anything else that might be having trouble.

To do this, we recommend that you first stop Tomcat so nothing tries to write to the database while it's running through its repair/optimize.

Instructions for stopping Tomcat can be found in this KB: https://jamfnation.jamfsoftware.com/article.html?id=117

Once Tomcat is stopped, we’ll need to get out to a command line/terminal window.

From there, we’ll run the following:

/usr/local/mysql/bin/mysqlcheck -u root -p —-auto-repair -o jamfsoftware

If we’re using a 10.6.8 server, the path to the mysqlcheck utility is /usr/bin/
On Windows, it’s typically found in Program FilesMySQLMySQL Server 5.xin
On Linux it sometimes varies depending on the distribution and how it was installed, but it’s typically in /usr/bin/

It will prompt for your MySQL root password, go ahead and type that in and press Enter.
If you don’t have a root password set up for MySQL, just press enter.

Then, we wait for it to go through and finish the process.

Depending on how large your database is and how many problems the utility finds, it could take anywhere from a few seconds to up to an hour or so to complete, so we just have to be patient while it runs.

When it’s finished, it will drop back to a command prompt again and we can go ahead and restart Tomcat and try to log back in to the JSS and see if things seem to be working a bit better.

It may be a good idea to send in a full JSS summary to your Account Manager once we’re done with that just so we can look through it and make sure there aren’t any issues that show up in there that could contribute to future table crashes or problems.

To get that, we’ll click the gear icon >> JSS Information >> JSS Summary, scroll to the bottom, click Check All, then click Send Summary to JAMF Software.

If we run into issues doing the above, it may be fastest to reach out to your Account Manager and see about getting a WebEx scheduled.
I did go ahead and give your AM a ping with a link to this discussion to let him know that you’re currently having some database issues.

Thanks!

Amanda Wulff
JAMF Software Support

sperakosr
New Contributor

Thank you for the quick response. That worked perfect, I really appreciate it. Robbie