Project and Portfolio Management Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Transfer failed error with SCP command

Highlighted
odinsride
Occasional Advisor

Transfer failed error with SCP command

Hi,

I am encountering errors with the built-in "ksc_copy_client_server" command, which uses scp to transfer files to different servers. I am getting the error:

Source SCPClient:scp -p "XXXXXXX.wft" userid@server:/u10/app/instance/appl/xxxxx/11.5.0/admin/import/US/XXXXXXXX.wft; echo EXIT_STATUS $?
Source SCPClient:Error: transfer failed
Closing SSH Session
Closing SSH Session

I am not sure why this is happening - it seems to randomly happen only on certain files. Most files are scp'd fine, only a few give this error.

Anyone else encounter this?
10 REPLIES
odinsride
Occasional Advisor

Re: Transfer failed error with SCP command

Also I have tried the scp command manually from a putty window and it works fine.

We have ensured permissions are correct as well.

Is there any way I can get a more detailed description of why this is failing?

Darshan Bavisi
Occasional Visitor

Re: Transfer failed error with SCP command

Hi,

Are there any spaces in the file name? I see in the above example its not, but not sure if that's your real file name. Do you see this behavior only on a certain type of files or on certain conditions or so. Try looking into the serverLog.txt file. If that also does not help then try putting the server log to Debug mode, then try transferring the same failed file, then bring back the logging mode to normal (do not keep in the Debug mode, as it will slow down the system and your file system (app server) disk space will immediately start getting filled-up with mountains of data). Once you have the debug mode serverLog.txt file, then trace and analyze the log in it for this failed scp. It may throw some light on the cause.
odinsride
Occasional Advisor

Re: Transfer failed error with SCP command

Hi,

It is happening on many different filetypes, both binary and ascii files. There are no spaces in any of our filenames.

I tried to enable "maximum" for debugging and tried to resubmit the package line, but it didn't seem to write anything to the serverLog.txt file at all. In fact, the last date it was modified was yesterday..this doesn't seem right. Am I looking at the right file?

/server/kintana/logs/serverLog.txt


Any other suggestion?
Shameem Ahmed
Acclaimed Contributor

Re: Transfer failed error with SCP command

Hi,

We are facing same issue. If you have found any solution,please share with me also.

Thanks

Shameem Ahmed
Acclaimed Contributor

Re: Transfer failed error with SCP command

Hi,

I am facing same issue. If you have found any solution,please share with me also.

Thanks

Jim Esler
Honored Contributor

Re: Transfer failed error with SCP command

We have seen this very rarely. It has happened only when transferring files to/from Windows servers. When a file fails to transfer, it always fails even though other file transfers continue to work between the same servers. Making a copy of the failing file with a different file name has always worked around the problem. I know this makes no sense but it has worked for us.
Mike Ramberg
Super Collector

Re: Transfer failed error with SCP command

Hello,

I have seen this problem in the past. What we had found is an issue with secure transfer and Cygwin. Our solution has been to delete the known_hosts file on both the destination and source machines for the given userid. Then, initiate a file transfer from the source machine to the destination machine from the Cygwin command prompt. You will be asked some questions related to setting a secure transfer between machines, say yes. This re-creates the known_hosts file. After that, the SCP command from PPM has worked for us.

What I think was happening to us was that something had changed on one or both servers, and the server was asking yes/no questions during the execution of the SCP command. The ksc_copy_client_server command didn't know how to handle this and so it resulted in transfer failed.

I'm no expert in this area, but that's what worked for us.
odinsride
Occasional Advisor

Re: Transfer failed error with SCP command

a
ivan2
Acclaimed Contributor

Re: Transfer failed error with SCP command

Hi - i get exactly the same issue.
I get it to Windows 2003 and Linux targets.
I get it only for specific files and only when these files are SCP'd (or when attempted) to specific target locations.
If i rename the file (same file, different name) or specify a different target directory the SCP will work.

I can repeat this error infinitum with the faulty files. No spaces, ascii and binary files!!!

This is very frustrating and the Cyqwin solution will not work for us...any ideas???

Thanks,

Ivan
Devin Rosenbaue
Acclaimed Contributor

Re: Transfer failed error with SCP command

The message "Error: Transfer failed" is printed whenever the scp command exits at any point with a non-zero error code. Oddly, Kintana's SCP client class is hardcoded (!) to not log any output from the scp command. In your case, as in mine, it seems that the command is exiting before Kintana is prompted for a password.

So here's what I did for debugging purposes...

I created a script called "scphack" that looks like this:

===========================
#!/bin/bash

/usr/bin/scp -v $1 $2 $3 2> /home/kintana/scp.debug.log
===========================

I then created an alias in the source user's .profile:

===========================
alias scp='/home/kintana/scphack'
===========================

Thus, whenever Kintana logs into the source environment and executes the scp command, the alias "scphack" will be called instead, supplying the -v (verbose) flag and forwarding all debugging output (printed to stderr) to the file specified.

If the alias doesn't work, or your environment doesn't support them, you could change the script name to "scp" and make sure it comes first in the environment user's path.

This should allow you to access debugging information required to determine why the "scp" session is bombing and causing Kintana to print that error.

Hopefully this helps somebody out there!
//Add this to "OnDomLoad" event