[GitHub] nifi pull request #1093: Fixes NIFI-1069 init script status exit code 3 when...
Github user asfgit closed the pull request at: https://github.com/apache/nifi/pull/1093 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] nifi pull request #1093: Fixes NIFI-1069 init script status exit code 3 when...
Github user michalklempa commented on a diff in the pull request: https://github.com/apache/nifi/pull/1093#discussion_r83710519 --- Diff: nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/RunNiFi.java --- @@ -581,30 +585,31 @@ private Status getStatus(final Logger logger) { return new Status(port, pid, pingSuccess, alive); } -public void status() throws IOException { +public int status() throws IOException { final Logger logger = cmdLogger; final Status status = getStatus(logger); if (status.isRespondingToPing()) { logger.info("Apache NiFi is currently running, listening to Bootstrap on port {}, PID={}", new Object[]{status.getPort(), status.getPid() == null ? "unknown" : status.getPid()}); -return; +return 0; } if (status.isProcessRunning()) { logger.info("Apache NiFi is running at PID {} but is not responding to ping requests", status.getPid()); -return; +return 0; --- End diff -- resolved. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] nifi pull request #1093: Fixes NIFI-1069 init script status exit code 3 when...
Github user trixpan commented on a diff in the pull request: https://github.com/apache/nifi/pull/1093#discussion_r83521841 --- Diff: nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/RunNiFi.java --- @@ -581,30 +585,31 @@ private Status getStatus(final Logger logger) { return new Status(port, pid, pingSuccess, alive); } -public void status() throws IOException { +public int status() throws IOException { final Logger logger = cmdLogger; final Status status = getStatus(logger); if (status.isRespondingToPing()) { logger.info("Apache NiFi is currently running, listening to Bootstrap on port {}, PID={}", new Object[]{status.getPort(), status.getPid() == null ? "unknown" : status.getPid()}); -return; +return 0; } if (status.isProcessRunning()) { logger.info("Apache NiFi is running at PID {} but is not responding to ping requests", status.getPid()); -return; +return 0; --- End diff -- @michalklempa Bear with me while I defer this to the wider community. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] nifi pull request #1093: Fixes NIFI-1069 init script status exit code 3 when...
Github user trixpan commented on a diff in the pull request: https://github.com/apache/nifi/pull/1093#discussion_r83360074 --- Diff: nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/RunNiFi.java --- @@ -581,30 +585,31 @@ private Status getStatus(final Logger logger) { return new Status(port, pid, pingSuccess, alive); } -public void status() throws IOException { +public int status() throws IOException { final Logger logger = cmdLogger; final Status status = getStatus(logger); if (status.isRespondingToPing()) { logger.info("Apache NiFi is currently running, listening to Bootstrap on port {}, PID={}", new Object[]{status.getPort(), status.getPid() == null ? "unknown" : status.getPid()}); -return; +return 0; } if (status.isProcessRunning()) { logger.info("Apache NiFi is running at PID {} but is not responding to ping requests", status.getPid()); -return; +return 0; --- End diff -- @michalklempa It could be said the kernel PID refers to the JVM and not to the enclosed program. In this case, a rather return 4 as this stage, as the system is not in a healthy state and a certain status cannot be derived. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] nifi pull request #1093: Fixes NIFI-1069 init script status exit code 3 when...
Github user trixpan commented on a diff in the pull request: https://github.com/apache/nifi/pull/1093#discussion_r82104883 --- Diff: nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/RunNiFi.java --- @@ -581,30 +585,31 @@ private Status getStatus(final Logger logger) { return new Status(port, pid, pingSuccess, alive); } -public void status() throws IOException { +public int status() throws IOException { final Logger logger = cmdLogger; final Status status = getStatus(logger); if (status.isRespondingToPing()) { logger.info("Apache NiFi is currently running, listening to Bootstrap on port {}, PID={}", new Object[]{status.getPort(), status.getPid() == null ? "unknown" : status.getPid()}); -return; +return 0; } if (status.isProcessRunning()) { logger.info("Apache NiFi is running at PID {} but is not responding to ping requests", status.getPid()); -return; +return 0; --- End diff -- Should this 0? I would imagine returning 4 _"program or service status is unknown"_ would make more sense? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] nifi pull request #1093: Fixes NIFI-1069 init script status exit code 3 when...
GitHub user michalklempa opened a pull request: https://github.com/apache/nifi/pull/1093 Fixes NIFI-1069 init script status exit code 3 when not running Fixes NIFI-1069 init script status exit code 3 when not running , 0 when running You can merge this pull request into a Git repository by running: $ git pull https://github.com/michalklempa/nifi NIFI-1069_fix_init_status_exit_code Alternatively you can review and apply these changes as the patch at: https://github.com/apache/nifi/pull/1093.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1093 commit 460da679ed66e6d7ba1c93b06d5660f2d7a0a70b Author: Michal KlempaDate: 2016-10-04T12:25:49Z Fixes NIFI-1069 init script status exit code 3 when not running, 0 when running --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---