Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

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

Solved Go to solution

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

New 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

Accepted Solutions

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

@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 ?

4 REPLIES 4

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

@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 ?

Highlighted

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

New 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?

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

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?

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

Community Manager

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.