Remote Execution Jobs using non-root user are failing with Error "Failed to initialize: Dynflow::ExecutionPlan::Steps::Error - Job execution failed"
Environment
- Red Hat Satellite 6
Issue
-
When running a remote execution job to execute a Command using a non-root user, the job is failing with Error " StandardError Job execution failed "
Failed to initialize: Dynflow::ExecutionPlan::Steps::Error - Job execution failed -
SSH connection is working fine from the Satellite Server to Content Host using non-root user, but remote execution is not able to execute a job.
Resolution
-
Change the permissions of the remote working directory mentioned in "/etc/foreman-proxy/settings.d/remote_execution_ssh.yml" file.
# ls -ld /var/tmp -
Create a new directory e.g. /remotedir and set the value of remote working directory in "/etc/foreman-proxy/settings.d/remote_execution_ssh.yml" file to the new directory as shown below:
:enabled: https :ssh_identity_key_file: /usr/share/foreman-proxy/.ssh/id_rsa_foreman_proxy :local_working_dir: /var/tmp :remote_working_dir: /remotedir <<<<<<<<<<<< Change this directory location as per client system settings -
Restart the satellite services to reflect this change:
# satellite-maintain service restart
For more KB articles/solutions related to Red Hat Satellite 6.x Remote Execution Issues, please refer to the Red Hat Satellite Consolidated Troubleshooting Article for Red Hat Satellite 6.x Remote Execution Issues
Root Cause
- Non-root user doesn't have the permission to create a directory under '/var/tmp', and hence was not able to initiate the job.
Diagnostic Steps
-
Check the log file /var/log/foreman-proxy/smart_proxy_dynflow_core.log .
[2018-09-13 04:28:10.140 #1259] ERROR -- dynflow: error while initalizing command RuntimeError Unable to create directory on remote system /var/tmp/foreman-ssh-cmd-76880f8f-b14d-4398-978d-99105be20405: exit code: 1 mkdir: cannot create directory ‘/var/tmp’: Permission denied
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.