Github user kishorvpatil commented on a diff in the pull request: https://github.com/apache/storm/pull/2855#discussion_r222100110 --- Diff: storm-server/src/main/java/org/apache/storm/healthcheck/HealthChecker.java --- @@ -106,13 +106,13 @@ public void run() { BufferedReader reader = new BufferedReader(new InputStreamReader(stdin)); while ((str = reader.readLine()) != null) { if (str.startsWith("ERROR")) { + LOG.warn("The healthcheck process {} exited with code {}", script, process.exitValue()); return FAILED; } } return SUCCESS; --- End diff -- @agresch, if loop should always return FAIL since exit code is != 0. Currently, there is possibility that you will get out of if loop by return code SUCCESS. We need something similar to ``` if (process.exitValue() != 0) { String str; InputStream stdin = process.getInputStream(); BufferedReader reader = new BufferedReader(new InputStreamReader(stdin)); while ((str = reader.readLine()) != null) { if (str.startsWith("ERROR")) { return FAILED; } } LOG.warn("The healthcheck process {} exited with code {}", script, process.exitValue()); return FAILED_WITH_EXIT_CODE; } return SUCCESS; ```
---