{"record":{"id":"178e724f68b10e54","repo":"apache/dolphinscheduler","slug":"execute-zeppelintask-exception","errorCode":null,"errorMessage":"Execute ZeppelinTask exception","messagePattern":"Execute ZeppelinTask exception","errorType":"exception","errorClass":"TaskException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-task-plugin/dolphinscheduler-task-zeppelin/src/main/java/org/apache/dolphinscheduler/plugin/task/zeppelin/ZeppelinTask.java","lineNumber":172,"sourceCode":"            }\n\n            // Delete cloned note\n            if (productionNoteDirectory != null) {\n                this.zClient.deleteNote(noteId);\n            }\n            // add response to out var poll\n            addDefaultOutput(resultContent);\n            // setVarPool\n            taskExecutionContext.setVarPool(zeppelinParameters.getVarPool());\n            // Use noteId-paragraph-Id as app id\n            final int exitStatusCode = mapStatusToExitCode(status);\n            setAppIds(String.format(\"%s-%s\", noteId, paragraphId));\n            setExitStatusCode(exitStatusCode);\n            log.info(\"zeppelin task finished with results: {}\", resultContent);\n        } catch (Exception e) {\n            setExitStatusCode(TaskConstants.EXIT_CODE_FAILURE);\n            log.error(\"zeppelin task submit failed with error\", e);\n            throw new TaskException(\"Execute ZeppelinTask exception\");\n        }\n    }\n\n    @Override\n    public void submitApplication() throws TaskException {\n\n    }\n\n    @Override\n    public void trackApplicationStatus() throws TaskException {\n\n    }\n\n    /**\n     * create zeppelin client from zeppelin config\n     *\n     * @return ZeppelinClient\n     */","sourceCodeStart":154,"sourceCodeEnd":190,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-task-plugin/dolphinscheduler-task-zeppelin/src/main/java/org/apache/dolphinscheduler/plugin/task/zeppelin/ZeppelinTask.java#L154-L190","documentation":"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).","triggerScenarios":"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.","commonSituations":"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.","solutions":["Check the log line 'zeppelin task submit failed with error' for the root cause (connection refused, 401/404, paragraph status ERROR)","Verify the Zeppelin datasource connection params (URL, auth) and that the server is reachable from the worker","Confirm noteId and paragraphId exist in Zeppelin and the paragraph runs successfully in the Zeppelin UI","Increase polling timeout for long-running paragraphs and check Zeppelin server logs for the paragraph execution error"],"exampleFix":"// before\n// Zeppelin datasource URL: http://zeppelin-internal:80 (wrong port)\n// after\n// Zeppelin datasource URL: http://zeppelin-internal:8080 with valid credentials","handlingStrategy":"try-catch","validationCode":"// pre-flight: check Zeppelin server health and note existence\nHttpResponse<String> r = client.send(HttpRequest.newBuilder(URI.create(zeppelinUrl + \"/api/notebook/\" + noteId)).build(), HttpResponse.BodyHandlers.ofString());\nif (r.statusCode() != 200) throw new IllegalStateException(\"Zeppelin note not reachable: \" + r.statusCode());","typeGuard":null,"tryCatchPattern":"try {\n    zeppelinTask.handle();\n} catch (TaskException e) {\n    // root cause is only in the log line 'zeppelin task submit failed with error';\n    // check connectivity/auth/paragraph status there before retrying\n}","preventionTips":["Verify Zeppelin datasource URL and credentials from the worker host","Confirm noteId/paragraphId and that the paragraph succeeds in Zeppelin UI","Increase polling timeout for long paragraphs; alert on Zeppelin server downtime"],"tags":["zeppelin","http","task-execution"],"backgroundTag":"upstream-api-error","analyzedSha":"02eac45a1b6676e639fcbfb4be2243de5771b05d","analyzedAt":"2026-09-06T17:43:00.555Z","contentChangedAt":"2026-09-06T17:43:00.555Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}