<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ftp failures in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-failures/m-p/3151626#M862789</link>
    <description>John, &lt;BR /&gt;&lt;BR /&gt;Did you ever find a solution to your 0-byte file being written by FTP?  I'm experiencing a similar problem.</description>
    <pubDate>Mon, 11 Oct 2004 13:29:50 GMT</pubDate>
    <dc:creator>Eric_287</dc:creator>
    <dc:date>2004-10-11T13:29:50Z</dc:date>
    <item>
      <title>ftp failures</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-failures/m-p/3151613#M862776</link>
      <description>Hi,&lt;BR /&gt;I have an interesting problem in that an automatic FTP script occasionally (12 times out of 50,000 over last 2 days) appears to loose the data packet of an ftp transfer. &lt;BR /&gt;We have an application which creates small files between 400 and 500 bytes and ftp's them to a remote machine across a WAN. Occasionally these files are received with a size of 0 though we can verify that they were created with a non 0 size on the local machine. Has anybody seen this before or can explain how it can occur. I have tried everything I know to manually re-create the situation without success.  We ftp and use individual "put" commands to place the files onto the remote system, also we are not getting any indication of failure in the syslog.log.&lt;BR /&gt;</description>
      <pubDate>Tue, 23 Dec 2003 08:14:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-failures/m-p/3151613#M862776</guid>
      <dc:creator>John Waller</dc:creator>
      <dc:date>2003-12-23T08:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: ftp failures</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-failures/m-p/3151614#M862777</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;can you rule out, that files were transmitted, while there werent finished set, just created with size zero?&lt;BR /&gt;&lt;BR /&gt;greetings,&lt;BR /&gt;&lt;BR /&gt;Michael&lt;BR /&gt;</description>
      <pubDate>Tue, 23 Dec 2003 08:17:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-failures/m-p/3151614#M862777</guid>
      <dc:creator>Michael Schulte zur Sur</dc:creator>
      <dc:date>2003-12-23T08:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: ftp failures</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-failures/m-p/3151615#M862778</link>
      <description>The files are created in a temporary directory then we use mv to move them to the transfer directory before initiating the transfer. As we do not issue the mv in the script until the file creation has completed we can be certain the file was non-zero before transfer.</description>
      <pubDate>Tue, 23 Dec 2003 08:25:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-failures/m-p/3151615#M862778</guid>
      <dc:creator>John Waller</dc:creator>
      <dc:date>2003-12-23T08:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: ftp failures</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-failures/m-p/3151616#M862779</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;You  are sure that file has been created before the 'mv', but are you sure that transfer is not initialized *before* the 'mv' ends ? Files are small, but if your IOs are freezed for a very short time ... Of course this can occur only if source and target directories are not in the same filesystem (in this case, mv = cp + rm). You could transfer the file by mv to the target directory using a leading dot in the name, then mv the file *in the same filesystem* to remove the leading dot which would be immediate in this case.&lt;BR /&gt;&lt;BR /&gt;Regards.</description>
      <pubDate>Tue, 23 Dec 2003 08:32:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-failures/m-p/3151616#M862779</guid>
      <dc:creator>Jean-Louis Phelix</dc:creator>
      <dc:date>2003-12-23T08:32:23Z</dc:date>
    </item>
    <item>
      <title>Re: ftp failures</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-failures/m-p/3151617#M862780</link>
      <description>The source and target for the mv are in the same filesystem. We move from /u/transfer/outbound/tmp to ../ (i.e /u/transfer/outbound)</description>
      <pubDate>Tue, 23 Dec 2003 08:37:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-failures/m-p/3151617#M862780</guid>
      <dc:creator>John Waller</dc:creator>
      <dc:date>2003-12-23T08:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: ftp failures</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-failures/m-p/3151618#M862781</link>
      <description>Does the ftp process itself display any sort of error message?</description>
      <pubDate>Tue, 23 Dec 2003 08:51:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-failures/m-p/3151618#M862781</guid>
      <dc:creator>John Palmer</dc:creator>
      <dc:date>2003-12-23T08:51:33Z</dc:date>
    </item>
    <item>
      <title>Re: ftp failures</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-failures/m-p/3151619#M862782</link>
      <description>Looking at the script it appears due to the large number of transfers the person who wrote the script directed 2&amp;gt; (i.e standard error) to /dev/null. I have put a request to have this directed to a file so we can see any errors. One problem when you have non system admin aware programmers writing ftp scripts.</description>
      <pubDate>Tue, 23 Dec 2003 09:07:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-failures/m-p/3151619#M862782</guid>
      <dc:creator>John Waller</dc:creator>
      <dc:date>2003-12-23T09:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: ftp failures</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-failures/m-p/3151620#M862783</link>
      <description>You'll also want to turn on detailed ftp logging in /etc/inetd.conf but beware that syslog will grow rapidly with all the options turned on:&lt;BR /&gt; &lt;BR /&gt;-l logs all sessions&lt;BR /&gt;-L logs all commands&lt;BR /&gt; &lt;BR /&gt;and in the /var/adm/syslog/xferlog file:&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;-i logs all files received&lt;BR /&gt;-o logs all files sent&lt;BR /&gt; &lt;BR /&gt;xferlog may be the most useful (see man xferlog) along with adding -v to the ftp command in your script and saving both stdout as well as stderr from ftp.</description>
      <pubDate>Tue, 23 Dec 2003 09:38:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-failures/m-p/3151620#M862783</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2003-12-23T09:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: ftp failures</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-failures/m-p/3151621#M862784</link>
      <description>If there are transport or network-level problems with the file transfers, you might be able to establish a corellation bewteen things like connection aborts reported in netstat -p tcp with your "failed" FTP trasnfers.&lt;BR /&gt;&lt;BR /&gt;As for getting rid of the 2&amp;gt; stuff in the script, you could direct the stderr stuff to a tempfile that is deleted if the transfer is determined to be completed successfully.&lt;BR /&gt;</description>
      <pubDate>Mon, 29 Dec 2003 14:08:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-failures/m-p/3151621#M862784</guid>
      <dc:creator>rick jones</dc:creator>
      <dc:date>2003-12-29T14:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: ftp failures</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-failures/m-p/3151622#M862785</link>
      <description>We have seen this happen randomly on several systems under very similar circumstances to your own.&lt;BR /&gt;&lt;BR /&gt;After several weeks of continuous packet sniffing and combing through VERY LARGE sniffer logs, we could find no root cause or technical explanation for the 0 byte files occuring.&lt;BR /&gt;&lt;BR /&gt;Even though FTP is TCP-based, and TCP is (in theory, anyway) connection-oriented, packet losses should never occur. In the real world, it does happen from time to time. Since FTP is essentially a "dumb" application and has no built-in error detection/correction routines, packets do occaisionally get dropped resulting in 0 byte files on the target host.&lt;BR /&gt;&lt;BR /&gt;We found that the best way to prevent 0 byte files is to build in a couple of layers of error detection and correction to the FTP scripts themselves that will verify that the target and source files are the same size prior to moving on to the next transfer. If they don't match up, then resend the files.&lt;BR /&gt;&lt;BR /&gt;This probably isn't the answer you were looking for, but after pulling our hair out for 2 and half weeks, our networking and Unix teams decided that error checking and correction was the fastest and easiest solution.&lt;BR /&gt;&lt;BR /&gt;Good luck and Happy New Year!&lt;BR /&gt;&lt;BR /&gt;Brian</description>
      <pubDate>Tue, 30 Dec 2003 15:02:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-failures/m-p/3151622#M862785</guid>
      <dc:creator>Brian Watkins</dc:creator>
      <dc:date>2003-12-30T15:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: ftp failures</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-failures/m-p/3151623#M862786</link>
      <description>Brian,&lt;BR /&gt;It is true that TCP is connection oriented, however that does not guarantee packet delivery. There is nothing in the TCP spec. to provide this. It is up to what the application to deal with lost packets in what ever way makes sense to the application.&lt;BR /&gt;FTP will re-transmit a packet that does not get acknowledged but if that happens before data transfer starts, you get an empty file.&lt;BR /&gt;&lt;BR /&gt;That's my 2 cents worth:&lt;BR /&gt;-Dave</description>
      <pubDate>Tue, 30 Dec 2003 15:26:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-failures/m-p/3151623#M862786</guid>
      <dc:creator>Dave Johnson_1</dc:creator>
      <dc:date>2003-12-30T15:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: ftp failures</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-failures/m-p/3151624#M862787</link>
      <description>A couple of TCP and FTP clarifications:&lt;BR /&gt;&lt;BR /&gt;*) indeed, being "connection oriented" has nothing to do with the "reliability" of TCP&lt;BR /&gt;&lt;BR /&gt;*) "reliability" in TCP is often misunderstood - many people think it means TCP guarantees data delivery.  that is simply not true. what it means is that TCP guarantees notification of perceived delivery failure.  a rather different thing indeed.&lt;BR /&gt;&lt;BR /&gt;*) TCP increases the likelihood of data being delivered by using an ACKnowledgement and retransmission mechanism.  however, TCP will not retransmit forever and if a given  data packet (aka a TCP segment) is lost often enough, TCP will abort the connection and notify the user that something was amis&lt;BR /&gt;&lt;BR /&gt;*) FTP does not do retransmissions of packets.  FTP has no concept of packets.  All is knows about is data into and out of a TCP connection, and the messages it exchanges on the control connection&lt;BR /&gt;&lt;BR /&gt;Soooo,  if you run a lot of FTP sessions, that means you run a lot of TCP connections.  If there is some packet loss on the network, there is some measurable probability (we could probably work that out - roughly - based on netstat statistics from the sender(s) ) that you will have a given TCP segment dropped often enough in a row to convince TCP that it cannot get the data across.  That will fail the TCP connection, which will "fail" the FTP transfer.  &lt;BR /&gt;&lt;BR /&gt;Since we are talking about files of only 400 to 500 bytes, those are files that only require one TCP data segment (typically) to transfer, which means that one would be left with a zero byte file. We would never get a "partial" file - unless the TCP MSS happened to be &amp;lt; 400-500 bytes, which is generally not going to be the case.&lt;BR /&gt;&lt;BR /&gt;In HP-UX at least, some of the parameters  that affect when TCP will give-up on a connection or how often it will retransmit include:&lt;BR /&gt;&lt;BR /&gt;*) tcp_ip_abort_interval&lt;BR /&gt;*) tcp_ip_abort_cinterval&lt;BR /&gt;*) tcp_rexmit_interval_max&lt;BR /&gt;&lt;BR /&gt;&lt;A href="ftp://ftp.cup.hp.com/dist/networking/briefs/annotated_ndd.txt" target="_blank"&gt;ftp://ftp.cup.hp.com/dist/networking/briefs/annotated_ndd.txt&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;parms will vary on other OSes...&lt;BR /&gt;&lt;BR /&gt;if you are still reading and are particularly curious... :)  once you determine the average packet loss probability for the network, you then need to work-out how many times TCP will retransmit a segment before giving-up.  Once you have that figure, you raise the packet loss probability - lets call it 'p' - to that  power, and that is the probability a TCP segment could be dropped that many times in a row and lead to a connection failure.  basically, it is just like figuring the probability of flipping a coin and getting "tails' N times in a row. the probability of getting tails - p - is 0.5, so getting tails N times in a row will happen with  a probability of p^N or 0.5^N&lt;BR /&gt;&lt;BR /&gt;This means that the probability - this time lets call it 'P' that a packet will get through without the connection aborting is 1-(p^N)&lt;BR /&gt;&lt;BR /&gt;Now, the probability of a given connection having that happen will depend on the number of segments it must transfer.  Call that number of segments M, and the likelihood of that is P^M, substitute, and I believe it becomes (1-((p^N))^M&lt;BR /&gt;</description>
      <pubDate>Tue, 30 Dec 2003 16:46:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-failures/m-p/3151624#M862787</guid>
      <dc:creator>rick jones</dc:creator>
      <dc:date>2003-12-30T16:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: ftp failures</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-failures/m-p/3151625#M862788</link>
      <description>Don't know if it's feasable, but it's a suggestion. If you have the SSH packages installed on your servers, you could configure SFTP to conduct the transfers for you in lieu of FTP. It'll take a little more overhead, and a little more configuration, but it may help you isolate whether or not FTP is indeed causing the problem, and the OS or some other mechanism. Encryption's generally not a bad thing.&lt;BR /&gt;&lt;BR /&gt;Cheers.&lt;BR /&gt;&lt;BR /&gt;Bruce</description>
      <pubDate>Tue, 30 Dec 2003 16:52:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-failures/m-p/3151625#M862788</guid>
      <dc:creator>Bruce Link</dc:creator>
      <dc:date>2003-12-30T16:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: ftp failures</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-failures/m-p/3151626#M862789</link>
      <description>John, &lt;BR /&gt;&lt;BR /&gt;Did you ever find a solution to your 0-byte file being written by FTP?  I'm experiencing a similar problem.</description>
      <pubDate>Mon, 11 Oct 2004 13:29:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-failures/m-p/3151626#M862789</guid>
      <dc:creator>Eric_287</dc:creator>
      <dc:date>2004-10-11T13:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: ftp failures</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-failures/m-p/3151627#M862790</link>
      <description>Eric,&lt;BR /&gt;I'm arfraid we never did get to the bottom of this. I can't remember how it was done but looking at internal emails from the time, I believe we ended up putting some checking within the program which performed the FTP to check for a 0 byte file and resend. Unfortunatly this piece of code is no longer in use as both systems were consolidated onto a single server.</description>
      <pubDate>Tue, 12 Oct 2004 02:29:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-failures/m-p/3151627#M862790</guid>
      <dc:creator>John Waller</dc:creator>
      <dc:date>2004-10-12T02:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: ftp failures</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-failures/m-p/3151628#M862791</link>
      <description>Okay, thanks for your reply John.  :-)&lt;BR /&gt;</description>
      <pubDate>Tue, 12 Oct 2004 08:26:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-failures/m-p/3151628#M862791</guid>
      <dc:creator>Eric_287</dc:creator>
      <dc:date>2004-10-12T08:26:39Z</dc:date>
    </item>
  </channel>
</rss>

