apache/dolphinscheduler · error · TaskException

Execute ZeppelinTask exception

Error message

Execute ZeppelinTask exception

What it means

ZeppelinTask.handle() submits the paragraph and polls for its result via the Zeppelin client. Any exception during submission, polling, or result parsing sets exit status to FAILURE and rethrows as a TaskException with this message (original cause logged, not attached).

Source

Thrown at dolphinscheduler-task-plugin/dolphinscheduler-task-zeppelin/src/main/java/org/apache/dolphinscheduler/plugin/task/zeppelin/ZeppelinTask.java:172

            }

            // Delete cloned note
            if (productionNoteDirectory != null) {
                this.zClient.deleteNote(noteId);
            }
            // add response to out var poll
            addDefaultOutput(resultContent);
            // setVarPool
            taskExecutionContext.setVarPool(zeppelinParameters.getVarPool());
            // Use noteId-paragraph-Id as app id
            final int exitStatusCode = mapStatusToExitCode(status);
            setAppIds(String.format("%s-%s", noteId, paragraphId));
            setExitStatusCode(exitStatusCode);
            log.info("zeppelin task finished with results: {}", resultContent);
        } catch (Exception e) {
            setExitStatusCode(TaskConstants.EXIT_CODE_FAILURE);
            log.error("zeppelin task submit failed with error", e);
            throw new TaskException("Execute ZeppelinTask exception");
        }
    }

    @Override
    public void submitApplication() throws TaskException {

    }

    @Override
    public void trackApplicationStatus() throws TaskException {

    }

    /**
     * create zeppelin client from zeppelin config
     *
     * @return ZeppelinClient
     */

View on GitHub (pinned to 02eac45a1b)

Solutions

  1. Check the log line 'zeppelin task submit failed with error' for the root cause (connection refused, 401/404, paragraph status ERROR)
  2. Verify the Zeppelin datasource connection params (URL, auth) and that the server is reachable from the worker
  3. Confirm noteId and paragraphId exist in Zeppelin and the paragraph runs successfully in the Zeppelin UI
  4. Increase polling timeout for long-running paragraphs and check Zeppelin server logs for the paragraph execution error

Example fix

// before
// Zeppelin datasource URL: http://zeppelin-internal:80 (wrong port)
// after
// Zeppelin datasource URL: http://zeppelin-internal:8080 with valid credentials
Defensive patterns

Strategy: try-catch

Validate before calling

// pre-flight: check Zeppelin server health and note existence
HttpResponse<String> r = client.send(HttpRequest.newBuilder(URI.create(zeppelinUrl + "/api/notebook/" + noteId)).build(), HttpResponse.BodyHandlers.ofString());
if (r.statusCode() != 200) throw new IllegalStateException("Zeppelin note not reachable: " + r.statusCode());

Try / catch

try {
    zeppelinTask.handle();
} catch (TaskException e) {
    // root cause is only in the log line 'zeppelin task submit failed with error';
    // check connectivity/auth/paragraph status there before retrying
}

Prevention

When it happens

Trigger: Zeppelin server unreachable/auth failure, noteId or paragraphId not found, paragraph execution fails or errors in Zeppelin, polling timeout, or malformed result content from the client API.

Common situations: Zeppelin server down or URL/port wrong in the datasource; wrong noteId/paragraphId; Zeppelin authentication credentials invalid; paragraph itself throws in Zeppelin; network interruption during long paragraph runs.

Related errors


AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06). Data as JSON: /api/errors/178e724f68b10e54. Report an issue: GitHub.