Skip to main content
pankajgaikwad
Silver ⭐️⭐️
October 22, 2024
Question

ApacheNifi HttpInvoke java.lang.IllegalStateException: closed Error

Hello All,

Actually, I'm getting one error from my post call in nifi and in that I'm making post call with form data which contains file, JSon body but even after properly configuring the Httpinvoke it's giving me this error

java.lang.IllegalStateException: closed

 

Can you please help me in this these are my configuration which I have done

this preview which i got 

pankajgaikwad_0-1729599556088.png

And the configuration:-

pankajgaikwad_1-1729599611161.pngpankajgaikwad_2-1729599629740.pngpankajgaikwad_3-1729599665666.pngpankajgaikwad_4-1729599683148.pngpankajgaikwad_5-1729599697291.png

and the Entire pipeline

 

4 replies

DianaTorres
Community Manager
Community Manager
October 22, 2024

@pankajgaikwad Welcome to the Cloudera Community!

To help you get the best possible solution, I have tagged our NiFi experts @MattWho @SAMSAL  who may be able to assist you further.

Please keep us updated on your post, and we hope you find a satisfactory solution to your query.

Translate
Regards, Diana Torres, Senior Community Moderator
pankajgaikwad
Silver ⭐️⭐️
October 28, 2024

no one answered yet.......just waiting for it 

 

Translate
MattWho
Titanium ⭐️⭐️⭐️
Titanium ⭐️⭐️⭐️
October 28, 2024

@pankajgaikwad 

while it is wonderful that you have shared your InvokeHTTP processor configurations, I don't think enough information has been provided to provide assistance here.  All we know from you post is that some Post rest-api call was made against some service endpoint using some URL, to send form data of some content-type to which an illegal state exception was thrown.

Sharing details about your use case is always helpful. 

  1. What is the target endpoint service (Polarion? which community members may not be familiar with)? 
  2. What is the full rest-api call you are trying to make?
  3. Were you able to successfully make that same rest-api call via curl local to the NiFi server?
  4. What is the structure of your NiFi FlowFile (what is in the FlowFile's content and what are the FlowFile's attributes when the FlowFile reaches the InvokeHTTOP processor)?
  5. What are the complete configurations of the invokeHTTP processor? (Some property values are cut-off in your images)
  6. What documentation are you following for this rest-api call?

As far as the exception goes...

  1. Was the "java.lang.IllegalStateException: closed" accompanied by any stack trace in the the nifi-app.log?
  2. What was logged within the target service when this post request was made?

I see you shared your full dataflow in another community post:

MattWho_0-1730121450329.png

An example of the original file you are obtaining via "GetFile", what attributes you are adding to the FlowFile, and how you are modifying that content before the InvokeHTTP may also be helpful here.

Sharing the additional input and details may make it possible for someone in the community to provide you with some suggestions and solutions.

Thank you,
Matt

Translate
DianaTorres
Community Manager
Community Manager
November 1, 2024

@pankajgaikwad Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future. If you are still experiencing the issue, can you provide the information Thanks.

Translate
Regards, Diana Torres, Senior Community Moderator