Multiple computers return 404 when selected

straffin
New Contributor III

In researching some problematic computer issues in Jamf Pro (mainly duplicate S/Ns causing API errors), I've found a number of computer objects that display in an Inventory Search but clicking on them yields a 404 error in both the Web UI and the API:

straffin_0-1637017198341.png

API: https://our.server.name:8443/JSSResource/computers/id/11857
Result:
<html>
<head>
   <title>Status page</title>
</head>
<body style="font-family: sans-serif;">
<p style="font-size: 1.2em;font-weight: bold;margin: 1em 0px;">Not Found</p>
<p>The server has not found anything matching the request URI</p>
<p>You can get technical details <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5">here</a>.<br>
Please continue your visit at our <a href="/">home page</a>.
</p>
</body>
</html>

Any thoughts on how to proceed from here? So far I've identified at least 6 computer objects for which this is the case, so it's not exactly an isolated problem. The Inventory Search shows them as being there, but any attempt to see details or operate on the object gets a 404. ☹️

9 REPLIES 9

junjishimazaki
Valued Contributor

Hi Straffin, how did you search for these computer records? You can probably use curl to send API command to your jamf to retrieve the Jamf record. If you don't need that record then you can use curl to delete the record.

Nope... API gives the 404 record as well as a manual Web UI search. You can see the results in my original post.

Just tried deleting via the API (via PowerShell) and that failed as well:

$response = Invoke-RestMethod -Uri "https://our.server.name:8443/JSSResource/computers/id/10249" -Headers $jpheaders -Method Delete
Invoke-RestMethod :
Status page
Not Found
The server has not found anything matching the request URI
You can get technical details here.
Please continue your visit at our home page.

junjishimazaki
Valued Contributor

Sorry, I don't know how I missed that in your OP. Instead of deleting it by the jamf id, can you try by serial number?

That's actually the problem... the API fails on computers with duplicate Serial Numbers or MAC Addresses. We've been cleaning this up by deleting the older duplicate manually in the Web UI (which doesn't have the same duplicate SN/MAC problem), but can't operate on these particular records.

I'm expecting that this is going to be a "run a query against the database directly" sort of issue, but wanted to ask the community if there are any other solutions. Thanks!

junjishimazaki
Valued Contributor

Is your Jamf on-prem or cloud?

straffin
New Contributor III

On-prem

junjishimazaki
Valued Contributor

Anything in the jamf server logs? Maybe restart the tomcat server?

Nothing in the JSS logs or the Tomcat logs except for the 404 response to the query. The server's responding fine to every other API request, so it's got to be the records that are the problem. (Lots of API activity on our server, so we can't just restart Tomcat on a whim...)

junjishimazaki
Valued Contributor

I'm not saying to restart your tomcat server now but your options are pretty limited so. Either restart your tomcat server or repair do a tables repair on MySQL