Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

Nifi execute streamcommand Failed to  write flow file to stdin due to broken pipe:java.io.IOException:Broken pipe

Hi Team,

 

I'm trying to merge two files(.pdf format) and combine it to one file using execute streamcommand using jar file. at java side the merge is working using the same jar. but nifi side the command is not working  , instead of merging files it pushing both individual files to outputstream and throwing the below error at  execute streamcommand processor.

"Failed to  write flow file to stdin due to broken pipe:java.io.IOException:Broken pipe"

Below is flow which i'm using 

 

PradNiFi1236_1-1670947066838.png

 

and the command Arguements which i'm using is

-jar;pdfmerge-0.0.1-SNAPSHOT.jar;/opt/nifi/nifi-current/temppdf/${filename:startsWith('invoice_')};/opt/nifi/nifi-current/temppdf/${filename:startsWith('QRBill_')};/opt/nifi/nifi-current/temp2/Output.pdf

 

and here is my configuration of executeStreamCommand:

PradNiFi1236_2-1670947237730.png

Could you please help me on this?

 

1 ACCEPTED SOLUTION

Hi All,

 

Finally was able to accomplish this task. after changing the Flow to below.

Before keeping the Flowfiles in putFile path updating filename of each flowfile to same name taking two flow files in respected putfile paths (invoice, QRBill) folders separately and placing them in respective folders using 2 put files. then after putfile  adding merge content(actual merging two files not happening here, but we are getting one single output) to get single flowfile and then in the execute. and then in the execute stream command for both inputs giving that same filename for respective folders.

 

Regards,

pradeep

 

 

View solution in original post

1 REPLY 1

Hi All,

 

Finally was able to accomplish this task. after changing the Flow to below.

Before keeping the Flowfiles in putFile path updating filename of each flowfile to same name taking two flow files in respected putfile paths (invoice, QRBill) folders separately and placing them in respective folders using 2 put files. then after putfile  adding merge content(actual merging two files not happening here, but we are getting one single output) to get single flowfile and then in the execute. and then in the execute stream command for both inputs giving that same filename for respective folders.

 

Regards,

pradeep

 

 

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.