KB Article #164487

Opsexit returns error message: Opsexit(E): OAC not found

Problem

When using opsexit, it returns the error message:

Opsexit(E): OAC not found

Resolution

This is the symptom of opsexit being used directly in a command line, outside of any Automator job.
To solve the issue, opsexit has to be run from inside an Automator job.

Opsexit needs an OAC to run correctly.
When a job is run, Automator created an OAC that is attached to the related PID, and added to the local environment variables of this job execution.
Opsexit will then get the OAC from the local environment variables of that job in order to terminate the appropriate job.