<?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: OOzie shell action-scp with user in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/OOzie-shell-action-scp-with-user/m-p/78287#M77986</link>
    <description>&lt;P&gt;Hi Harsh,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried chaning the property&amp;nbsp;yarn.nodemanager.linux-container-executor.nonsecure-mode.limit-users to false under&amp;nbsp;&lt;SPAN&gt;YARN Client Advanced Configuration Snippet (Safety Valve) for yarn-site.xml setting in cloudera manager and i had restarted the service. Desipte that i am getting the permission issue error.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I had also changed the setting yarn.nodemanager.linux-container-executor.nonsecure-mode.local-user to the concerned user other than yarn. Still i am getting the error?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any workarounds?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Mahesh.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 09 Aug 2018 06:43:48 GMT</pubDate>
    <dc:creator>maheshns</dc:creator>
    <dc:date>2018-08-09T06:43:48Z</dc:date>
    <item>
      <title>OOzie shell action-scp with user</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/OOzie-shell-action-scp-with-user/m-p/67007#M77984</link>
      <description>&lt;P&gt;In oozie shell action I have written code to copy the files from remote server using scp command and I have enabled the password less access to remote server to the user who submit the workflow.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below are the workflow.xml&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&amp;lt;workflow-app name="oracle_log" xmlns="uri:oozie:workflow:0.4"&amp;gt;
&amp;lt;start to="scp_copy"/&amp;gt;
&amp;lt;action name="scp_copy"&amp;gt;
&amp;lt;shell xmlns="uri:oozie:shell-action:0.1"&amp;gt;
&amp;lt;job-tracker&amp;gt;${jobTracker}&amp;lt;/job-tracker&amp;gt;
&amp;lt;name-node&amp;gt;${nameNode}&amp;lt;/name-node&amp;gt;
&amp;lt;exec&amp;gt;bin/scp-hadoop.sh&amp;lt;/exec&amp;gt;
&amp;lt;env-var&amp;gt;HADOOP_USER_NAME=${wf:user()}&amp;lt;/env-var&amp;gt;
&amp;lt;file&amp;gt;bin/scp-hadoop.sh#scp-hadoop.sh&amp;lt;/file&amp;gt;
&amp;lt;/shell&amp;gt;
&amp;lt;ok to="end"/&amp;gt;
&amp;lt;error to="kill"/&amp;gt;
&amp;lt;/action&amp;gt;
&amp;lt;kill name="kill"&amp;gt;
&amp;lt;message&amp;gt;Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]&amp;lt;/message&amp;gt;
&amp;lt;/kill&amp;gt;
&amp;lt;end name="end"/&amp;gt;
&amp;lt;/workflow-app&amp;gt;&lt;/PRE&gt;
&lt;P&gt;scp-hadoop.sh&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;hadoop fs -mkdir /user/{user_name}/dd
scp -r user@xxx:/data/input/ddd.txt /home/{user_name}/&lt;/PRE&gt;
&lt;P&gt;First line in the scp-hadoop.sh--&amp;gt; It successfully creates the directory with the same user the worflow the submit.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But the second line always communicates to remote machine with&amp;nbsp; Yarn user..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why It&amp;nbsp;communicating&amp;nbsp;as YARN user to the remote instead the user which i pass in&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;HADOOP_USER_NAME=${wf:user()}&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please kindly help me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 13:11:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/OOzie-shell-action-scp-with-user/m-p/67007#M77984</guid>
      <dc:creator>ganeshkumarj</dc:creator>
      <dc:date>2022-09-16T13:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: OOzie shell action-scp with user</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/OOzie-shell-action-scp-with-user/m-p/67381#M77985</link>
      <description>In unsecured mode, all YARN container processes execute as the Linux local user "yarn". This cannot be changed unless you either enable Kerberos based security or explicitly turn on the LinuxContainerExecutor [1], which will also require ensuring that local Linux accounts exist for all job submitting user.&lt;BR /&gt;&lt;BR /&gt;The HADOOP_USER_NAME value affects only 'hadoop' and other related Apache Hadoop/Ecosystem commands. Since the 'scp' program is not a Hadoop program, it does not get influenced by the username carried by that variable. It instead runs as the linux user that runs the shell script - which is "yarn" due to the above.&lt;BR /&gt;&lt;BR /&gt;[1] - &lt;A href="https://www.cloudera.com/documentation/enterprise/latest/topics/cdh_sg_other_hadoop_security.html#topic_18_3" target="_blank"&gt;https://www.cloudera.com/documentation/enterprise/latest/topics/cdh_sg_other_hadoop_security.html#topic_18_3&lt;/A&gt; and 'Always Use Linux Container Executor' under CM -&amp;gt; YARN -&amp;gt; Configuration</description>
      <pubDate>Thu, 17 May 2018 08:05:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/OOzie-shell-action-scp-with-user/m-p/67381#M77985</guid>
      <dc:creator>Harsh J</dc:creator>
      <dc:date>2018-05-17T08:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: OOzie shell action-scp with user</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/OOzie-shell-action-scp-with-user/m-p/78287#M77986</link>
      <description>&lt;P&gt;Hi Harsh,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried chaning the property&amp;nbsp;yarn.nodemanager.linux-container-executor.nonsecure-mode.limit-users to false under&amp;nbsp;&lt;SPAN&gt;YARN Client Advanced Configuration Snippet (Safety Valve) for yarn-site.xml setting in cloudera manager and i had restarted the service. Desipte that i am getting the permission issue error.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I had also changed the setting yarn.nodemanager.linux-container-executor.nonsecure-mode.local-user to the concerned user other than yarn. Still i am getting the error?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any workarounds?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Mahesh.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2018 06:43:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/OOzie-shell-action-scp-with-user/m-p/78287#M77986</guid>
      <dc:creator>maheshns</dc:creator>
      <dc:date>2018-08-09T06:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: OOzie shell action-scp with user</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/OOzie-shell-action-scp-with-user/m-p/82538#M77987</link>
      <description>Have you found any way to run YARN container as the user who'is launched it? I also have set these two and have all the nodes sync with LDAP, still runs as nobody despite the fact I can see it says the yarn user request is ...&lt;BR /&gt;</description>
      <pubDate>Mon, 19 Nov 2018 00:48:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/OOzie-shell-action-scp-with-user/m-p/82538#M77987</guid>
      <dc:creator>maziyar</dc:creator>
      <dc:date>2018-11-19T00:48:33Z</dc:date>
    </item>
  </channel>
</rss>

