apache / dolphinscheduler-sdk-python

Apache DolphinScheduler Python API, aka PyDolphinscheduler.
https://dolphinscheduler.apache.org/python/main
Apache License 2.0
52 stars 19 forks source link

py4j.protocol.Py4JJavaError: An error occurred while calling t.createOrUpdateWorkflow #147

Open DanBui1984 opened 4 months ago

DanBui1984 commented 4 months ago

apache-dolphinscheduler-3.2.1 pydophinscheduler version: 4.0.4

<root@testvm01:~/pydolphinscheduler# python3 /opt/tutorial.py Auth token is default token, highly recommend add a token in production, especially you deploy in public network. /usr/local/lib/python3.10/dist-packages/pydolphinscheduler/java_gateway.py:324: UserWarning: Using unmatched version of pydolphinscheduler (version 4.0.4) and Java gateway (version 3.2.1) may cause errors. We strongly recommend you to find the matched version (check: https://pypi.org/project/apache-dolphinscheduler) gateway = GatewayEntryPoint() Traceback (most recent call last): File "/opt/tutorial.py", line 81, in workflow.run() File "/usr/local/lib/python3.10/dist-packages/pydolphinscheduler/core/workflow.py", line 395, in run self.submit() File "/usr/local/lib/python3.10/dist-packages/pydolphinscheduler/core/workflow.py", line 439, in submit self._workflow_code = gateway.create_or_update_workflow( File "/usr/local/lib/python3.10/dist-packages/pydolphinscheduler/java_gateway.py", line 281, in create_or_update_workflow return self.gateway.entry_point.createOrUpdateWorkflow( File "/usr/local/lib/python3.10/dist-packages/py4j/java_gateway.py", line 1322, in call return_value = get_return_value( File "/usr/local/lib/python3.10/dist-packages/py4j/protocol.py", line 326, in get_return_value raise Py4JJavaError( py4j.protocol.Py4JJavaError: An error occurred while calling t.createOrUpdateWorkflow. : ServiceException(code=10001) at org.apache.dolphinscheduler.api.service.impl.ProcessDefinitionServiceImpl.generateTaskRelationList(ProcessDefinitionServiceImpl.java:491) at org.apache.dolphinscheduler.api.service.impl.ProcessDefinitionServiceImpl.createProcessDefinition(ProcessDefinitionServiceImpl.java:299) at org.apache.dolphinscheduler.api.service.impl.ProcessDefinitionServiceImpl$$FastClassBySpringCGLIB$$e8e34ed9.invoke() at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708) at org.apache.dolphinscheduler.api.service.impl.ProcessDefinitionServiceImpl$$EnhancerBySpringCGLIB$$42d10b1f.createProcessDefinition() at org.apache.dolphinscheduler.api.python.PythonGateway.createOrUpdateWorkflow(PythonGateway.java:274) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244) at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357) at py4j.Gateway.invoke(Gateway.java:282) at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132) at py4j.commands.CallCommand.execute(CallCommand.java:79) at py4j.GatewayConnection.run(GatewayConnection.java:238) at java.base/java.lang.Thread.run(Thread.java:829)

DanBui1984 commented 4 months ago

@zhongjiajie if you could please help me

DanBui1984 commented 4 months ago

oot@testvm01:/opt/apache-dolphinscheduler# pydolphinscheduler version Auth token is default token, highly recommend add a token in production, especially you deploy in public network. /usr/local/lib/python3.10/dist-packages/pydolphinscheduler/java_gateway.py:324: UserWarning: Using unmatched version of pydolphinscheduler (version 4.0.4) and Java gateway (version 3.2.0) may cause errors. We strongly recommend you to find the matched version (check: https://pypi.org/project/apache-dolphinscheduler) gateway = GatewayEntryPoint() 4.0.4

zhongjiajie commented 4 months ago

hi @DanBui1984 , it is because we do not release the latest version of pydolphinscheduler, could you try https://github.com/apache/dolphinscheduler-sdk-python/issues/119#issuecomment-1825194665 and install from source code, and test whether it works or not?