-
Notifications
You must be signed in to change notification settings - Fork 5k
Description
Search before asking
- I had searched in the issues and found no similar issues.
What happened
A NullPointerException will occur when task timeout alerts are configured.
[WI-0][TI-0] - 2025-12-23 16:14:15.280 INFO [MasterRpcServer-methodInvoker-5] o.a.d.s.m.e.WorkflowEventBus:[41] - Publish event: TaskRunningLifecycleEvent{task=s1, runtimeContext=null}
[WI-173][TI-0] - 2025-12-23 16:14:15.379 INFO [ds-workflow-eventbus-worker-8] o.a.d.s.m.e.t.l.h.AbstractTaskLifecycleEventHandler:[47] - Fired task s1 TaskRunningLifecycleEvent{task=s1, runtimeContext=null} with state RUNNING_EXECUTION
[WI-173][TI-0] - 2025-12-23 16:15:15.086 INFO [ds-workflow-eventbus-worker-14] o.a.d.s.m.e.t.l.h.TaskTimeoutLifecycleEventHandler:[67] - The task s1 TimeoutStrategy is WARN, try to send a timeout alert.
[WI-173][TI-0] - 2025-12-23 16:15:15.087 ERROR [ds-workflow-eventbus-worker-14] o.a.d.s.m.e.WorkflowEventBusFireWorker:[88] - Fire event failed for WorkflowExecuteRunnable: s1-20251223161414354
org.apache.dolphinscheduler.server.master.engine.exceptions.WorkflowEventFireException: Failed to fire event: TaskRetryEvent{task=s1, timeout=60007}
at org.apache.dolphinscheduler.server.master.engine.WorkflowEventBusFireWorker.doFireSingleWorkflowEventBus(WorkflowEventBusFireWorker.java:133)
at org.apache.dolphinscheduler.server.master.engine.WorkflowEventBusFireWorker.fireAllRegisteredEvent(WorkflowEventBusFireWorker.java:86)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
Caused by: java.lang.NullPointerException: null
at org.apache.dolphinscheduler.dao.AlertDao.sendTaskTimeoutAlert(AlertDao.java:250)
at org.apache.dolphinscheduler.service.alert.WorkflowAlertManager.sendTaskTimeoutAlert(WorkflowAlertManager.java:265)
at org.apache.dolphinscheduler.server.master.engine.task.lifecycle.handler.TaskTimeoutLifecycleEventHandler.doTaskTimeoutAlert(TaskTimeoutLifecycleEventHandler.java:94)
at org.apache.dolphinscheduler.server.master.engine.task.lifecycle.handler.TaskTimeoutLifecycleEventHandler.handle(TaskTimeoutLifecycleEventHandler.java:68)
at org.apache.dolphinscheduler.server.master.engine.task.lifecycle.handler.TaskTimeoutLifecycleEventHandler.handle(TaskTimeoutLifecycleEventHandler.java:38)
at org.apache.dolphinscheduler.server.master.engine.task.lifecycle.handler.AbstractTaskLifecycleEventHandler.handle(AbstractTaskLifecycleEventHandler.java:46)
at org.apache.dolphinscheduler.server.master.engine.task.lifecycle.handler.AbstractTaskLifecycleEventHandler.handle(AbstractTaskLifecycleEventHandler.java:32)
at org.apache.dolphinscheduler.server.master.engine.WorkflowEventBusFireWorker.doFireSingleEvent(WorkflowEventBusFireWorker.java:144)
at org.apache.dolphinscheduler.server.master.engine.WorkflowEventBusFireWorker.doFireSingleWorkflowEventBus(WorkflowEventBusFireWorker.java:122)
... 8 common frames omitted
What you expected to happen
After configuring task timeout, alert notifications can be sent normally.
How to reproduce
Select a timeout alert policy when creating a task.
Anything else
No response
Version
dev
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct