Support Questions
Find answers, ask questions, and share your expertise

Debugging custom NiFi unresponsive flows

Contributor

Using HDF version 2.0.1 I’m seeing an issue where a custom java processor within the NiFi flow becomes unresponsive or, rather, the messages being sent automatically routed to the ‘failure’ without any logged reason for the failure. This instability seems to occur randomly after an unspecified amount of idle time. If I refresh the processor by toggling on and off then the “failed” documents are successfully cycled through the custom processor.

One of the problems I’m having is that I cannot use the org.apache.nifi.logging.ComponentLog or related ProcessorLog which provides logging with in the application. Either logging within a custom application has been deprecated or I’m just not able to find a supported jar for such a purpose.

Do either of you have any suggestions for debugging /tips or any information you may have which would help discern what might be the cause of these disruptions in the flowfiles?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Debugging custom NiFi unresponsive flows

Hi @Sean Murphy,

You shouldn't have any issue with logging features. You should be able to call getLogger() in your custom processor to get an instance of ComponentLog.

Another way to debug processors, if you are familiar with remote debugging, is to uncomment the following line in the ./conf/bootstrap.conf file:

#java.arg.debug=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000

This way you are able to attach a Java debugger to the NiFi instance on port 8000 using your favorite IDE. NiFi needs to be restarted.

Another option is to use the code provided here (https://github.com/olegz/nifi-ide-integration), it gives you the possibility to directly launch NiFi in your IDE. But if your problem appears time to time it may not be the best approach.

Hope this helps.

View solution in original post

3 REPLIES 3

Re: Debugging custom NiFi unresponsive flows

Hi @Sean Murphy,

You shouldn't have any issue with logging features. You should be able to call getLogger() in your custom processor to get an instance of ComponentLog.

Another way to debug processors, if you are familiar with remote debugging, is to uncomment the following line in the ./conf/bootstrap.conf file:

#java.arg.debug=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000

This way you are able to attach a Java debugger to the NiFi instance on port 8000 using your favorite IDE. NiFi needs to be restarted.

Another option is to use the code provided here (https://github.com/olegz/nifi-ide-integration), it gives you the possibility to directly launch NiFi in your IDE. But if your problem appears time to time it may not be the best approach.

Hope this helps.

View solution in original post

Re: Debugging custom NiFi unresponsive flows

Contributor

Thank you for the prompt reply. I'll your suggestions a try.