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

Log Messages on Process Shutdown are Discarded due to Logging Deinitialize

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.16.0
    • None
    • None

    Description

      NiFi uses the SLF4J logging API https://www.slf4j.org/ and the Logback implementation https://logback.qos.ch/ to capture useful information about the running state of the application.  While this subsystem seems to work well during the normal lifetime of the process, log messages associated with process shutdown activity seem to be lost; they are not written to the configured output files.  As logging is one way to ensure that the all NiFi process components stop cleanly, it would be an improvement find ways to address this issue.

      NiFi seems to use portions of the Spring framework to control component lifecycle, including the configuration found in this web descriptor:

      Logback seems to be integrated with this framework; it is initialized and active during the lifetime of the embedded NiFi components, but at shutdown, this context is destroyed.

      Here are a couple of posts describing a similar problem, and suggesting a possible remediation:

      Attachments

        Issue Links

          Activity

            People

              exceptionfactory David Handermann
              pgrey Paul Grey
              Votes:
              0 Vote for this issue
              Watchers:
              3 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 - 40m
                  40m