leocook opened a new pull request, #18210: URL: https://github.com/apache/dolphinscheduler/pull/18210
## Was this PR generated or assisted by AI?
YES, assisted by Claude Sonnet 4.6 for root cause analysis and code fix.
## Purpose of the pull request
close #18201
## Brief change log
PR #17800 changed `runRemoteAndProcessLines()` to use
`channel.getInvertedOut()` instead of `channel.setOut(ByteArrayOutputStream)`,
which introduced two regression bugs:
1. **NPE**: `getInvertedOut()` is called before `channel.open()`
completes, returns null
2. **Pipe closed after 0 cycles**: MINA SSHD's `ChannelPipedInputStream`
throws IOException when command produces no output
This PR reverts to the `setOut(ByteArrayOutputStream)` approach while
keeping the line-by-line processing improvement from #17800.
## Verify this pull request
This pull request is already covered by existing tests, such as
`RemoteExecutorTest` (12 tests, all passed).
Manually verified the change by testing RemoteShell task against a remote
SSH server on local standalone deployment.
## Pull Request Notice
[Pull Request
Notice](https://github.com/apache/dolphinscheduler/blob/dev/docs/docs/en/contribute/join/pull-request.md)
If your pull request contains incompatible change, you should also add it
to `docs/docs/en/guide/upgrade/incompatible.md`
--
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]
