Error when running SUS Policy

jthurwood
New Contributor III

Im getting the following error when running my SUS policy on some Macs, has anyone seen this before? Mr Google can not find anything

Aug 26 17:22:18 gblo-cs03425 softwareupdate CLI[55394] <Error>: /usr/sbin/softwareupdate: XPC error in __60-[SUCommandLineTool _runSessionWithUpdates:skippingInstall:]_block_invoke (Error Domain=NSCocoaErrorDomain Code=4099 "Couldn’t communicate with a helper application." (The connection was invalidated from this process.) UserInfo=0x7fe4daf03990 {NSDebugDescription=The connection was invalidated from this process.})

14 REPLIES 14

jthurwood
New Contributor III

Event log from the policy:

/usr/sbin/jamf is version 8.73 Executing Policy Apple Software Update... Installing all available Software Updates... Result of Software Update: Software Update Tool
Copyright 2002-2012 Apple Inc.

Finding available software

Downloading Safari
Downloaded Safari
Installing Safari
Done with Safari
Done.
Aug 26 17:27:59 gblo-cs03290 softwareupdate CLI[24452] <Error>: /usr/sbin/softwareupdate: XPC error in __60-[SUCommandLineTool _runSessionWithUpdates:skippingInstall:]_block_invoke (Error Domain=NSCocoaErrorDomain Code=4099 "Couldn’t communicate with a helper application." (The connection was invalidated from this process.) UserInfo=0x7ffada603340 {NSDebugDescription=The connection was invalidated from this process.})

Running Recon...

You can access the full details of this log at:

jkuo
Contributor

I'm getting this exact same error. Didn't happen on one computer, but happened on another one.

jthurwood
New Contributor III

Ive got this happening on a bunch of machines. Ive had to temporarily disable my SUS policy until i can get it fixed.

jthurwood
New Contributor III

Has anyone else seen this?

jthurwood
New Contributor III

@jkuo Did you manage to find a fix?

jkuo
Contributor

@jthurwood - nope, not yet. It's intermittent for me, so I'm not sure what's going on.

Look
Valued Contributor III

We had a bunch of machines with something funky going on with the cache files that was causing this.
Try clearing the caches in terminal
sudo rm -rf /var/folders/*
Then restart and try the update again fixed it pretty much every time.
Just be careful running it because sudo rm -rf will blitz anything it's told to no questions asked so make sure you have it right. This was almost exclusively 10.9.2 and 10.9.3 machines for us, pretty sure there is some bug with the cache clearing etc...

Edit: Just remembered where it came from, this was originally the fix for the "unauthorized caller" errors a while back, but it worked for this type of issue as well.

spraguga
Contributor

@Look I'm seeing this issues as well.

Rather than having the SUS fail, remove /var/folders/*, restart, and run SUS again. Has anyone tested removing these folders using a "before" script in conjunction with the SUS Policy?

Thanks! ;)

Look
Valued Contributor III

When I was testing originally I found behaviour was somewhat unreliable if you didn't restart the machine. There are probably other references to the files that don't clear until you restart.

corbinmharris
Contributor

Running JSS 9.6.5 and seeing the this issue with the latest OS X security updates. Anyone have a specific fix?

RobertHammen
Valued Contributor II

Are you doing a force restart at the end of the policy (not "if an update requires it")?

corbinmharris
Contributor

Only "if an update requires"

gskibum
Contributor III

I'm seeing this with 5 different JSSs running 9.6.5. with a policy using softwareupdate -da to cache packages.

It seems Yosemite devices don't have this issue. Just Mavericks and older.

sudo rm -rf /var/folders/* followed up with a reboot didn't help.

Any solutions?

Edit: It isn't restricted to just the latest security update. On one system the security update along with the Safari update were waiting. I applied just the security update so only the Safari update was left. And the error remained when trying to cache again.

bpavlov
Honored Contributor

I'm seeing this too with 9.81 on OS X 10.11.4.
It really interferes with other packages getting installed. I have to do a killall softwareupdate to kill the process and packages installed via policies can then get installed successfully.

May  6 13:19:02 21703 softwareupdate CLI[22723]: /usr/sbin/softwareupdate: Service connection invalidated!
May  6 13:19:02 21703 softwareupdate CLI[22723]: /usr/sbin/softwareupdate: XPC error in __45-[SUCommandLineTool _refreshAvailableUpdates]_block_invoke (Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.softwareupdated was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.softwareupdated was invalidated.})

I understand why inventory runs the softwareupdate command because we have it set to collect it on recon/inventory collection. But how is it running that command that it's causing this error?