Support Questions

Find answers, ask questions, and share your expertise

How to route the Failure relationship of invokeHTTP and retry the connection when the endpoint goes down ?

avatar
Contributor

Hi Everyone,

I am using invokeHTTP Processor. When I down the server, the flow is not going to failure mechanism. I want to retry the connection when the server goes down. So I wrote my retry mechanism under failure relationship. But the failure flow is not trigerred, instead it gives the error in the bulletin(when the retry mechanism is failed after the configured number of times, I can refer this bulletin and display the error to user. But for now I want to implement the retry mechanism). Can someone help me out with this case/scenario. Please find the attachment files.

For retry logic I have used the suggestion mentioned under https://community.hortonworks.com/questions/77336/nifi-best-practices-for-error-handling.html

40810-nifiissue.png

40850-nifiissue.png

Thanks,

1 ACCEPTED SOLUTION

avatar
@Dhamotharan P

It looks like your flow is never triggered. InvokeHTTP is waiting for an incoming flow file that will be added to the body of your http call. Add a GenerateFlowFile before your invoke just to trigger it. You should see flow files going to failure relationship.

Can you test that ?

View solution in original post

4 REPLIES 4

avatar
@Dhamotharan P

It looks like your flow is never triggered. InvokeHTTP is waiting for an incoming flow file that will be added to the body of your http call. Add a GenerateFlowFile before your invoke just to trigger it. You should see flow files going to failure relationship.

Can you test that ?

avatar
Contributor

Hi @Abdelkrim Hadjidj, @Matt Clarke

Thanks a lot for your help. I was struggling for this for a while before I post this question and this is what I needed.

  1. From bulletin we can get the warn/error info. But how to debug Nifi?
  2. I have worked on Javascript,vbscript and C# and there are lot many tutorials available for us to learn these. Is there any best way/suggestion to learn Nifi expression language particularly? or any sample tutorials available?

avatar
New Contributor

I am still facing the same issue , the failure does not go through failure mechanism. How to use GenerateFlowFile, what is the purpose?

avatar

The above question and the entire response thread below were originally posted in the Community Help track. On Sun Jul 14 16:56 UTC 2019, a member of the HCC moderation staff moved it to the Data Ingestion & Streaming track. The Community Help Track is intended for questions about using the HCC site itself.

Bill Brooks, Community Moderator
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.