Troubleshooting Runbook Automation
Learn how to isolate and resolve problems with Runbook Automation.
- SSH action output shows "Permission denied" error
- SSH automation action output for PowerShell shows garbled multi-byte characters
- Runbook approval request not visible
SSH action output shows "Permission denied" error
Symptom: When attempting to run an SSH action script on some Linux target system, an error such as bash: /tmp/tmp.gXO9WCs7Zy: Permission denied
is displayed in the script output area.
Cause: In order to run an SSH script on a Linux target system, Runbook Automation writes a temporary script file to the /tmp
directory of the target system, and executes it from there. So the user on the target
system that is configured to run the SSH script remotely does not only need to have write access to the /tmp
directory , but also the /tmp
directory itself must not be mounted with the noexec
property.
Solution: Mount the /tmp
directory without the noexec
property, and verify that scripts can be run from within /tmp
. Then retry running the SSH action.
If using the /tmp
directory with write and execute access is prohibited in your organization then you can configure mktemp
to use a different directory, for example, by generally setting the target system user's TMPDIR
environment variable to an alternative directory path. See Creating an SSH integration for more details on the requirements for target systems of SSH connections.
SSH automation action output for PowerShell shows garbled multi-byte characters
Symptom: When running a PowerShell script on a Windows target system that is expected to print multi-byte or other non-ASCII characters, these characters are not properly displayed. Instead, these characters are replaced with question marks.
Cause: Runbook Automation expects the script output to be returned in UTF-8 format, but PowerShell is not configured to use UTF-8 as the default console output encoding.
Solution: Add an instruction to your PowerShell script code to set the console output encoding to UTF-8. For example, start your script with the following command:
$OutputEncoding = [Console]::OutputEncoding = [Text.UTF8Encoding]::UTF8
See the Microsoft documentation for more details on character encoding in PowerShell.
Runbook approval request not visible
Symptom: When the approval flow is enabled, and a runbook has been previously published, then a new request for approval for an updated draft of the runbook is not visible in the runbook library table. The expected approval status is "Approval pending". Instead, the runbook continues to be marked as "Approved".
Cause: The runbook library table displays the data from the last published version of the runbook, or from the draft runbook if it has never been published before. Therefore, approval requests for new draft runbooks are visible, but not for runbooks that have been previously published.
Solution: As author of the change, notify the approver which runbook needs to be reviewed and approved. As approver, open the runbook in "edit" or "preview" mode to see the latest changes. Directly communicate with the author if changes are needed. Once the runbook is ready to be published, disable the approval flow temporarily, and publish the runbook.