- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Nifi execute streamcommand Failed to write flow file to stdin due to broken pipe:java.io.IOException:Broken pipe
- Labels:
-
Apache NiFi
Created on 12-13-2022 08:03 AM - edited 12-13-2022 09:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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:
Could you please help me on this?
Created 12-17-2022 10:54 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Created 12-17-2022 10:54 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
