Page 1 of 1

scp command not working from datastage

Posted: Fri Jul 22, 2016 5:40 am
by midmaxds
Hi,
We are calling the scp command using expect utility from our unix server to transfer a file to MDM server.
The command works fine while running from unix.

But when calling from after job sub routine/ Execute shell stage, the file is not getting transferred.

There are no error messages too. The job is completing without any errors.
The script is getting invoked. We added a puts command after the file transfer step to echo "hello" to make sure it is executed, and it prints the output.

Could you please help to identify the issue? Please let me know if more information is needed.

Posted: Fri Jul 22, 2016 8:34 am
by UCDI
Is it possibly a permissions issue on the datastage account?

Posted: Fri Jul 22, 2016 3:24 pm
by PaulVL
debug the command.

before your SCP in your execute stage do this:

echo $PWD; whoami; echo "scp $blah $blah1"; scp blah blah1;

you will see the output of those echo statements in your sequencer logs of course.
But it will tell you tons.

A) your Current working directory (assumed to be your project directory unless you overwrote that via parms)
B) Your execution user id since you might have credential mapping turned on.
C) command parms to scp at the time of execution.

I'm really surprised that you did not get any feedback in the logs, even with the expect statements.

Also... why would you have an expect unless you do not have an ssh key set up between both systems. If you had an ssh key... no prompts would show up.

Posted: Sun Jul 24, 2016 11:28 pm
by midmaxds
Thanks for the responses.
The user ID has full permissions. So it could not be an issue.

Meanwhile, we tried to a wait command in between and the file is getting transferred now. Thanks again!