2
votes

I am trying simple ssh job using Cloudera oozie.

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>

When tried to run job using following command:

oozie job -oozie http://localhost:11000/oozie -config examples/apps/ssh/job.properties -run

The job gets SUSPENDED with following error:

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).

What is the possible issue? The passwordless login in enabled for localhost.

1
Passwordless login is enabled for which user? oozie or cloudera? - franklinsijo
for user cloudera - Atish

1 Answers

1
votes

Oozie server will run the SSH as oozie user to run the ssh as. The targeted user at the remote will be as per the config i.e., cloudera.

Enable password-less login for oozie user. Create SSH keys for oozie user and copy its public key to the authorized_keys of cloudera user.