Adam
Adam

Reputation: 21

Apache Nifi InvokeHttp Timeout Issue

I have an issue with InvokeHttp processor in Apache NiFi. I want to get a message when timeout occurs while trying to connect to REST API (via GET request). According to documentation of failure relationship:

The original FlowFile will be routed on any type of connection failure, timeout or general exception. It will have new attributes detailing the request.

I've created a test endpoint which replies after 20s, and I tried to send requests with read timeout and connection timeout lower that 20s, but no matter what params of the processor I change it doesn't produce any messages. There is an error in bulletin:

Yielding processor due to exception encountered as a source processor: java.net.SocketTimeoutException: Read timed out: java.net.SocketTimeoutException: Read timed out

So I assume NiFi recognizes it as a timeout, but fails to send message to failure relationship. has anyone encountered such issue? Or is my config wrong somehow?

That's my config: config_part_1 config_part_2

Upvotes: 2

Views: 8121

Answers (1)

Mahendran V M
Mahendran V M

Reputation: 3496

Adam,

You just increase the values for connection timeout & Read Timeout properties like below.

Connection Time Out :15 minutes.
Read Timeout :15 minutes.

Due to network problem,that may not be connect to given url with respect to default seconds.

So just increase and try again you might see better results.

Hope this helpful for you.

Dont forget to accept this to be answer.

Upvotes: -1

Related Questions