Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why can't I transfer a large file to certain hosts.

Status
Not open for further replies.

thechudster

Programmer
Jan 13, 2003
4
US
In my job, I transfer upgrade files to hundreds of hosts. This is automated through scripts, except when a host fails to receive the files. Then I sent the upgrade manually. Only some hosts have this, issue, and it is every time I try.

Why would a large file fail to transfer to certain hosts but not others? I use "rcp" to send the file. If anyone can help, you might save me a lot of work.
 
Do the scripts log their output anywhere? It would be helpful if you could capture the error code and/or error message returned by rcp.

How large is 'large'? Annihilannic.
 
A big part of my problem is that whoever set these boxes up didn't include logging for this sort of thing. I searched all day yesterday for any log file, and can't find one.

I am able to rcp off the command line the same file (approx 4 MB) but when the exact same command is part of a Unix shell script, it dies.

I just thought of this, the box I send from is a Sun box, the destination is SCO. But again, I can't understand why I can send from the command line, but not as part of a script, and only to certain hosts.
 
Why don't you add this to the beginning of those scripts if it is ksh:

exec 1>> SOME_LOG_NAME_HERE
exec 2>> SAME_LOG_NAME_HERE

If the scripts are not ksh, then what are they written in?
 
I did as you suggested. The message I get back is the same as I was getting to standard output, that the connection timed out.
 
Can you post the fragment of the script that does the rcp and we can see if there's anything obvious. Annihilannic.
 
Here is the portion of the script that first creates a directory for a zipped file, then copies the file into that directory. Note that $x is a hostnme gotten from a file with a list of hosts (so I can send to many hosts without individually entering their names), and $updir is a predefined directory that gets created.

###############################################################################
# Start by creating a directory to place upgrade stuff:
###############################################################################
echo "Creating UPGRADE update directory on "$x
/usr/bin/remsh $x /bin/mkdir $updir
if [ "$?" != "0" ]
then
echo "FAILURE : Creating upgrade directory on $x"
echo $x >> $source$error
continue
fi
/usr/bin/remsh $x /bin/chmod 777 $updir

###############################################################################
# Now send the UPGRADE.Z file
###############################################################################
echo "sending updates to "$x
rcp ${source}UPGRADE.Z $x:$updir/121050.Z
if [ "$?" != "0" ]
then
echo "FAILURE : Sending files to $x"
echo $x >> $source$error
continue
 
Is the following true:

If filename is not a full path name, it is interpreted relative to
your home directory on hostname. A path on a remote host may be quoted
(using ``\'', ``"'', or ``''') so that the metacharacters are
interpreted remotely.

rcp does not prompt for passwords; your current local user name must
exist on hostname and allow remote command execution by rsh(1tcp).
 
I presume this is file is copied to the hosts, one at a time, and not simultaneously.

If its run simultaneously, you may choke the network connections, especially if its remote sites !!.


Just a thought,

Regards
UkWizard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top