Oozie SSH操作 [英] Oozie SSH Action

查看:217
本文介绍了Oozie SSH操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Oozie SSH行动问题:



问题:
我们正尝试在我们的特定主机上运行少量命令簇。我们同样选择了SSH Action。一段时间以来,我们一直面临着这个SSH问题。这里真正的问题是什么?请指向我的解决方案。



logs:



AUTH_FAILED:执行操作[ssh -o PasswordAuthentication = no -o KbdInteractiveDevices = no -o StrictHostKeyChecking = no -o ConnectTimeout = 20 USER@1.2.3.4 mkdir -p oozie-oozi / 0000000-131008185935754-oozie-oozi -W / action1-- ssh /] | ErrorStream:警告:永久添加主机,1.2.3.4(RSA)到已知主机列表。权限被拒绝(publickey,gssapi-keyex,gssapi-with-mic,密码)。



org.apache.oozie.action.ActionExecutorException:AUTH_FAILED:无法执行操作[ssh -o PasswordAuthentication = no -o KbdInteractiveDevices = no -o StrictHostKeyChecking = no - ConnectTimeout = 20 user@1.2.3.4 mkdir -p oozie-oozi / 0000000-131008185935754-oozie-oozi -W / action1-ssh /] | ErrorStream:警告:将1.2.3.4,192.168.34.208(RSA)永久添加到已知主机的列表中。
Permission denied(publickey,gssapi-keyex,gssapi-with-mic,password)。

  at org.apache .oozie.action.ssh.SshActionExecutor.execute(SshActionExecutor.java:589)
at org.apache.oozie.action.ssh.SshActionExecutor.start(SshActionExecutor.java:204)
at org.apache .oozie.command.wf.ActionStartXCommand.execute(ActionStartXCommand.java:211)
at org.apache.oozie.command.wf.ActionStartXCommand.execute(ActionStartXCommand.java:59)
at org.apache .oozie.command.XCommand.call(XCommand.java:277)
at org.apache.oozie.service.CallableQueueService $ CompositeCallable.call(CallableQueueService.java:326)
at org.apache.oozie .service.CallableQueueService $ CompositeCallable.call(CallableQueueService.java:255)
at org.apache.oozie.service.CallableQueueService $ CallableWrapper.run(CallableQueueService.java:175)
at java.util.concurrent .ThreadPoolExecutor $ Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor $ Worker.run(T hreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)


$ b $由于java.io.IOException:无法执行操作[ssh -o PasswordAuthentication = no -o KbdInteractiveDevices = no -o StrictHostKeyChecking = no -o ConnectTimeout = 20 user@1.2.3.4 mkdir -p oozie- oozi / 0000000-131008185935754-oozie-oozi-W / action1 - ssh /] | ErrorStream:警告:将1.2.3.4,1.2.3.4(RSA)永久添加到已知主机列表中。
Permission denied(publickey,gssapi-keyex,gssapi-with-mic,password)。

  at org.apache .oozie.action.ssh.SshActionExecutor.executeCommand(SshActionExecutor.java:340)
at org.apache.oozie.action.ssh.SshActionExecutor.setupRemote(SshActionExecutor.java:373)
at org.apache .oozie.action.ssh.SshActionExecutor $ 1.call(SshActionExecutor.java:206)
at org.apache.oozie.action.ssh.SshActionExecutor $ 1.call(SshActionExecutor.java:204)
at org .apache.oozie.action.ssh.SshActionExecutor.execute(SshActionExecutor.java:547)
... 10 more



WARNING org.apache.oozie.command.wf.ActionStartXCommand:USER [user] GROUP [ - ] TOKEN [] APP [Test] JOB [0000000-131008185935754 -oozie-oozi-W] ACTION [0000000-131008185935754-oozie-oozi-W @ action1]暂停工作流作业ID = 0000000-131008185935754-oozie-oozi-W
2013-10-09 12:48:27,204 WARN org.apache.oozie.command.coord.CoordActionUpdateXCommand:USER [user] GROUP [ - ] TOKEN [] APP [Test] JOB [0000000-131008185935754-oozie-oozi-W]动作[0000000-131008185935754-oozie-oozi-W @ action1] E1100:命令前置条件在执行前不成立,[,coord动作为空],错误码:E1100
2013-10-09 12:59:57,477 INFO org.apache.oozie.command.wf.KillXCommand:USER [user] GROUP [ - ] TOKEN [] APP [Test] JOB [0000000-131008185935754- oozie-oozi-W] ACTION [ - ]启动WorkflowKillXCommand for jobId = 0000000-131008185935754-oozie-oozi-W
2013-10-09 12:59:57,685 WARN org.apache.oozie.command.coord.CoordActionUpdateXCommand :USER [用户] GROUP [ - ] TOKEN [] APP [测试] JOB [0000000-131008185935754-oozie-oozi-W] ACTION [ - ] E1100:命令前置条件在执行前不成立,[,coord动作为空],错误代码:E1100
2013-10-09 12:59:57,686 INFO org.apache.oozie.command.wf.KillXCommand:USER [user] GROUP [ - ] TOKEN [] APP [Test] JOB [0000000- 131008185935754-oozie-oozi-W] ACTION [ - ] ENDED WorkflowKillXCommand for jobId = 0000000-131008185935754-oozie-oozi-W
2013-10-09 13:41: 32,654 WARN org.apache.oozie.command.wf.KillXCommand:USER [user] GROUP [ - ] TOKEN [] APP [Test] JOB [0000000-131008185935754-oozie-oozi-W]操作[ - ] E0725:工作流实例可以不会被杀死,0000000-131008185935754-oozie-oozi-W,错误代码:E0725
2013-10-09 13:41:45,199 WARN org.apache.oozie.command.wf.KillXCommand:USER [user] GROUP [ - ] TOKEN [] APP [测试] JOB [0000000-131008185935754-oozie-oozi-W]操作[ - ] E0725:工作流实例无法被杀死,0000000-131008185935754-oozie-oozi-W,错误代码:E0725
2013-10-09 13:42:04,869 WARN org.apache.oozie.command.wf.ResumeXCommand:USER [user] GROUP [ - ] TOKEN [] APP [Test] JOB [0000000-131008185935754-oozie-oozi -W] ACTION [ - ] E1100:命令前置条件在执行之前不成立,[工作流的状态为KILLED不是挂起],错误代码:E1100
WARNING org.apache。 oozie.command.wf.KillXCommand:USER [用户] GROUP [ - ] TOKEN [] APP [Test]作业[0000000-131008185935754-oozie-oozi-W]作业[ - ] E0725:工作流程实例可以不会被杀,0000000-131008185935754-oozie-oozi-W,错误代码:E0725



接近尝试过:


  1. 无密码SSH集

  2. 用户代理集

  3. 文件夹

谢谢;

Kasa。

解决方案

我刚碰到类似的问题。我有一个我可以作为USER运行的例子:

  ssh -o PasswordAuthentication = no -o KbdInteractiveDevices = no -o StrictHostKeyChecking = no -o ConnectTimeout = 20 USER@1.2.3.4 mkdir -p oozie-oozi / 0000000-131008185935754-oozie-oozi -W / action1 -ssh / 

手动在命令行上运行,但是当通过Oozie以USER身份启动时,它失败了。

在我的情况下,失败的是我在oozie服务器上的USER和远程机器上的USER之间设置了无密码ssh。需要做的是在oozie服务器上的oozie和远程机器上的USER之间设置无密码ssh。换句话说,su在oozie服务器上进行操作并手动运行上述命令。如果失败,它将在Oozie中失败。如果有效,那么它应该在Oozie中工作(假设所有其他都是正确的,比如dir权限等)。

看看你的oozie服务器运行的是什么用户as:

  ps -ef | grep oozie 

无论用户在远程计算机上需要使用无密码ssh还是USER。


Oozie SSH Action Issue:

Issue: We are trying to run few commands on a particular host machine of our cluster. We chose SSH Action for the same. We have been facing this SSH issue for some time now. What might be the real issue here? Please point me towards the solution.

logs:

AUTH_FAILED: Not able to perform operation [ssh -o PasswordAuthentication=no -o KbdInteractiveDevices=no -o StrictHostKeyChecking=no -o ConnectTimeout=20 USER@1.2.3.4 mkdir -p oozie-oozi/0000000-131008185935754-oozie-oozi-W/action1--ssh/ ] | ErrorStream: Warning: Permanently added host,1.2.3.4 (RSA) to the list of known hosts. Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).

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 user@1.2.3.4 mkdir -p oozie-oozi/0000000-131008185935754-oozie-oozi-W/action1--ssh/ ] | ErrorStream: Warning: Permanently added 1.2.3.4,192.168.34.208 (RSA) to the list of known hosts. Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).

at org.apache.oozie.action.ssh.SshActionExecutor.execute(SshActionExecutor.java:589)
at org.apache.oozie.action.ssh.SshActionExecutor.start(SshActionExecutor.java:204)
at org.apache.oozie.command.wf.ActionStartXCommand.execute(ActionStartXCommand.java:211)
at org.apache.oozie.command.wf.ActionStartXCommand.execute(ActionStartXCommand.java:59)
at org.apache.oozie.command.XCommand.call(XCommand.java:277)
at org.apache.oozie.service.CallableQueueService$CompositeCallable.call(CallableQueueService.java:326)
at org.apache.oozie.service.CallableQueueService$CompositeCallable.call(CallableQueueService.java:255)
at org.apache.oozie.service.CallableQueueService$CallableWrapper.run(CallableQueueService.java:175)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

Caused by: java.io.IOException: Not able to perform operation [ssh -o PasswordAuthentication=no -o KbdInteractiveDevices=no -o StrictHostKeyChecking=no -o ConnectTimeout=20 user@1.2.3.4 mkdir -p oozie-oozi/0000000-131008185935754-oozie-oozi-W/action1--ssh/ ] | ErrorStream: Warning: Permanently added '1.2.3.4,1.2.3.4' (RSA) to the list of known hosts. Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).

at org.apache.oozie.action.ssh.SshActionExecutor.executeCommand(SshActionExecutor.java:340)
at org.apache.oozie.action.ssh.SshActionExecutor.setupRemote(SshActionExecutor.java:373)
at org.apache.oozie.action.ssh.SshActionExecutor$1.call(SshActionExecutor.java:206)
at org.apache.oozie.action.ssh.SshActionExecutor$1.call(SshActionExecutor.java:204)
at org.apache.oozie.action.ssh.SshActionExecutor.execute(SshActionExecutor.java:547)
... 10 more

2013-10-09 12:48:25,982 WARN org.apache.oozie.command.wf.ActionStartXCommand: USER[user] GROUP[-] TOKEN[] APP[Test] JOB[0000000-131008185935754-oozie-oozi-W] ACTION[0000000-131008185935754-oozie-oozi-W@action1] Suspending Workflow Job id=0000000-131008185935754-oozie-oozi-W 2013-10-09 12:48:27,204 WARN org.apache.oozie.command.coord.CoordActionUpdateXCommand: USER[user] GROUP[-] TOKEN[] APP[Test] JOB[0000000-131008185935754-oozie-oozi-W] ACTION[0000000-131008185935754-oozie-oozi-W@action1] E1100: Command precondition does not hold before execution, [, coord action is null], Error Code: E1100 2013-10-09 12:59:57,477 INFO org.apache.oozie.command.wf.KillXCommand: USER[user] GROUP[-] TOKEN[] APP[Test] JOB[0000000-131008185935754-oozie-oozi-W] ACTION[-] STARTED WorkflowKillXCommand for jobId=0000000-131008185935754-oozie-oozi-W 2013-10-09 12:59:57,685 WARN org.apache.oozie.command.coord.CoordActionUpdateXCommand: USER[user] GROUP[-] TOKEN[] APP[Test] JOB[0000000-131008185935754-oozie-oozi-W] ACTION[-] E1100: Command precondition does not hold before execution, [, coord action is null], Error Code: E1100 2013-10-09 12:59:57,686 INFO org.apache.oozie.command.wf.KillXCommand: USER[user] GROUP[-] TOKEN[] APP[Test] JOB[0000000-131008185935754-oozie-oozi-W] ACTION[-] ENDED WorkflowKillXCommand for jobId=0000000-131008185935754-oozie-oozi-W 2013-10-09 13:41:32,654 WARN org.apache.oozie.command.wf.KillXCommand: USER[user] GROUP[-] TOKEN[] APP[Test] JOB[0000000-131008185935754-oozie-oozi-W] ACTION[-] E0725: Workflow instance can not be killed, 0000000-131008185935754-oozie-oozi-W, Error Code: E0725 2013-10-09 13:41:45,199 WARN org.apache.oozie.command.wf.KillXCommand: USER[user] GROUP[-] TOKEN[] APP[Test] JOB[0000000-131008185935754-oozie-oozi-W] ACTION[-] E0725: Workflow instance can not be killed, 0000000-131008185935754-oozie-oozi-W, Error Code: E0725 2013-10-09 13:42:04,869 WARN org.apache.oozie.command.wf.ResumeXCommand: USER[user] GROUP[-] TOKEN[] APP[Test] JOB[0000000-131008185935754-oozie-oozi-W] ACTION[-] E1100: Command precondition does not hold before execution, [workflow's status is KILLED is not SUSPENDED], Error Code: E1100 2013-10-09 13:45:56,357 WARN org.apache.oozie.command.wf.KillXCommand: USER[user] GROUP[-] TOKEN[] APP[Test] JOB[0000000-131008185935754-oozie-oozi-W] ACTION[-] E0725: Workflow instance can not be killed, 0000000-131008185935754-oozie-oozi-W, Error Code: E0725

Approached tried:

  1. Password-less SSH set
  2. User proxies set
  3. Giving permissions to the required folders

Thanks;

Kasa.

解决方案

I just hit a similar problem. I had a case where I could run as USER:

ssh -o PasswordAuthentication=no -o KbdInteractiveDevices=no -o StrictHostKeyChecking=no -o ConnectTimeout=20 USER@1.2.3.4 mkdir -p oozie-oozi/0000000-131008185935754-oozie-oozi-W/action1--ssh/

by hand on the command line and it worked, but when launched via Oozie as USER it failed.

The reason, in my case, it failed is that I set up passwordless ssh between USER on the oozie server and USER on the remote machine. What one needs to do is set up passwordless ssh between oozie on the oozie server and USER on the remote machine. In other words, su to oozie on the oozie server and run the above command by hand. If it fails, it will fail in Oozie. If it works, then it should work in Oozie (assuming all else is correct, like dir permissions, etc.)

Take a look at what user your oozie server is running as:

ps -ef | grep oozie

Whatever user that is needs passwordless ssh to USER on the remote machine.

这篇关于Oozie SSH操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆