Body: <p>I have a Bamboo plan that uses a custom ANT task to FTP files across the firewall to our Production server.  Below is its configuration</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;target name="ftp-files" description="FTP File Update"&gt;
    &lt;echo message="Sync(ftp) ${build.src} to ${target}"/&gt;
  
    &lt;ftp action="put"
      server="${server}"
      remotedir="${target}"
      userid="subDomain\DeployerServiceAccount"
      password="secretPassword"
      depends="yes"
      passive="yes"
      verbose="yes"
    &gt;
      &lt;fileset dir="${build.src}"&gt;
        &lt;include name="**" /&gt;
      &lt;/fileset&gt;
    &lt;/ftp&gt;
  &lt;/target&gt;
  </code></pre>
  
  <p>When the plan runs, it is able to establish a connection and it starts to PUT files on the target server fine however, it gets stuck on a few files.  This is the error we get:</p>
  
  <pre><code>04-May-2017 11:28:57        [ftp] try #1: IO error (path\to\file.ext), number of maximum retries reached (0), giving up
  04-May-2017 11:28:57  
  04-May-2017 11:28:57  BUILD FAILED
  04-May-2017 11:28:57  g:\path\to\BambooAntTasks\FtpDeploy.xml:24: error during FTP transfer: java.net.SocketTimeoutException: Read timed out
  </code></pre>
  
  <p>I tried increasing the number of retries to 6, it did not help. As far as I can tell, there appears to be nothing wrong with these files.  I am able to open them, and the user, <code>DeployerServiceAccount</code> has access to them.  They already existed on the target so they were deployed at least once before.  Either way, that's usually not a problem they just get overwritten.  They were not open on the source and their properties (including access rights) were identical to other files that did transfer.</p>
  
  <p>We have a number of plans that use the same task and work well.  The only difference is that those other plans we tend to run more often, and deploy code.  This particular plan deploys mostly binaries consisting of a few XML documents which configure a presentation made up of images and PDFs.</p>
  
  <p>The FTP Server is configured using IIS and I am able to manually connect to it and upload files these very same files using the same account the plan uses <code>DeployerServiceAccount</code> and it works just fine.  It is also worth mentioning, we have been using the same plan for years.  One recent change is we migrated the servers.  That broke the plan, but  I already addressed that issue.  The other change is that we have up our security policies quite a bit.  I am not from that team so I am not 100% on these but some of those changes interrupt software installations i.e. SQL Server or any software that attempts to connect to the internet during installation.</p>
  
  <p>Any answer or lead to an answer will be greatly appreciated.</p>
  
Comments: CC BY-SA 3.0
Comments: 2017-05-06T16:36:55.523Z
Comments: Seems you're just overflowing your ftp server,  I think there's a performance monitor metric for IIS to see the number of actual connections and a parameter to limit simultaneous cx on ftp,  but that's from memory
Comments: Tensibai
Comments: CC BY-SA 3.0
Comments: 2017-06-08T12:49:58.733Z
Comments: I'm voting to close this question as off-topic because no feedback for a month, unlikely to get more details now.
Comments: Tensibai
Tags: <bamboo>
Title: Bamboo (ANT task): Why does FTP work for some files but not others?
UserDisplayName: user2655
ThreadText: # Bamboo (ANT task): Why does FTP work for some files but not others?
  
  (Asked by: username_0 on 2017-05-05)
  
  I have a Bamboo plan that uses a custom ANT task to FTP files across the firewall to our Production server. Below is its configuration
  
  ```xml
  <target name="ftp-files" description="FTP File Update">
    <echo message="Sync(ftp) ${build.src} to ${target}"/>
  
    <ftp action="put"
      server="${server}"
      remotedir="${target}"
      userid="subDomain\DeployerServiceAccount"
      password="secretPassword"
      depends="yes"
      passive="yes"
      verbose="yes"
    >
      <fileset dir="${build.src}">
        <include name="**" />
      </fileset>
    </ftp>
  </target>
  
  ```
  
  When the plan runs, it is able to establish a connection and it starts to PUT files on the target server fine however, it gets stuck on a few files. This is the error we get:
  
  ```
  04-May-2017 11:28:57        [ftp] try #1: IO error (path\to\file.ext), number of maximum retries reached (0), giving up
  04-May-2017 11:28:57  
  04-May-2017 11:28:57  BUILD FAILED
  04-May-2017 11:28:57  g:\path\to\BambooAntTasks\FtpDeploy.xml:24: error during FTP transfer: java.net.SocketTimeoutException: Read timed out
  
  ```
  
  I tried increasing the number of retries to 6, it did not help. As far as I can tell, there appears to be nothing wrong with these files. I am able to open them, and the user, `DeployerServiceAccount` has access to them. They already existed on the target so they were deployed at least once before. Either way, that's usually not a problem they just get overwritten. They were not open on the source and their properties (including access rights) were identical to other files that did transfer.
  
  We have a number of plans that use the same task and work well. The only difference is that those other plans we tend to run more often, and deploy code. This particular plan deploys mostly binaries consisting of a few XML documents which configure a presentation made up of images and PDFs.
  
  The FTP Server is configured using IIS and I am able to manually connect to it and upload files these very same files using the same account the plan uses `DeployerServiceAccount` and it works just fine. It is also worth mentioning, we have been using the same plan for years. One recent change is we migrated the servers. That broke the plan, but I already addressed that issue. The other change is that we have up our security policies quite a bit. I am not from that team so I am not 100% on these but some of those changes interrupt software installations i.e. SQL Server or any software that attempts to connect to the internet during installation.
  
  Any answer or lead to an answer will be greatly appreciated.
  
  **Tags:** bamboo
  
  > **Comments:**
  > **username_1**: Seems you're just overflowing your ftp server,  I think there's a performance monitor metric for IIS to see the number of actual connections and a parameter to limit simultaneous cx on ftp,  but that's from memory  
  > **username_1**: I'm voting to close this question as off-topic because no feedback for a month, unlikely to get more details now.  
  
  ---
  
  ## 0 answers
  
  