Support Questions

Find answers, ask questions, and share your expertise

ApacheNifi HttpInvoke java.lang.IllegalStateException: closed Error

avatar
New Contributor

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 4

avatar
Community Manager

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


Regards,

Diana Torres,
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.
Learn more about the Cloudera Community:

avatar
New Contributor

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

 

avatar
Master Mentor

@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

avatar
Community Manager

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


Regards,

Diana Torres,
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.
Learn more about the Cloudera Community: