cscsyiku123 opened a new issue, #17238: URL: https://github.com/apache/dolphinscheduler/issues/17238
### Search before asking - [x] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened error stack is following as : [INFO] 2025-06-04 16:49:27.773 +0800 - *********************************************************************************************** [INFO] 2025-06-04 16:49:27.773 +0800 - ********************************* Load task instance plugin ********************************* [INFO] 2025-06-04 16:49:27.773 +0800 - *********************************************************************************************** [INFO] 2025-06-04 16:49:27.776 +0800 - Send task status RUNNING_EXECUTION master: 172.20.0.2:1234 [INFO] 2025-06-04 16:49:27.776 +0800 - TenantCode: root check successfully [INFO] 2025-06-04 16:49:27.777 +0800 - WorkflowInstanceExecDir: /tmp/dolphinscheduler/exec/process/root/142697674815584/142764968016224_12/5/15 check successfully [INFO] 2025-06-04 16:49:27.777 +0800 - Create TaskChannel: org.apache.dolphinscheduler.plugin.task.remoteshell.RemoteShellTaskChannel successfully [INFO] 2025-06-04 16:49:27.777 +0800 - Download resources successfully: ResourceContext(resourceItemMap={}) [INFO] 2025-06-04 16:49:27.778 +0800 - Download upstream files: [] successfully [INFO] 2025-06-04 16:49:27.778 +0800 - Task plugin instance: REMOTESHELL create successfully [INFO] 2025-06-04 16:49:27.778 +0800 - shell task params {"localParams":[],"rawScript":"pwd","resourceList":[],"type":"SSH","datasource":1} [INFO] 2025-06-04 16:49:27.780 +0800 - Success initialized task plugin instance successfully [INFO] 2025-06-04 16:49:27.780 +0800 - Set taskVarPool: null successfully [INFO] 2025-06-04 16:49:27.780 +0800 - *********************************************************************************************** [INFO] 2025-06-04 16:49:27.781 +0800 - ********************************* Execute task instance ************************************* [INFO] 2025-06-04 16:49:27.781 +0800 - *********************************************************************************************** [INFO] 2025-06-04 16:49:27.781 +0800 - raw script : #!/bin/bash pwd echo DOLPHINSCHEDULER-REMOTE-SHELL-TASK-STATUS-$? [INFO] 2025-06-04 16:49:28.163 +0800 - upload script from local:/tmp/dolphinscheduler/exec/process/root/142697674815584/142764968016224_12/5/15/5_15_node.sh to remote: /tmp/dolphinscheduler-remote-shell-root/dolphinscheduler-remoteshell-15.sh [INFO] 2025-06-04 16:49:28.525 +0800 - The final script is: #!/bin/bash pwd echo DOLPHINSCHEDULER-REMOTE-SHELL-TASK-STATUS-$? [INFO] 2025-06-04 16:49:28.574 +0800 - Remote shell task log: [INFO] 2025-06-04 16:49:28.752 +0800 - /root DOLPHINSCHEDULER-REMOTE-SHELL-TASK-STATUS-0 [INFO] 2025-06-04 16:49:28.808 +0800 - Remote shell task run status: DOLPHINSCHEDULER-REMOTE-SHELL-TASK-STATUS-0 [ERROR] 2025-06-04 16:49:28.808 +0800 - Remote shell task failed [ERROR] 2025-06-04 16:49:28.815 +0800 - shell task error org.apache.dolphinscheduler.plugin.task.api.TaskException: Remote shell task error at org.apache.dolphinscheduler.plugin.task.remoteshell.RemoteExecutor.run(RemoteExecutor.java:100) at org.apache.dolphinscheduler.plugin.task.remoteshell.RemoteShellTask.handle(RemoteShellTask.java:104) at org.apache.dolphinscheduler.server.worker.runner.DefaultWorkerTaskExecutor.executeTask(DefaultWorkerTaskExecutor.java:51) at org.apache.dolphinscheduler.server.worker.runner.WorkerTaskExecutor.run(WorkerTaskExecutor.java:172) 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.NumberFormatException: For input string: "0 " at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.lang.Integer.parseInt(Integer.java:580) at java.lang.Integer.parseInt(Integer.java:615) at org.apache.dolphinscheduler.plugin.task.remoteshell.RemoteExecutor.getTaskExitCode(RemoteExecutor.java:140) at org.apache.dolphinscheduler.plugin.task.remoteshell.RemoteExecutor.run(RemoteExecutor.java:98) ... 6 common frames omitted [ERROR] 2025-06-04 16:49:28.816 +0800 - Task execute failed, due to meet an exception org.apache.dolphinscheduler.plugin.task.api.TaskException: Execute shell task error at org.apache.dolphinscheduler.plugin.task.remoteshell.RemoteShellTask.handle(RemoteShellTask.java:110) at org.apache.dolphinscheduler.server.worker.runner.DefaultWorkerTaskExecutor.executeTask(DefaultWorkerTaskExecutor.java:51) at org.apache.dolphinscheduler.server.worker.runner.WorkerTaskExecutor.run(WorkerTaskExecutor.java:172) 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: org.apache.dolphinscheduler.plugin.task.api.TaskException: Remote shell task error at org.apache.dolphinscheduler.plugin.task.remoteshell.RemoteExecutor.run(RemoteExecutor.java:100) at org.apache.dolphinscheduler.plugin.task.remoteshell.RemoteShellTask.handle(RemoteShellTask.java:104) ... 5 common frames omitted Caused by: java.lang.NumberFormatException: For input string: "0 " at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.lang.Integer.parseInt(Integer.java:580) at java.lang.Integer.parseInt(Integer.java:615) at org.apache.dolphinscheduler.plugin.task.remoteshell.RemoteExecutor.getTaskExitCode(RemoteExecutor.java:140) at org.apache.dolphinscheduler.plugin.task.remoteshell.RemoteExecutor.run(RemoteExecutor.java:98) ... 6 common frames omitted [INFO] 2025-06-04 16:49:28.817 +0800 - kill remote task dolphinscheduler-remoteshell-15 [ERROR] 2025-06-04 16:49:28.817 +0800 - Cancel task failed, this will not affect the taskInstance status, but you need to check manual org.apache.dolphinscheduler.plugin.task.api.TaskException: cancel application error at org.apache.dolphinscheduler.plugin.task.remoteshell.RemoteShellTask.cancel(RemoteShellTask.java:121) at org.apache.dolphinscheduler.server.worker.runner.WorkerTaskExecutor.cancelTask(WorkerTaskExecutor.java:133) at org.apache.dolphinscheduler.server.worker.runner.WorkerTaskExecutor.afterThrowing(WorkerTaskExecutor.java:114) at org.apache.dolphinscheduler.server.worker.runner.DefaultWorkerTaskExecutor.afterThrowing(DefaultWorkerTaskExecutor.java:61) at org.apache.dolphinscheduler.server.worker.runner.WorkerTaskExecutor.run(WorkerTaskExecutor.java:179) 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: org.apache.dolphinscheduler.plugin.task.api.TaskException: SSH connection failed at org.apache.dolphinscheduler.plugin.task.remoteshell.RemoteExecutor.getSession(RemoteExecutor.java:82) at org.apache.dolphinscheduler.plugin.task.remoteshell.RemoteExecutor.runRemote(RemoteExecutor.java:224) at org.apache.dolphinscheduler.plugin.task.remoteshell.RemoteExecutor.getTaskPid(RemoteExecutor.java:200) at org.apache.dolphinscheduler.plugin.task.remoteshell.RemoteExecutor.kill(RemoteExecutor.java:158) at org.apache.dolphinscheduler.plugin.task.remoteshell.RemoteShellTask.cancel(RemoteShellTask.java:119) ... 7 common frames omitted Caused by: java.lang.IllegalStateException: SshClient not started. Please call start() method before connecting to a server at org.apache.sshd.client.SshClient.doConnect(SshClient.java:627) at org.apache.sshd.client.SshClient.doConnect(SshClient.java:616) at org.apache.sshd.client.SshClient.connect(SshClient.java:547) at org.apache.sshd.client.SshClient.connect(SshClient.java:539) at org.apache.sshd.client.session.ClientSessionCreator.connect(ClientSessionCreator.java:74) at org.apache.sshd.client.session.ClientSessionCreator.connect(ClientSessionCreator.java:57) at org.apache.dolphinscheduler.plugin.datasource.ssh.SSHUtils.getSession(SSHUtils.java:41) at org.apache.dolphinscheduler.plugin.task.remoteshell.RemoteExecutor.getSession(RemoteExecutor.java:77) ... 11 common frames omitted [INFO] 2025-06-04 16:49:28.820 +0800 - Get a exception when execute the task, will send the task status: FAILURE to master: 172.20.0.2:1234 [INFO] 2025-06-04 16:49:28.820 +0800 - FINALIZE_SESSION ### What you expected to happen no error ### How to reproduce Create a new Remote shell task and any command will be reproduce this error. ### Anything else _No response_ ### Version 3.2.x ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
