Operating System - HP-UX
1832679 Members
2759 Online
110043 Solutions
New Discussion

Re: broken pipe with ftp script

 
Greta Blamire
Frequent Advisor

broken pipe with ftp script

I get this error whenever I try to execute a ftp script from one system to another. Here is the error:
sendfile: Broken pipe


*************************************************
Cron: The previous message is the standard output
and standard error of one of your crontab commands:

/usr/local/bin/dev_newftp.sh 1>/dev/null

Here is the script it's using:
cd /u01/copy
ftp -v -i -n <open xxx.xxx.xxx.xxx
user xxxxxx xxxxxxx
cd /u02/refresh
bin
put controlROSS01.ctl
put controlROSS02.ctl
put finPROD01_index.dbf
put finPROD02_index.dbf
put finPROD03_index.dbf
put finPROD04_index.dbf
put redoROSS01a.log
put redoROSS02a.log
put redoROSS03a.log
put systemROSS01.dbf
put redoROSS01b.log
put redoROSS02b.log
put redoROSS03b.log
put tempROSS01.dbf
put tempROSS02.dbf
put toolsROSS01.dbf
bye

Any solution to getting the user name and password out of the script would be great also.

Thanks in Advance!
If you can't face the facts, change them!
4 REPLIES 4
Vincenzo Restuccia
Honored Contributor

Re: broken pipe with ftp script

Edit in ftp script set -x in line 1,and /usr/local/bin/dev_newftp.sh >/tmp/ctrl.log 2>&1 in crontab.Check ctrl.log for all errors.

Stefan Farrelly
Honored Contributor

Re: broken pipe with ftp script


You can get your username and password out of our ftp script by putting them in a .netrc file instead. See man on netrc
Im from Palmerston North, New Zealand, but somehow ended up in London...
Greta Blamire
Frequent Advisor

Re: broken pipe with ftp script

Thanks, maybe it's just the time I kick it off. When I tried it again with it outputting to /tmp/ctl.log it worked. So I'm going to make the time it kicks off later and see if it will work that way. Thanks for the info on getting the password out of the script.
If you can't face the facts, change them!
Greta Blamire
Frequent Advisor

Re: broken pipe with ftp script

And the answer was:
The receiving system was not able to create a large file on it's filesystem, so it would just die. I fixed the filesystem to accept large files (>2G) and the problem was solved.
If you can't face the facts, change them!