Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-13566

JettyServer remains started when a ClassNotFoundError happens

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0-M4
    • 1.28.0, 2.0.0
    • None
    • None

    Description

      The JettyServer start method has a try/catch with:

      } catch (Exception ex) {
          startUpFailure(ex);
      } 

      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:

      try {
          NiFiProperties properties = convertArgumentsToValidatedNiFiProperties(args);
          new NiFi(properties);
      } catch (final Throwable t) {
          LOGGER.error("Failure to launch NiFi", t);
      } 

      Attachments

        Issue Links

          Activity

            People

              bbende Bryan Bende
              bbende Bryan Bende
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h