Slightly messed up Test Jamf Pro instance - quickest way to resurrection

dlondon
Valued Contributor

I have a test JAMF Pro server (10.20.1) on Red Hat that has the MySQL on another Red Hat server. It almost looks right but some odd things are happening

  • machine searches in the web interface for all machines (nothing in the search field) bring zero results but if I search explicitly for a machine I know is in there by typing its name, I find it
  • Accessing the API gives

<computers> <size>0</size>
</computers>

so that agrees in a way to the first point.

Unfortunately it looks like this issue has been in there through several upgrades so restoring is probably not going to fix it. I'd like to get it back to a point that I trust it.

Given that it's a test server, would it be simplest to just blow away the database and recreate it? If that is the way, will the Tomcat server re-configure the database with all the tables as it does its first connection or do I have to re-do its installation too?

Regards,

David

1 ACCEPTED SOLUTION

leslie
Contributor II
Contributor II

If you don't care about losing the data then yes, drop the database, create a new one and grant permissions. When tomcat is restarted it will recreate the tables. I am curious, when you do your computer search does the dropdown show that you're searching for computers?
0c8657bf90774e6dafde39b46cc11e6e

View solution in original post

8 REPLIES 8

leslie
Contributor II
Contributor II

If you don't care about losing the data then yes, drop the database, create a new one and grant permissions. When tomcat is restarted it will recreate the tables. I am curious, when you do your computer search does the dropdown show that you're searching for computers?
0c8657bf90774e6dafde39b46cc11e6e

anverhousseini
Contributor II

This sounds like an issue with the inventory. There could be a computer which does not have an UDID. Contact Jamf Support, they can send you a few MySQL commands to search for that device in the computers_denormalized table.

stevewood
Honored Contributor II
Honored Contributor II

@dlondon

That first bullet just sounds like you do not have your Search Preferences set. By default computer searches are set to Exact Match.

Simple Computer Searches
Configuring Account Preferences

On the second bullet, about the API, what was the API endpoint you went to? If you go to https://{{url}}/JSSResource/computers does it pull back your inventory?

dlondon
Valued Contributor

Hi @stevewood Good idea on the Search Preferences but they are set to the default on both prod and the test server for me. That is "exact match" for everything.

Dor the API I was just using the /api p[age but using it the way you asked gives the same result

dlondon
Valued Contributor

Hi @anverhousseini Good suggestion. Not many computers in there so I listed the table and they all have a UDID.

dlondon
Valued Contributor

Hi @leslie Yes - the dropdown is set for computers but a good thought. I've been in the wrong area before with the search.

Ok - I guess I'll have to suffer the wrath of the DBA team :) and get them to drop the database and recreate a new one

ashley_stonham
New Contributor II

I had a similar issue it was caused by one machine that was not updating inventory properly.

You could try loading each of the most recently enrolled computers 1 by 1 by going to
https://YOURJSS:8443/computers.html?id=<ID>&o=r&v=inventory

Changing YOUR JSS and ID for the appropriate values.

Look for any machines that dont have complete inventory and deleting them.

you can get the computer IDs from mysql by:
use jamfsoftware;
select computer_id from computers;

Also check your jamfsoftwareserver.log to see if its creating errors when performing searches.

dlondon
Valued Contributor

@leslie I went with the drop database and then create database route. For all you kind people who suggested troubleshooting steps - I thank you. I just need this test server for a short while and then we'll migrate to Jamf Cloud. Everyone is working really hard here and I am sure they are where you are too so I didn't want to waste our DBA's or JAMF Support time in troubleshooting (I am allowed to look in the database but not touch). It did take some time to reconfigure but In some ways I cleaned it up as well

Regards,

David