error executing command

tcandela
Valued Contributor II

i took a look at a jamf.log on an enrolled mac and constantly see a line that says 'ERROR EXECUTING COMMAND' after a policy runs. What is happening or what is JAMF doing, what command is it trying to run?

seems to happen after every policy is run. The policy runs successfully but don't understand the 'ERROR EXECUTING COMMAND'.

here is a sample

Error executing command: ( "/Library/Application Support/JAMF/tmp/D95EA33D-BA13-442B-8304-AA9FD151B260"
)

11 REPLIES 11

daniel_ross
Contributor III

Hate to bump an old thread but did you ever figure this out?

tcandela
Valued Contributor II

@daniel_ross no one ever responded with an idea of what the issue could be.

I'll take a look again in the jamf.logs to see if the error still occurs.  I haven't looked in awhile since it seemes to not be an issue. 

Are you getting,  seeing the same error?

Your post hit the top of Google Search results when we were searching for something identical to this we have been seeing but its random and not always consistent.  I'll let you know when and how it happens again.  We have a machine in our Sandbox that we'll run through each item one at a time to see what happens.

nberanger
Contributor

Huh... I am seeing similar errors in my logs too:

 

jamf[9629]: Error executing command: (
"/Library/Application Support/JAMF/tmp/F4E1FF32-419B-43D9-BCB5-5C5CF63F97E6"
)

 

jamf[10875]: Error executing command: (
"/Library/Application Support/JAMF/tmp/B7C6137E-4403-4EE7-B268-47AA9D7DA61E"
)

 

jonw
Contributor

Anyone get to the bottom of this?  I'm just noticing it on a few workstations (possibly M1 related?).

Despite the logged error, the policy appears to complete, I don't receive a typical 'policy failed' notification, and the tmp directory is empty.  Maybe just a Jamf bug?

tcandela
Valued Contributor II

@jonw @nberanger @daniel_ross 

I haven't checked in a while but I'll check tomorrow.  More than likely it's probably still happening.  It doesn't seem to be an issue but it would be great to know what the error is

tcandela
Valued Contributor II

@jonw @nberanger @daniel_ross   Yep, i just checked my jamf.log and no matter what policy runs there is always that ERROR EXECUTING COMMAND : ****************** afterwards

nberanger
Contributor

This may be a coincidence but I've removed EAs and policies that were calling on Python. Since doing that, I am not seeing the errors showing in my log anymore.

jonw
Contributor

 @daniel_ross @tcandela I think @nberanger nailed it (at least in my situation)! 

I found a lingering Python script in an EA that I somehow missed when prepping for macOS 12.  Removed it and all is well again.  Many thanks for the reminder!

nberanger
Contributor

Should have added, this script was super helpful in cleaning up Python from our Jamf environment:

https://github.com/laurentpertois/Search-Scripts-In-Jamf/blob/main/searchScriptsAndEAsInJamf.sh

 

Randydid
Contributor II

Hi All!

 

I was having the same error and my Macs were not completing recon commands due to the EA I had running that checked for the version of Chrome and reported Current or Old. It was written in Python and when recon ran it generated the same error in the logs: https://github.com/hjuutilainen/adminscripts/blob/master/chrome-enable-autoupdates.py I have changed the EA to this and recon commands are completing again and it has solved a ton of seemingly random issues for me. 

#!/bin/sh

if [ ! -f "/Applications/Google Chrome.app/Contents/Info.plist" ] ; then
echo "<result>Chrome isn't installed</result>"
exit 0
fi

INSTALLEDVERSION=$( defaults read "/Applications/Google Chrome.app/Contents/Info.plist" CFBundleShortVersionString )
CURRENTVERSION=$( curl -s https://omahaproxy.appspot.com/history | awk -F',' '/mac,stable/{print $3; exit}' )

if [[ "$INSTALLEDVERSION" == "$CURRENTVERSION" ]]; then

echo "<result>latest - $CURRENTVERSION</result>"

else

echo "<result>old</result>"

fi