orangeCatDeveloper commented on issue #732: URL: https://github.com/apache/hertzbeat/issues/732#issuecomment-5860956653
The attached log shows the cause: from 18:00 the one-row SSH parser threw `ArrayIndexOutOfBoundsException: Index 5 out of bounds for length 5` (the command returned fewer lines than configured fields), and 1.3.0 only closed the exec channel on the success path. Each failure leaked a channel on the reused session until the server's `MaxSessions` limit was reached, after which every collection failed with `open failed` (312 times from 18:09) until a restart released the session. Both halves are fixed on current master: the one-row parser fills missing fields with empty values instead of throwing, and `SshCollectImpl` always closes the channel in `finally` (closing the session too if the channel cannot be closed). I verified it against an sshd limited to `MaxSessions=3` with connection reuse on: 20 collections with 5 output lines for 6 fields all succeeded, and after 10 collections that failed after the channel was opened (command timeouts), the same reused session still ran a command successfully. Closing; please reopen if you still see `open failed` on the latest release. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
