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

ConsumeWindowsEventLog should renew failed subscription

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.10.0
    • Extensions
    • None

    Description

      Current implementation has some code for specific 15011 error code. The processor uses EvtSubscribeStrict flag which produces ERROR_EVT_QUERY_RESULT_STALE (15011) event when event records are missing. Currently, the processor only logs the error code. But does not renew subscription.

      https://docs.microsoft.com/en-us/windows/desktop/api/winevt/nc-winevt-evt_subscribe_callback

       

      When error 15011 happens, the processor stopped reading further events. It looks as if the processor hangs. The processor doesn't renew subscription because it thinks it already has a valid subscription. The current implementation determines if a subscription is valid by these lines of code: 

      private boolean isSubscribed() {
          return subscriptionHandle != null && subscriptionHandle.getPointer() != null;
      }

      https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-windows-event-log-bundle/nifi-windows-event-log-processors/src/main/java/org/apache/nifi/processors/windows/event/log/ConsumeWindowsEventLog.java#L242-L244

      If already subscribed, the processor polls received messages from the internal queue. But since the subscription has encountered an error, no further messages available.

      Attachments

        Issue Links

          Activity

            People

              ijokarumawak Koji Kawamura
              ijokarumawak Koji Kawamura
              Votes:
              0 Vote for this issue
              Watchers:
              1 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 - 0.5h
                  0.5h