Skip to main content
Question

Multiple computers return 404 when selected


Forum|alt.badge.img+4

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:

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

junjishimazaki
Forum|alt.badge.img+10
  • New Contributor
  • 423 replies
  • November 16, 2021

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.


Forum|alt.badge.img+4
  • Author
  • Contributor
  • 23 replies
  • November 16, 2021
junjishimazaki wrote:

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
Forum|alt.badge.img+10
  • New Contributor
  • 423 replies
  • November 16, 2021

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?


Forum|alt.badge.img+4
  • Author
  • Contributor
  • 23 replies
  • November 16, 2021
junjishimazaki wrote:

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
Forum|alt.badge.img+10
  • New Contributor
  • 423 replies
  • November 16, 2021

Is your Jamf on-prem or cloud?


Forum|alt.badge.img+4
  • Author
  • Contributor
  • 23 replies
  • November 16, 2021

On-prem


junjishimazaki
Forum|alt.badge.img+10
  • New Contributor
  • 423 replies
  • November 16, 2021

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


Forum|alt.badge.img+4
  • Author
  • Contributor
  • 23 replies
  • November 16, 2021
junjishimazaki wrote:

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
Forum|alt.badge.img+10
  • New Contributor
  • 423 replies
  • November 16, 2021

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


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings