[ 
https://issues.apache.org/jira/browse/NIFI-13566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17867805#comment-17867805
 ] 

ASF subversion and git services commented on NIFI-13566:
--------------------------------------------------------

Commit 0e422f0ea363d109813e5bf8308492b309cd5a7f in nifi's branch 
refs/heads/main from Bryan Bende
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=0e422f0ea3 ]

NIFI-13566 Catch Throwable during JettyServer start to ensure any issue during 
start will exit

Signed-off-by: Matt Burgess <[email protected]>

This closes #9101


> JettyServer remains started when a ClassNotFoundError happens
> -------------------------------------------------------------
>
>                 Key: NIFI-13566
>                 URL: https://issues.apache.org/jira/browse/NIFI-13566
>             Project: Apache NiFi
>          Issue Type: Bug
>    Affects Versions: 2.0.0-M4
>            Reporter: Bryan Bende
>            Assignee: Bryan Bende
>            Priority: Major
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> The JettyServer start method has a try/catch with:
> {code:java}
> } catch (Exception ex) {
>     startUpFailure(ex);
> } {code}
> Some errors that can happen do not extend Exception so they are not caught 
> here, and as a result they do not go into the helper method which calls 
> System.exit, so the NiFi process and JettyServer remain started, but in a 
> strange non-fully working state.
> It will ultimately bounce to the NiFi main method which just logs the error, 
> but doesn't exit:
> {code:java}
> try {
>     NiFiProperties properties = 
> convertArgumentsToValidatedNiFiProperties(args);
>     new NiFi(properties);
> } catch (final Throwable t) {
>     LOGGER.error("Failure to launch NiFi", t);
> } {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to