Support Questions

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

Apache Nifi handlehttprequest/response issue


I would like to know how exactly handlehttprequest/reponse processor works.

I have also done configuration with httpd. If anyone could help me with the prerequisites before using the handlehttprequest/reponse processor would be great.

I have tried doing this but, its failing. Could anyone please help.


HandleHttpRequest[id=b548bfa3-015f-1000-c128-2d09d2c355b9] Failed to process session due to org.apache.nifi.processor.exception.ProcessException: Failed to initialize the server: org.apache.nifi.processor.exception.ProcessException: Failed to initialize the server

If anyone could help me providing some example would be great help for me.



New Contributor

@ahmed ahmed

How did you solve the problem? I am having the same issue.

New Contributor

This is a kind of bug of Apache NiFi.

I've been noted that when you create a flow that, for some reason, does not return a proper HTTP response for every HTTP request (this is the case in the flow you created), that specific thread got stuck forever (it doesn't timeout).

You can force threads to terminate (right clicking on HandleHttpRequest), but this will lead you to a situation where the port insist in being binded by NiFi (you can confirm this by running "netstat" in a terminal).

The only way I am aware that un-stuck the binding ports when this happens, is restarting the whole NiFi process. If this is not possible/desirable, you can also change the port that your processor is supposed to listen to.

I successful avoided this from happening assuring there is no path that doesn't leads a HandleHttpRequest to a HandleHttpResponse. If you also use restricted components (e.g ExecuteScript), you should also assure your processor does not raise uncatched exceptions.