JamfProScripts icon indicating copy to clipboard operation
JamfProScripts copied to clipboard

reboot_scheduler exit error: shutdown: can't detach from console Error running script: return code was 255.

Open krispayne opened this issue 9 years ago • 4 comments

When using reboot_scheduler in a policy in Casper, the following error sometimes is returned:

Executing Policy Weekly Software Updates (Creative)
Running script reboot_scheduler.sh...
Script exit code: 255
Script result: Start timestamp: Fri Feb 19 09:58:22 PST 2016
A user "blee" is logged in on this Mac. Proceeding...
No pre-assigned deferral was set for the script. Prompting user for input...
2016-02-19 09:58:50.723 cocoaDialog[10231:92956] Couldn't contact spell checker for U.S. English
User chose a 5 minute deferral for reboot
reboot delay is 5
Beginning 5 minute reboot delay
shutdown: [pid 10548]
Shutdown at Fri Feb 19 10:03:57 2016.
shutdown: can't detach from console
Error running script: return code was 255.
Running command softwareupdate -i -a...
Result of command:
No updates are available.
Software Update Tool
Copyright 2002-2012 Apple Inc.

Finding available software
Running Recon...

Definitely running CD 3.0-beta 7. Is this an error with CD or with the script?

krispayne avatar Feb 19 '16 18:02 krispayne

Here is output from another machine on a separate policy:

Executing Policy Weekly Software Updates (Home Office)
Running script reboot_scheduler.sh...
Script exit code: 255
Script result: Start timestamp: Fri Feb 19 10:17:16 PST 2016
A user "user" is logged in on this Mac. Proceeding...
No pre-assigned deferral was set for the script. Prompting user for input...
User chose a 5 minute deferral for reboot
reboot delay is 5
Beginning 5 minute reboot delay
shutdown: [pid 34849]
Shutdown at Fri Feb 19 10:23:32 2016.
shutdown: can't detach from console
Error running script: return code was 255.
Running command softwareupdate -i -a...
Result of command:
No updates are available.
Software Update Tool
Copyright 2002-2012 Apple Inc.

Finding available software
Running Recon...

krispayne avatar Feb 19 '16 18:02 krispayne

Hi @krispayne. Somehow I missed this issue when posted, but am seeing it now. The spell checker error in CD is something I've seen on occasion, but not clear on what causes that. It may just be its age showing. When I've seen it, its mostly been an inconsequential error, but the main issue is the exit 255 code (error: shutdown: can't detach from console) when the script is run. May I ask what OS this is running against? I'll admit I haven't gotten around to testing this against El Capitan, so I'm wondering if this is being run against 10.11.x systems when you see this error?

I did a quick look and actually pulled up this older JAMFNation post which mentions a similar error. I'm not sure yet what the relationship is https://jamfnation.jamfsoftware.com/discussion.html?id=5578#responseChild39431

mm2270 avatar Mar 01 '16 17:03 mm2270

@mm2270 I took a look at one of the recent failures in the casper logs and saw it was on 10.10.5, 10.11.3, or 10.9.5.

Another error I received for 10.11.3:

2016-03-08 01:16:16.629 cocoaDialog[6724:418849] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data

krispayne avatar Mar 10 '16 20:03 krispayne

JSS is 9.82 if that makes a difference

krispayne avatar Mar 10 '16 20:03 krispayne