Remote command failed with exit status 126

2,511 views
Skip to first unread message

Csongor Gyuricza

unread,
Mar 16, 2015, 8:04:33 PM3/16/15
to rundeck...@googlegroups.com
Step type command works fine, but incline scripts fail with error "Remote command failed with exit status 126". Any ideas?

jeff mcdowell

unread,
Aug 10, 2015, 4:32:52 PM8/10/15
to rundeck-discuss
We recently installed rundeck, and are having the same issue on our hosts.
If we run a workflow step as a "command", there is no issue.

However, when we want some added complexity-- we may prefer to instead run a workflow item a script.
When we do, the execution fails with a message like the one below:
--------
bash: /tmp/4-70-myhost-dispatch-script.tmp.sh: Permission denied
Remote command failed with exit status 126
Failed: NonZeroResultCode: Remote command failed with exit status 126
--------

I first investigated this as a umask issue, but that doesn't seem to be it.
Shouldn't rundeck be smart enough to know that when it creates a /tmp script to execute remotely, it needs to enable execute permissions??

Thanks ahead of time for assistance!
Jeff

Adam Hamner

unread,
Jan 18, 2017, 2:42:58 PM1/18/17
to rundeck-discuss
For anyone who encounters this, please take a look at your mount options for /tmp. I found that /tmp was mounted with the noexec option which caused this exact error case. I have not fixed this issue yet but I imagine I'd be able to specify where inline script dispatches are dumped on the target hosts.

Alex Honor

unread,
Jan 18, 2017, 2:52:09 PM1/18/17
to rundeck...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "rundeck-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rundeck-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rundeck-discuss/dbcf8f99-fb8c-4d6e-a577-494da7b0e82d%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Alex Honor

[SimplifyOps, Inc | a...@simplifyops.com ]

Be sure to comment and vote on Rundeck Feature Development!

Niall Munnelly

unread,
Jan 18, 2017, 6:42:50 PM1/18/17
to rundeck-discuss
I can vouch for Adam Hamner and Alex's responses; noexec in /tmp seems to be the standard these days. Adding a line like this to the project.properties file will get you sorted:

project.file-copy-destination-dir=/var/lib/rundeck/var/tmp

(the destination dir needs to exist on the node)


On Wednesday, January 18, 2017 at 1:52:09 PM UTC-6, Alex Honor wrote:
On Wed, Jan 18, 2017 at 11:42 AM, Adam Hamner <adamha...@gmail.com> wrote:
For anyone who encounters this, please take a look at your mount options for /tmp. I found that /tmp was mounted with the noexec option which caused this exact error case. I have not fixed this issue yet but I imagine I'd be able to specify where inline script dispatches are dumped on the target hosts.

On Monday, August 10, 2015 at 1:32:52 PM UTC-7, jeff mcdowell wrote:
We recently installed rundeck, and are having the same issue on our hosts.
If we run a workflow step as a "command", there is no issue.

However, when we want some added complexity-- we may prefer to instead run a workflow item a script.
When we do, the execution fails with a message like the one below:
--------
bash: /tmp/4-70-myhost-dispatch-script.tmp.sh: Permission denied
Remote command failed with exit status 126
Failed: NonZeroResultCode: Remote command failed with exit status 126
--------

I first investigated this as a umask issue, but that doesn't seem to be it.
Shouldn't rundeck be smart enough to know that when it creates a /tmp script to execute remotely, it needs to enable execute permissions??

Thanks ahead of time for assistance!
Jeff



On Monday, March 16, 2015 at 7:04:33 PM UTC-5, Csongor Gyuricza wrote:
Step type command works fine, but incline scripts fail with error "Remote command failed with exit status 126". Any ideas?

--
You received this message because you are subscribed to the Google Groups "rundeck-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rundeck-discu...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages