Debugging scp errors on Jobs with scripts:- e.g. "scp: ambiguous target"

406 views
Skip to first unread message

Dave Carey

unread,
May 4, 2012, 6:10:14 AM5/4/12
to rundeck-discuss
Hi all

I'm having an issues determining the cause of a failure of a job which
is using an inline script as part of a workstep.

In my case the issue is an error in the job log as follows:-
"Caused by: server indicated an error: scp: ambiguous target"

I've stripped my script down so that its no more than an echo and I've
run adhoc commands against the same node filter without issue.

This has led me to believe that it might be an issue with the name of
the temporary file that Rundeck was generating for an inline script
( Not scientific but based on anecdotal evidence of similar issues)

I used verbose mode on the job log in an attempt to prove this theory.
However the log does not give me any indication of the actual scp
command that rundeck is generating.
I get a stacktrace terminating in the cause above, but am none the
wiser

Could anybody advise me how I might determine the scp command being
issues and perhaps the cause
(I'm running Rundeck 1.4.2.1 and Red-Hat Linux)

thanks
Dave

Moses Lei

unread,
May 4, 2012, 2:14:41 PM5/4/12
to rundeck...@googlegroups.com
Dave, you might try the script execution file copier plugin:


You could use a simple script to echo out what RunDeck is naming the destination file.

Moses

--
Moses Lei
[ Professional Services | DTO Solutions, Inc. ]
[ mobile: +1 703.901.5969 | e-mail: ml...@dtosolutions.com | aim/gtalk: ml...@controltier.com | yahoo: moseslei | windows live (msn): ml...@dtosolutions.com ]

Dave Carey

unread,
May 5, 2012, 2:50:55 AM5/5/12
to rundeck...@googlegroups.com
Hi Moses

Genius - that's really handy and has resolved my issue! - I switched to 'stub'  mode and was  able to see the following

"[stub] execute on node Churchill Build: /tmp/1336199783131-Churchill Build-stub-script.sh" 

i.e.   The node name of my targeted node ('Churchill Build' in this case) had a space in it. As soon as that was removed the script ran! 

thanks
Dave

Moses Lei

unread,
May 6, 2012, 8:29:43 PM5/6/12
to rundeck...@googlegroups.com
Dave, the fact that the space isn't escaped or otherwise mangled is probably a bug. Could you file it? Thanks.

Generally, people use the FQDN of the node's hostname for the node name, which is probably why no one ran into this before. The only big exception is when you have two logical nodes pointing to e.g. the same host but different usernames-- people usually use the format user@hostname for those cases.

Moses
--
Moses Lei
[ Professional Services | DTO Solutions, Inc. ]
[ mobile: +1 703.901.5969 | e-mail: ml...@dtosolutions.com | aim/gtalk: ml...@controltier.com | yahoo: moseslei | windows live (msn): ml...@dtosolutions.com ]



Dave Carey

unread,
May 8, 2012, 5:30:34 AM5/8/12
to rundeck...@googlegroups.com
Thanks again Moses

I've raised  #569  scp: ambiguous target - for Job with script referencing a node with a space
Reply all
Reply to author
Forward
0 new messages