Script runs fine on machine, fails as a policy

boberito
Valued Contributor

I'm probably missing something. I'm trying to implement some of the scripts hosted here on the JAMF Nation board for keeping Adobe Reader, Chrome, and Google Earth up to date.

If I run the script on a computer, I have zero problem. It executes perfectly. Creates a log file like it's supposed to, updates or doesn't update the app.

If I set up a policy and have it run at check in I get

CA019 rgendler 10 minutes ago Failed Executing Policy Chrome Install/Update

No log file created, no feedback, nothing. Am I missing something?

1 ACCEPTED SOLUTION

tpayton1
New Contributor

Was able to figure out our issue, and it might be the same for you. Something changed between 9.81 and 9.92 with how it handles script titles. Our scripts that started failing had '/' in the title. Removing the '/' fixed it. I also noticed that policies that worked would have the output

Running script <script name>

The policies that were failing never even had that output generated.

I would try removing the '/' in the title of the script you are adding to the Policy.

View solution in original post

16 REPLIES 16

bwiessner
Contributor II

How are you running the script when its not in a policy ? Testing it locally as admin or root?

Can you post some of the script to look at so we can see it?

tpayton1
New Contributor

Just wanted to comment on this as well. We have also noticed this exact same issue with all of our scripts after upgrading to 9.92. Scripts were previously running fine before the upgrade. Even tried creating brand new policies. No exit code, log, or anything. It appears as though the script is never actually executed / called on the machines. We are opening up a support ticket with JAMF concerning it. Anybody else running 9.92 and experiencing any issues with scripts in policies not executing?

boberito
Valued Contributor

These are scripts posted on JAMF Nation - Adobe Acrobat Installer/Updater - Chrome Installer/Updater - Google Earth Installer/Updater

I can copy/paste the scripts if you want.

The scripts are running at Reoccurring Check in set to run once a month. Nothing usual about them. It succeeds on some, but just gives that non-feedback on the others.

We were on 9.82, now 9.92 with same results.

PatrickD
Contributor II

I have recently had an issue with one of my own scripts where it was working fine on 9.81 however after upgrading to 9.91 the script would (key word here) REPORT as failed. The script would execute correctly however would exit with code 1 and the JSS would see that as a fail.

So my question would be is the script failing to do what it is meant to or is the script executing correctly and the JSS is just reporting that it has failed?

Cheers,
Pat

boberito
Valued Contributor

I wasn't sure the answer to that question. But just tested it out. And it is not executing correctly. It seems not a thing is happening at all on the client computer...no log file created or application installed

boberito
Valued Contributor

To add I decided to try with a custom event and call the policy from the terminal jamf command with verbose.

CA019:~ rgendler$ sudo jamf policy -event googleearth -verbose verbose: JAMF binary already symlinked verbose: JAMF agent already symlinked verbose: Checking for an existing instance of this application... Checking for policies triggered by "googleearth" for user "rgendler"... verbose: Checking for active ethernet connection... verbose: No active ethernet connection found... verbose: Removing any cached policies for this trigger. verbose: Parsing servers... verbose: Parsing Policy Google Earth install/Update (1335)... verbose: The Management Framework Settings are up to date. verbose: Found 1 matching policies. Executing Policy Google Earth install/Update Submitting log to https://casper.saes.org:8443/ verbose: Policy error code: 2100

tpayton1
New Contributor

Was able to figure out our issue, and it might be the same for you. Something changed between 9.81 and 9.92 with how it handles script titles. Our scripts that started failing had '/' in the title. Removing the '/' fixed it. I also noticed that policies that worked would have the output

Running script <script name>

The policies that were failing never even had that output generated.

I would try removing the '/' in the title of the script you are adding to the Policy.

boberito
Valued Contributor

@tpayton1 winner, winner, chicken dinner! That seems to have fixed it. So I went and removed slashes from EVERYWHERE in our JSS policies and scripts.

cgraves
New Contributor

Ahh! Been working with JAMF a week on this with no luck. So glad to have stumbled on this post. I had a "/" in script title as well. Removed and it's working. Finally!!! Thanks @tpayton1 for the info here.

asmolenski
New Contributor

I just spent a day troubleshooting this exact problem. 10.0.0 still chokes on a / in the script name. Thanks @tpayton1

grahamfw
New Contributor III

Yep, this fixed it for me. Thanks for posting this!

el2493
Contributor III

Have been banging my head against the desk trying to figure out why my script "Sierra/High Sierra Upgrader" wasn't launching and the policy wasn't showing any errors/feedback! Changed "/" to "-" and it worked!

clfrank
New Contributor

Same issue, had a script that was working and added Date/Time to it and naturally added that to the title. then They all were failing and had no idea why. The Script name and policy name had a / in the title and jamf/apple can't handle that.

siepmannm
New Contributor

@tpayton1 Thank you, thank you! I too had been banging my head against the wall trying to figure this out. Worked with Jamf support to try and resolve but we hadn't had any luck. So glad i stumbled across this post! Works like a charm now. Cheers!

apausesc
New Contributor

@tpayton1 You're a life saver!! I've beer racking my brain for 2 months :D. I owe you a 6 pack for this :D

joshd
New Contributor

Still an issue. Thanks for finding a fix, but I can't believe this is still a problem in Jamf Pro after 4 years.