Giter Site home page Giter Site logo

[Bug] [dolphinscheduler-task-java] 3.2.1-release version Java Task not working, need remove the ExecutePath and only use the absolute path in shell script about dolphinscheduler HOT 2 CLOSED

lanxing2 avatar lanxing2 commented on August 16, 2024
[Bug] [dolphinscheduler-task-java] 3.2.1-release version Java Task not working, need remove the ExecutePath and only use the absolute path in shell script

from dolphinscheduler.

Comments (2)

ruanwenjun avatar ruanwenjun commented on August 16, 2024

duplicated with #15902

from dolphinscheduler.

lanxing2 avatar lanxing2 commented on August 16, 2024

I deployed the code and did some test for Java Task in Jar Model.
Current Code will fail and if I remove ".append(taskRequest.getExecutePath()).append(FOLDER_SEPERATOR)", the task will succeed.
The following content are logs on my cluster

Current code


[INFO] 2024-06-28 16:13:02.398 +0800 - #!/bin/bash
BASEDIR=$(cd dirname $0; pwd)
cd $BASEDIR
${JAVA_HOME}/bin/java -classpath .:/tmp/dolphinscheduler/exec/process/dolphinscheduler/13289909089664/14095886576288_4/146/155:/tmp/dolphinscheduler/exec/process/dolphinscheduler/13289909089664/14095886576288_4/146/155/libs/jnpf-dolphin-java-task-print-args.jar -jar /tmp/dolphinscheduler/exec/process/dolphinscheduler/13289909089664/14095886576288_4/146/155//tmp/dolphinscheduler/exec/process/dolphinscheduler/13289909089664/14095886576288_4/146/155/libs/jnpf-dolphin-java-task-print-args.jar 123 456 /tmp/user
[INFO] 2024-06-28 16:13:02.398 +0800 - ****************************** Script Content *****************************************************************
[INFO] 2024-06-28 16:13:02.399 +0800 - Executing shell command : sudo -u dolphinscheduler -i /tmp/dolphinscheduler/exec/process/dolphinscheduler/13289909089664/14095886576288_4/146/155/146_155.sh
[INFO] 2024-06-28 16:13:02.402 +0800 - process start, process id is: 3605242
[INFO] 2024-06-28 16:13:03.402 +0800 - ->
Error: Unable to access jarfile /tmp/dolphinscheduler/exec/process/dolphinscheduler/13289909089664/14095886576288_4/146/155//tmp/dolphinscheduler/exec/process/dolphinscheduler/13289909089664/14095886576288_4/146/155/libs/jnpf-dolphin-java-task-print-args.jar
[INFO] 2024-06-28 16:13:03.403 +0800 - process has exited. execute path:/tmp/dolphinscheduler/exec/process/dolphinscheduler/13289909089664/14095886576288_4/146/155, processId:3605242 ,exitStatusCode:1 ,processWaitForStatus:true ,processExitValue:1

After Remove .append(taskRequest.getExecutePath()).append(FOLDER_SEPERATOR)


[INFO] 2024-06-28 16:24:01.829 +0800 - #!/bin/bash
BASEDIR=$(cd dirname $0; pwd)
cd $BASEDIR
${JAVA_HOME}/bin/java -classpath .:/tmp/dolphinscheduler/exec/process/dolphinscheduler/13289909089664/14095886576288_4/148/157:/tmp/dolphinscheduler/exec/process/dolphinscheduler/13289909089664/14095886576288_4/148/157/libs/jnpf-dolphin-java-task-print-args.jar -jar /tmp/dolphinscheduler/exec/process/dolphinscheduler/13289909089664/14095886576288_4/148/157/libs/jnpf-dolphin-java-task-print-args.jar 123 456 /tmp/user
[INFO] 2024-06-28 16:24:01.829 +0800 - ****************************** Script Content *****************************************************************
[INFO] 2024-06-28 16:24:01.830 +0800 - Executing shell command : sudo -u dolphinscheduler -i /tmp/dolphinscheduler/exec/process/dolphinscheduler/13289909089664/14095886576288_4/148/157/148_157.sh
[INFO] 2024-06-28 16:24:01.838 +0800 - process start, process id is: 3607346
[INFO] 2024-06-28 16:24:02.839 +0800 - ->
Run jnpf dolphin scheduler java sample task
args 0 is 123
args 1 is 456
args 2 is /usr/root/local
[INFO] 2024-06-28 16:24:02.840 +0800 - process has exited. execute path:/tmp/dolphinscheduler/exec/process/dolphinscheduler/13289909089664/14095886576288_4/148/157, processId:3607346 ,exitStatusCode:0 ,processWaitForStatus:true ,processExitValue:0

from dolphinscheduler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.