Hello all,
I currently have a support call open with JAMF about this and thought I'd put the feelers out to see if anyone else has encountered this problem.
Essentially, after a period of time, part of our iMac fleet started falling out of touch with the JSS. I noticed that 'Inventory update' and the 'JAMF recon' commands were failing with an 'unknown error'. Further inspection of affected devices show that there's been some recursive duplication of 'services' and the device breaks connection with the server.
To give you an idea, normally a device has around 300-400 services listed. I have devices with between 15000-20000 at their last point of communication.
Curiously, running 'launchctl list' on affected device doesn't show the large list found on the JSS (maybe this isn't related). I haven't been able to catch a device as it's spiralling out of control.
Anyone encountered this issue before?
So far I've only witnessed it on Big Sur 11.4.0 - 11.6.1.
Currently have a metric butt-tonne of unique services like this:
com.apple.loginwindow.1902C8C2-2135-440E-9420-CB77D9773FB5 - etc
com.apple.security.agent.login.00000000-0000-0000-0000-0000000186A6 - etc
JAMF recon and inventory update failing - Unknown Error. Listed Services over 15000
Best answer by Qwheel
Cool thanks!
Further to @jbisgett, I did a similar thing.
Most lab devices should be getting startup/shutdown scheduling, but if for whatever reason the device is awake at 1am, it'll continue to be awake the following day also.
I run this on all lab devices daily with client side limitations. If it's awake in the middle of the night, it'll run the policy.
I run a restart because I questioned whether a shutdown would start the machine back up the next day (in my own mind, I imagine a manual shutdown ignores the start-up scheduling).
The delayed shutdown command is to allow the script to finish and submit an exit code 1 before restarting. I used exit 1 so I could see in the dashboard at a glance machines that were awake, and as you can sort the logs by date, you can see if it's the same old machines staying awake.
I also did a massive overhaul of config profiles.
I created a slew of 'Devices with X application' policies and assigned relative config profiles that way. I then went to the related app install policy and threw in a 'jamf policy -trigger recon' one-liner. So after installation, the profile comes down.
Another 'in my own mind' KEXTs etc need to be loaded in advance of application installation, so those are still going out in advance to devices that 'could' install affected apps if they choose to.
I haven't seen the issue in sometime, so I think a mixture of both things has resolved the problem - unless somebody stealth fixed it elsewhere.
#!/bin/bash
echo "Restarting device if still awake at silly oclock in the morning..."
echo "Restarting..."
sudo shutdown -r +4 &
echo "exit 1 to determine if there is a repeat offender..."
exit 1
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.

