You might need to use an ExecuteStreamCommand processor with “ping -t 5 
<server>” and if you receive a non-zero exit status, the connection is down. 
This will generate a flowfile representing error that you can route 
accordingly. You could also use an ExecuteScript processor which generated an 
error flowfile on connection down.

Andy LoPresto
[email protected]
[email protected]
PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69

> On Sep 6, 2018, at 4:51 AM, saloni udani <[email protected]> wrote:
> 
> Hi Pierre
> 
> The use case is like I am accessing a third party API from my application, so 
> there are times when there are network issues and the link from my 
> application to the third party application is down. So here I am trying to 
> report this failure by calling the third party API from InvokeHTTP processor 
> and generate an alert on connection failure. So this connection timeout is 
> not the one from the third party API server, but it just proves that there 
> are network issues and the link is down.
> 
> 
> 
> Thanks
> 
> On Thu, Sep 6, 2018 at 3:43 PM Pierre Villard <[email protected] 
> <mailto:[email protected]>> wrote:
> Hi,
> 
> There are two things here. What is suggested by Ed is in case the server 
> you're requesting is responding with a Timeout. But the processor itself 
> implements a "read timeout" to give up after a given time. In this case, it 
> won't generate a flow file but will just generate a bulletin. I'd suggest you 
> to try increasing the read timeout parameter if it's OK with your use case.
> 
> Thanks,
> Pierre
> 
> Le jeu. 6 sept. 2018 à 09:33, saloni udani <[email protected] 
> <mailto:[email protected]>> a écrit :
> Connection timeout just results in error bulletin and not any output flow 
> file.Also tried setting
> "Always Output Response" to "true" but no luck there too.
> 
> On Thu, Sep 6, 2018 at 1:24 AM Ed B <[email protected] 
> <mailto:[email protected]>> wrote:
> Connection timeout is 504 response code.
> InvokeHTTP will send FF to "Retry" relationship. You can use 
> RouteOnAttribute, check invokehttp.status.code attribute for having 
> appropriate code and then do your failure handling. You might also set 
> "Always Output Response" to "true".
> 
> On Wed, Sep 5, 2018 at 12:22 PM saloni udani <[email protected] 
> <mailto:[email protected]>> wrote:
> Hi
> 
> Is there a way to generate a failure flow file for connection issues like 
> connection timeout for InvokeHTTP Processor?
> 
> 
> 
> 
> 
> Thanks
> Saloni Udani

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to