dolphinscheduler icon indicating copy to clipboard operation
dolphinscheduler copied to clipboard

[Bug] executor process instance error

Open Heltman opened this issue 6 years ago • 6 comments

I get a error when I want to recovery wrong task image

version: 1.2.1

What I do: When a task stuck,I kill workflow in web ui, bug it's no use,so I restart ds, then I can not rerun any workflow...

Heltman avatar Sep 08 '20 08:09 Heltman

api-server.log:

[ERROR] 2020-09-08 16:52:12.087 org.apache.dolphinscheduler.api.controller.ExecutorController:[156] - execute process instance error java.lang.NullPointerException: null at org.apache.dolphinscheduler.dao.ProcessDao.verifyIsNeedCreateCommand(ProcessDao.java:223) at org.apache.dolphinscheduler.dao.ProcessDao$$FastClassBySpringCGLIB$$ee5e71ba.invoke() at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:684) at org.apache.dolphinscheduler.dao.ProcessDao$$EnhancerBySpringCGLIB$$f01aea7c.verifyIsNeedCreateCommand() at org.apache.dolphinscheduler.api.service.ExecutorService.insertCommand(ExecutorService.java:348) at org.apache.dolphinscheduler.api.service.ExecutorService.execute(ExecutorService.java:220) at org.apache.dolphinscheduler.api.controller.ExecutorController.execute(ExecutorController.java:153) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498)

Heltman avatar Sep 08 '20 08:09 Heltman

master.log

[ERROR] 2020-09-08 16:43:02.346 org.apache.dolphinscheduler.server.master.runner.MasterExecThread:[174] - master exec thread exception: null java.lang.NullPointerException: null at org.apache.dolphinscheduler.dao.utils.BeanContext.getBean(BeanContext.java:56) at org.apache.dolphinscheduler.server.master.runner.MasterBaseTaskExecThread.(MasterBaseTaskExecThread.java:84) at org.apache.dolphinscheduler.server.master.runner.MasterTaskExecThread.(MasterTaskExecThread.java:52) at org.apache.dolphinscheduler.server.master.runner.MasterExecThread.submitTaskExec(MasterExecThread.java:374) at org.apache.dolphinscheduler.server.master.runner.MasterExecThread.submitStandByTask(MasterExecThread.java:979) at org.apache.dolphinscheduler.server.master.runner.MasterExecThread.runProcess(MasterExecThread.java:879) at org.apache.dolphinscheduler.server.master.runner.MasterExecThread.executeProcess(MasterExecThread.java:192) at org.apache.dolphinscheduler.server.master.runner.MasterExecThread.run(MasterExecThread.java:171) 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:748) [ERROR] 2020-09-08 16:43:02.347 org.apache.dolphinscheduler.server.master.runner.MasterExecThread:[175] - process execute failed, process id:1728

Heltman avatar Sep 08 '20 09:09 Heltman

I check the code, and found a bug: image this is "ProcessInstanceId",but in database,table "t_ds_command" has a wrong data: image so tmpObj is "processInstanceId": image so I got a NullPointerException,Idelete the wrong data, and now it is success!

t_ds_command中的脏数据包含的processInstanceId为小写开头,但是代码里面 却是大写开头的,这是导致空指针的原因,至于脏数据产生的原因,猜测可能是写入mysql时产生了锁,该条数据无法被删除,这也导致了整个ds不会再生成新的调度任务,我是通过重启解决了锁的问题,但是这个脏数据也就永远不会被删除了,而这个脏数据的大小写的问题,可能需要大佬来解释一下了

Heltman avatar Oct 13 '20 09:10 Heltman

+1 ,I come across the same problem

dataHunterAssassi avatar Nov 24 '20 01:11 dataHunterAssassi

+1 ,I come across the same problem

Is it also version 1.2.1?

CalvinKirs avatar Dec 02 '20 06:12 CalvinKirs

it is not dirty data. i notice that workflow state is 'failed', 'recovery from failed task' from web ui would set the "ProcessInstanceId" into params, i think there may be something error here. The key 'processInstanceId' is write for 'sub process'.

lenboo avatar Dec 07 '20 09:12 lenboo