Support Questions

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

ExecuteStreamCommand requires file in all machines



i have two node nifi cluster and i have a scenario that i need to run the bash script to connect to database. now file is available in one machine and when i run this it returns error like cannot run program./ (in directory /home/nifi/test/) no such file or directory.

i created test directory in all two machines under /home/nifi and i have enough permissions.
now i created file in one of the nifi instance(non primary node) and gave 777 permission.

my flow:

generateflowfile(allnodes) --> executestreamcommand

i tried like create file only in primary node and set run on primary node only in generatedataflow it works fine.

but i need to workout this as generateflowfile(allnodes).

any help would be appreciated.

@Shu @Matt Burgess @Timothy Spann



Master Guru

@Satish Karuturi

This is an expected behaviour from ExecuteStreamCommand processor and best practice is to place shell script file on all nodes of NiFi cluster.

As you are having 2 node nifi cluster and we are not able to control which will be primary node and ExecuteStreamCommand processor will run only on primary node.

In case of primary node changes nifi will pick the shell script from the active primary node and continue to execute the script without any issues..!

In addition you can also use ExecuteProcess processor to execute Shell script in NiFi.