From 82ff24ae99fa9a63bff6b1c9d283f72e848f90f8 Mon Sep 17 00:00:00 2001 From: wangbowen Date: Wed, 10 Jul 2024 20:02:12 +0800 Subject: [PATCH] [Fix-16295][Task] Remote Shell Task plugin run error (#16296) --- .../plugin/task/remoteshell/RemoteExecutor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dolphinscheduler-task-plugin/dolphinscheduler-task-remoteshell/src/main/java/org/apache/dolphinscheduler/plugin/task/remoteshell/RemoteExecutor.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-remoteshell/src/main/java/org/apache/dolphinscheduler/plugin/task/remoteshell/RemoteExecutor.java index 814826a6bb..907d496d3d 100644 --- a/dolphinscheduler-task-plugin/dolphinscheduler-task-remoteshell/src/main/java/org/apache/dolphinscheduler/plugin/task/remoteshell/RemoteExecutor.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-remoteshell/src/main/java/org/apache/dolphinscheduler/plugin/task/remoteshell/RemoteExecutor.java @@ -131,7 +131,7 @@ public class RemoteExecutor implements AutoCloseable { int exitCode = -1; log.info("Remote shell task run status: {}", logLine); if (logLine.contains(STATUS_TAG_MESSAGE)) { - String status = StringUtils.substringAfter(logLine, STATUS_TAG_MESSAGE); + String status = StringUtils.substringAfter(logLine, STATUS_TAG_MESSAGE).trim(); if (status.equals("0")) { log.info("Remote shell task success"); exitCode = 0;