Support Questions

Find answers, ask questions, and share your expertise
Celebrating as our community reaches 100,000 members! Thank you!

apache nifi executestreamcommand issue with using rsync




we recently started evaluating apache nifi for our use cases.


Here is one of such sample pipe line that we have constructed


we have two processed one is Getfile which checks for files present in a local folder. Once they are available it sends them to the execute stream command. 



execute stream command we want to send file that we received from getfile step to a remote linux server. The destination linux server doesn't have an FTP server hence cant use putFTP. This is the command I want to execute to transfer the file

sshpass -p '123' rsync -avz -e ssh --ignore-existing "${filename}" test@


Here is the configuration for execute stream command


 log file


Any help would be greatly appreciated.




Lakshmi Tharun.



Community Manager

@LakshmiTharun, Welcome to our community! To help you get the best possible answer, I have tagged in our NiFi experts @cotopaul @SAMSAL @MattWho @steven-matison @TimothySpann who may be able to assist you further.

Please feel free to provide any additional information or details about your query, and we hope that you will find a satisfactory solution to your question.


Vidya Sargur,
Community Manager

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:

Master Guru

put your command in a shell script named and make sure NiFi has execute permissions.  rsync can be very slow so make sure you have a long timeout on the command.   i have seen rsync take 5 minutes to 20 hours.


can we not do it using the way I have done by configuring the properties in executestreamcommand.

Is there a way that I can see the log or else the complete scipt Nifi is trying to execute. This is the complete script that I want to execute

sshpass -p '123' rsync -avz -e ssh --ignore-existing /test.pdf test@

Master Guru

it's very hard to format a long call like that without wrapping it.   also you will need to fully list out directories so not /test.pdf but /the/actual/location/even/if/it/s/giant/test.pdf.  it may work.   you may also need to do /usr/bin/sshpass.   it is always easier to just write a simple with the text in it, make it executable and test it.    also make sure nifi user has permissions to sshpass and if you are running on a cluster that all machines have that binary and have permissions