apache/dolphinscheduler · warning · TaskException
The current Jupyter task has been interrupted
Error message
The current Jupyter task has been interrupted
What it means
JupyterTask.handle() catches InterruptedException while waiting on the jupyter/conda shell process and rethrows it as TaskException 'The current Jupyter task has been interrupted'. This means the worker or server cancelled or killed the task's wait (kill request, worker shutdown, timeout) rather than the notebook itself failing.
Source
Thrown at dolphinscheduler-task-plugin/dolphinscheduler-task-jupyter/src/main/java/org/apache/dolphinscheduler/plugin/task/jupyter/JupyterTask.java:97
}
// todo split handle to submit and track
@Override
public void handle(TaskCallBack taskCallBack) throws TaskException {
try {
IShellInterceptorBuilder<?, ?> shellActuatorBuilder = ShellInterceptorBuilderFactory.newBuilder()
.properties(ParameterUtils.convert(taskRequest.getPrepareParamsMap()))
.appendScript(buildCommand());
TaskResponse response = shellCommandExecutor.run(shellActuatorBuilder, taskCallBack);
setExitStatusCode(response.getExitStatusCode());
setAppIds(String.join(TaskConstants.COMMA, getApplicationIds()));
setProcessId(response.getProcessId());
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
log.error("The current Jupyter task has been interrupted", e);
setExitStatusCode(TaskConstants.EXIT_CODE_FAILURE);
throw new TaskException("The current Jupyter task has been interrupted", e);
} catch (Exception e) {
log.error("jupyter task execution failure", e);
exitStatusCode = -1;
throw new TaskException("Execute jupyter task failed", e);
}
}
@Override
public void submitApplication() throws TaskException {
}
@Override
public void trackApplicationStatus() throws TaskException {
}
/**View on GitHub (pinned to 02eac45a1b)
Solutions
- Nothing is wrong with the notebook itself; re-run the task if the kill was unintentional.
- Check worker logs for the initiating kill/shutdown event to find who interrupted the task.
- If timeouts are the cause, increase task timeout settings or reduce notebook runtime.
- Ensure jupyter checkpoints/output so interrupted runs can resume instead of restarting from scratch.
Example fix
null
Defensive patterns
Strategy: try-catch
Type guard
static boolean wasInterrupted(TaskException e) {
return e.getCause() instanceof InterruptedException;
} Try / catch
try {
jupyterTask.handle(callBack);
} catch (TaskException e) {
if (e.getCause() instanceof InterruptedException) {
log.warn("jupyter task was cancelled/interrupted, not a notebook failure");
Thread.currentThread().interrupt();
} else {
throw e;
}
} Prevention
- Set realistic task timeouts so watchdogs don't interrupt long notebooks.
- Avoid killing/restarting workers while notebook workflows run; drain gracefully.
- Persist jupyter checkpoints to resume after interruption.
- Keep task run IDs handy to correlate kills with UI actions.
When it happens
Trigger: The thread executing shellCommandExecutor.run (waiting for the jupyter nbconvert/jupyter process) receives an interrupt — task kill from UI, worker graceful shutdown, or watchdog timeout — while the process is still running.
Common situations: User clicks 'kill' on a long-running notebook workflow; worker restarts or is drained; process wait interrupted during deployment restart; thread pool shutdown during maintenance.
Related errors
- The current Shell task has been interrupted
- EMR Serverless task tracking interrupted
- DELETE_ENVIRONMENT_ERROR
- DELETE_SCHEDULE_BY_ID_ERROR
- 10165
AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06).
Data as JSON: /api/errors/972a1161a09fbbfb.
Report an issue: GitHub.