[ 
https://issues.apache.org/jira/browse/NIFI-894?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bryan Bende updated NIFI-894:
-----------------------------
    Attachment: NIFI-894.patch

I think the reason this issue came up was because in NIFI-884 we moved the 
deletion of the pid file to the end of the bootstrap stop method, which we want 
to do so that any failed shutdowns still have the pid file, but the restart 
loop was using the lack of the pid file as a way to exit, so that was no longer 
occurring after NIFI-844.

This patch adds a lock file that is written at the beginning of the stop() 
method, and them removed at the end. This lock allows the restart loop to 
identify that a shutdown is in progress and not to restart.


> bootstrap incorrectly restarting NiFi after a stop command was issued
> ---------------------------------------------------------------------
>
>                 Key: NIFI-894
>                 URL: https://issues.apache.org/jira/browse/NIFI-894
>             Project: Apache NiFi
>          Issue Type: Bug
>            Reporter: Bryan Bende
>            Assignee: Bryan Bende
>             Fix For: 0.3.0
>
>         Attachments: NIFI-894.patch
>
>
> Started NiFi and ran a simple flow that gets Twitter data, does some json 
> evaluation, merges the json, and then updates attribute. Issued a normal 
> shutdown command and according to the logs the shutdown was successful. 
> However, the boostrap immediately said "org.apache.nifi.bootstrap.RunNiFi 
> Apache NiFi appears to have died. Restarting...", and then started NiFi again.
> When using a completely empty flow and starting and stopping, this issue did 
> not occur.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to