<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Executing Shell script to a remote machine in NiFi in HDF in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Executing-Shell-script-to-a-remote-machine-in-NiFi-in-HDF/m-p/233155#M79926</link>
    <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/44497/raajmuthu.html" nodeid="44497" target="_blank"&gt;@Raj ji&lt;/A&gt;!&lt;BR /&gt;Not sure If I get you right, but if you need to call an sh from a remote machine, you can use remote process group and at that RPG, use ExecuteStreamCommand, here's an example. &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="77825-screen-shot-2018-06-26-at-134214.png" style="width: 1650px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/14779iD9526C65A3332033/image-size/medium?v=v2&amp;amp;px=400" role="button" title="77825-screen-shot-2018-06-26-at-134214.png" alt="77825-screen-shot-2018-06-26-at-134214.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;PS: to enable RPG, you'll need to configure site2site configs on Nifi, here's a documentation. &lt;BR /&gt;&lt;A href="https://docs.hortonworks.com/HDPDocuments/HDF3/HDF-3.1.1/bk_user-guide/content/configure-site-to-site-client-nifi-instance.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.hortonworks.com/HDPDocuments/HDF3/HDF-3.1.1/bk_user-guide/content/configure-site-to-site-client-nifi-instance.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Hope this helps!&lt;/P&gt;</description>
    <pubDate>Sun, 18 Aug 2019 00:18:52 GMT</pubDate>
    <dc:creator>vmurakami</dc:creator>
    <dc:date>2019-08-18T00:18:52Z</dc:date>
    <item>
      <title>Executing Shell script to a remote machine in NiFi in HDF</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Executing-Shell-script-to-a-remote-machine-in-NiFi-in-HDF/m-p/233154#M79925</link>
      <description>&lt;P&gt;I have 8 node cluster . NIFI is installed in only one cluster . &lt;STRONG&gt;i want to use a NiFi processor to trigger shell/python script on a remote machine .&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Example :&lt;/P&gt;&lt;P&gt; Machine 1 - Nifi Installed in Machine 1 &lt;/P&gt;&lt;P&gt;Machine 4 : Script has to be executed and files supporting the script is available in Machine 4(Script cannot be moved to Nifi node)&lt;/P&gt;&lt;P&gt;Please tell me &lt;/P&gt;&lt;P&gt;1.what processors should I use and how the flow should be . .&lt;/P&gt;&lt;P&gt;2.How to trigger Shell Script using Nifi on a remote machine . &lt;/P&gt;&lt;P&gt;3.How to Log the flow if possible in case of any error / failures and trigger a mail ( optional) i need this scenario for many use cases.&lt;/P&gt;&lt;P&gt;I have googled a lot , Execute script processor is having only ( Python,Ruby,grovvy etc..) not shell script in the list of options.&lt;/P&gt;&lt;P&gt;How to provide SSH username and key/password.&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/12415"&gt;@Shu&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2026 12:16:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Executing-Shell-script-to-a-remote-machine-in-NiFi-in-HDF/m-p/233154#M79925</guid>
      <dc:creator>raaj_muthu</dc:creator>
      <dc:date>2026-04-21T12:16:46Z</dc:date>
    </item>
    <item>
      <title>Re: Executing Shell script to a remote machine in NiFi in HDF</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Executing-Shell-script-to-a-remote-machine-in-NiFi-in-HDF/m-p/233155#M79926</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/44497/raajmuthu.html" nodeid="44497" target="_blank"&gt;@Raj ji&lt;/A&gt;!&lt;BR /&gt;Not sure If I get you right, but if you need to call an sh from a remote machine, you can use remote process group and at that RPG, use ExecuteStreamCommand, here's an example. &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="77825-screen-shot-2018-06-26-at-134214.png" style="width: 1650px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/14779iD9526C65A3332033/image-size/medium?v=v2&amp;amp;px=400" role="button" title="77825-screen-shot-2018-06-26-at-134214.png" alt="77825-screen-shot-2018-06-26-at-134214.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;PS: to enable RPG, you'll need to configure site2site configs on Nifi, here's a documentation. &lt;BR /&gt;&lt;A href="https://docs.hortonworks.com/HDPDocuments/HDF3/HDF-3.1.1/bk_user-guide/content/configure-site-to-site-client-nifi-instance.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.hortonworks.com/HDPDocuments/HDF3/HDF-3.1.1/bk_user-guide/content/configure-site-to-site-client-nifi-instance.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 00:18:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Executing-Shell-script-to-a-remote-machine-in-NiFi-in-HDF/m-p/233155#M79926</guid>
      <dc:creator>vmurakami</dc:creator>
      <dc:date>2019-08-18T00:18:52Z</dc:date>
    </item>
    <item>
      <title>Re: Executing Shell script to a remote machine in NiFi in HDF</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Executing-Shell-script-to-a-remote-machine-in-NiFi-in-HDF/m-p/233156#M79927</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/44497/raajmuthu.html" nodeid="44497" target="_blank"&gt;@Raj ji&lt;/A&gt;&lt;P&gt;You can use &lt;STRONG&gt;ExecuteProcess &lt;/STRONG&gt;(doesn't allow any incoming connections) (or) &lt;STRONG&gt;ExecuteStreamCommand &lt;/STRONG&gt;processors to trigger the shell script.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;ExecuteProcess configs:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="77828-executeprocess.png" style="width: 1543px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/14778iE42B477063CF3CA4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="77828-executeprocess.png" alt="77828-executeprocess.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;As your executable script is on Machine 4 and NiFi installed on Machine1 so create a shell script on Machine 1 which &lt;STRONG&gt;ssh into Machine 4 and trigger your Python Script.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Refer to &lt;A href="https://unix.stackexchange.com/questions/31071/shell-script-for-logging-into-a-ssh-server" target="_blank" rel="nofollow noopener noreferrer"&gt;this&lt;/A&gt; and &lt;A href="https://stackoverflow.com/questions/12202587/automatically-enter-ssh-password-with-script" target="_blank" rel="nofollow noopener noreferrer"&gt;this&lt;/A&gt; links describes how to use username/password while doing ssh to remote machine.&lt;/P&gt;&lt;P&gt;As you are going to store the logs into a file, so you can use Tail file processor to tail the log file and check is there any ERROR/WARN, by using RouteText Processor then trigger mail.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(or)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Fetch the application id (or) application name of the process and then use yarn rest api to get the status of the job&lt;/P&gt;&lt;P&gt;Please refer to &lt;A href="https://community.hortonworks.com/articles/42995/yarn-application-monitoring-with-nifi.html" target="_blank" rel="nofollow noopener noreferrer"&gt;how to monitor yarn applications using NiFi&lt;/A&gt; and &lt;A href="https://community.hortonworks.com/articles/28070/starting-spark-jobs-directly-via-yarn-rest-api.html" target="_blank" rel="nofollow noopener noreferrer"&gt;Starting Spark jobs directly via YARN REST API&lt;/A&gt; and &lt;A href="https://hadoop.apache.org/docs/r2.7.4/hadoop-yarn/hadoop-yarn-site/ResourceManagerRest.html" target="_blank" rel="nofollow noopener noreferrer"&gt;this&lt;/A&gt; link describes yarn rest api capabilities.&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 00:18:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Executing-Shell-script-to-a-remote-machine-in-NiFi-in-HDF/m-p/233156#M79927</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2019-08-18T00:18:44Z</dc:date>
    </item>
  </channel>
</rss>

