我正在尝试使用Cloudera oozie进行简单的ssh工作。
job.properties :
nameNode=hdfs://localhost:8020
jobTracker=localhost:8032
queueName=default
examplesRoot=examples
oozie.wf.application.path=${nameNode}/user/${user.name}/${examplesRoot}/apps/ssh
workflow.xml :
<workflow-app xmlns="uri:oozie:workflow:0.2" name="ssh-wf">
<start to="ssh"/>
<action name="ssh">
<ssh xmlns="uri:oozie:ssh-action:0.1">
<host>localhost</host>
<command>date</command>
</ssh>
<ok to="end"/>
<error to="fail"/>
</action>
<kill name="fail">
<message>SSH action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>
<end name="end"/>
</workflow-app>
尝试使用以下命令运行作业时:
oozie job -oozie http://localhost:11000/oozie -config examples/apps/ssh/job.properties -run
作业因以下错误而被暂停:
org.apache.oozie.action.ActionExecutorException: AUTH_FAILED: Not able to perform operation [ssh -o PasswordAuthentication=no -o KbdInteractiveDevices=no -o StrictHostKeyChecking=no -o ConnectTimeout=20 cloudera@localhost mkdir -p oozie-oozi/0000003-170304124323783-oozie-oozi-W/ssh--ssh/ ] | ErrorStream: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
可能的问题是什么?已为localhost启用无密码登录。
答案 0 :(得分:1)
Oozie服务器将以oozie
用户身份运行SSH以运行ssh as。远程的目标用户将按照配置,即cloudera
。
为oozie
用户启用无密码登录。为oozie
用户创建SSH密钥,并将其公钥复制到authorized_keys
用户的cloudera
。