Created on 05-07-2018 03:03 AM - edited 09-16-2022 06:11 AM
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.
Below are the workflow.xml
<workflow-app name="oracle_log" xmlns="uri:oozie:workflow:0.4"> <start to="scp_copy"/> <action name="scp_copy"> <shell xmlns="uri:oozie:shell-action:0.1"> <job-tracker>${jobTracker}</job-tracker> <name-node>${nameNode}</name-node> <exec>bin/scp-hadoop.sh</exec> <env-var>HADOOP_USER_NAME=${wf:user()}</env-var> <file>bin/scp-hadoop.sh#scp-hadoop.sh</file> </shell> <ok to="end"/> <error to="kill"/> </action> <kill name="kill"> <message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message> </kill> <end name="end"/> </workflow-app>
scp-hadoop.sh
hadoop fs -mkdir /user/{user_name}/dd scp -r user@xxx:/data/input/ddd.txt /home/{user_name}/
First line in the scp-hadoop.sh--> It successfully creates the directory with the same user the worflow the submit.
But the second line always communicates to remote machine with Yarn user..
Why It communicating as YARN user to the remote instead the user which i pass in
HADOOP_USER_NAME=${wf:user()}
Please kindly help me.
Created 05-17-2018 01:05 AM
Created 05-17-2018 01:05 AM
Created on 08-08-2018 09:59 PM - edited 08-08-2018 11:43 PM
Hi Harsh,
I tried chaning the property yarn.nodemanager.linux-container-executor.nonsecure-mode.limit-users to false under 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.
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?
Any workarounds?
Thanks,
Mahesh.
Created 11-18-2018 04:48 PM