diff --git a/core/src/main/java/org/apache/oozie/action/ssh/SshActionExecutor.java b/core/src/main/java/org/apache/oozie/action/ssh/SshActionExecutor.java index 4e418cb661..4b85c3a6e1 100644 --- a/core/src/main/java/org/apache/oozie/action/ssh/SshActionExecutor.java +++ b/core/src/main/java/org/apache/oozie/action/ssh/SshActionExecutor.java @@ -220,7 +220,7 @@ private String getActionErrorMessage(Context context, WorkflowAction action) thr @Override public void kill(Context context, WorkflowAction action) throws ActionExecutorException { LOG.info("Killing action"); - String command = "ssh " + action.getTrackerUri() + " kill -KILL " + action.getExternalId(); + String command = "ssh " + action.getTrackerUri() + " kill -- -$(ps -o pgid= " + action.getExternalId() + " | grep -o [0-9]*)"; int returnValue = getReturnValue(command); if (returnValue != 0) { throw new ActionExecutorException(ActionExecutorException.ErrorType.ERROR, "FAILED_TO_KILL", XLog.format(