mannconsulting / Jamf-Client-Communications-Doctor

Daemon that sets a TTL on Jamf Policies and EAs to ensure clients communicate with Jamf
https://mann.com/jamf/doctor
13 stars 3 forks source link

Doctor does not fix this #2

Open mat-griffin opened 5 months ago

mat-griffin commented 5 months ago

We have deployed Jamf Doctor However we are still seeing quite a few Macs in our fleet not checking-in or doing a recon. When we check the jamf logs the lines below are seen until we kill the Jamf binary and force it to restart. Jamf Doctor does pick up on this issue. Seems the Jamf binary is still running so I guess why its not picked up but as you can see from the extract form the logs there is an issue with it.

Is there anyway for Jamf doctor to kill the binary when this error is shown?

Fri May 13 13:43:21 C02FD2JNXXXX jamf[51423]: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.jamf.management.daemon.binary was invalidated from this process." UserInfo={NSDebugDescription=The connection to service named com.jamf.management.daemon.binary was invalidated from this process.} Fri May 13 14:01:54 C02FD2JNXXXX jamf[58397]: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.jamf.management.daemon.binary was invalidated from this process." UserInfo={NSDebugDescription=The connection to service named com.jamf.management.daemon.binary was invalidated from this process.} Fri May 13 14:20:37 C02FD2JNXXXX jamf[65359]: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.jamf.management.daemon.binary was invalidated from this process." UserInfo={NSDebugDescription=The connection to service named com.jamf.management.daemon.binary was invalidated from this process.}

isaacatmann commented 4 months ago

Hi @mat-griffin - Question on this, is there a detection or fix that you know for this issue? We haven't seen it in the wild but some info on Jamf nation seems to imply there is an issue with a config file:

From a post in: https://community.jamf.com/t5/jamf-pro/any-installation-from-self-service-stuck-on-executing-forever-is/m-p/133568

Check out the contents of /Library/LaunchDaemons/com.jamf.management.daemon.plist MachServices should look like this:

    MachServices =     {
        "com.jamf.management.daemon.aad" = 1;
        "com.jamf.management.daemon.binary" = 1;
        "com.jamf.management.daemon.selfservice" = 1;
        "com.jamf.management.daemon.service" = 1;
    };

If it doesn't, unload the launchdaemon, (sudo launchctl unload /Library/LaunchDaemons/com.jamf.management.daemon.plist) and modify it so it looks like that (likely issue is that com.jamf.management.daemon.binary is missing and com.jamf.management.daemon.agent is in its place). Next load the LaunchDaemon again (sudo launchctl load /Library/LaunchDaemons/com.jamf.management.daemon.plist) and Self Service should work.