Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Nifi problems with emply queue?

avatar
Contributor

Hi, I'm having trouble with Apache NiFi.

Occasionally, NiFi is not able to erase the flowfiles of a queue.

I stop the two processors that are before and after the queue, then with a right click, I display the menu in which I select 'Emply queue' but it doesn't work.

This worries me a lot because the only way I have found to fix this is to restart NiFi, but this is not viable in a production environment.

Someone please know a way to solve this problem; starting the processor ahead of the queue is not a solution, as the queue stays the same way.

attached images

42708-1.png

Greetings


2.png3.png4.png
1 ACCEPTED SOLUTION

avatar
Super Mentor
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
5 REPLIES 5

avatar
Super Mentor
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login

avatar
Super Mentor

@Lanic

All of NiFi executes within a single JVM, so it is not possible to kill a single thread within a single JVM. Unfortunately, a restart is required to clear hung threads.

Hopefully you have ironed out any misconfiguration in development that lead to hung threads before deploying to production. I understand that naytime a restart is needed can be very annoying.

Thanks,

Matt


A few Hortonworks community forum tips:

1. Use "@<username>" in responses so that user gets pinged; otherwise, user may never know you asked follow-up question.

2. Avoid starting a new "Answer" to respond to an existing answer. Instead click "Add comment". This makes following a thread/line of thought easier.

3. When an "Answer" addresses/solves your question, please select "Accept" beneath that answer. This encourages user participation in this forum.

avatar
Super Mentor

@Lanic

-

With release of Apache NiFi 1.7 and HDF 3.2 in mid 2018, the ability in terminate threads still executing on a processor that is in a state of "stopping" is now possible. After changing state of processor from start to stop, you will see processor display red square. You should give the running threads an opportunity to complete their execution. If it appears the processor is just not going to stop (hung threads) you can right click on the processor and select "Terminate" from the context menu displayed as follows:

107501-screen-shot-2019-03-27-at-10501-pm.png

avatar
Contributor

I'll try to look at the dump, see if I get anything clear from them.

I wonder in case the processor is hung up, is there a way to restart it, without having to reboot nifi?

Somehow I would like to be able to put NiFi into production and have an alternative to having to restart the entire service.

Thanks for the help Matt.

avatar
New Contributor

In Nifi >= 1.7 there is possibility to 'Terminate' processor, it helps in such situations:

https://pierrevillard.com/2018/07/02/nifi-1-7-terminate-threads/