【问题】添加workflow,拖拽一个ssh,user and host填写[email protected],ssh command填写一个最简单的ll命令,保存,submit,报错:
Caused by: java.io.IOException: Not able to perform operation [ssh -o PasswordAuthentication=no -o KbdInteractiveDevices=no -o StrictHostKeyChecking=no -o ConnectTimeout=20 [email protected] mkdir -p oozie-oozioozie/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in oozie/.ssh/id_dsa.pub.
$cat USER/.ssh/authorized_keys
将cat的内容贴进去
(2)在其他机器上
因为oozie server只配置了一个实例,所以其他机器$vi passwd,显示
oozie:x:*:*:Oozie User:/*/oozie:/bin/false
其中的/bin/false是最严格的禁止login选项,一切服务都不能用,需要修改为/bin/bash
等到配置好oozie的免密登陆后再改回/bin/false
【贴士二】
访问http://oozie.apache.org/docs/4.1.0/DG_SshActionExtension.html,发现官方文档中有一句话:
The oozie.action.ssh.allow.user.at.host property, in the oozie-site.xml configuration, indicates if an alternate user than the one submitting the job can be used for the ssh invocation. By default this property is set tot true .
进入cloudera manager,进入oozie服务,点击配置,搜索oozie-site.xml,点击加号,名称oozie.action.ssh.allow.user.at.host,值false
这样用除了USER之外的其他用户登陆hue,并提交用户为USER的ssh workflow时,点击submit的时候,发现会报错:
org.apache.oozie.action.ActionExecutorException: user mismatch between oozie user [oozie] and ssh host [[email protected]]