title: java ftp file upload
body: <p>I am running a ftp server using filezilla in windows. I am able to connect to it, but when I try to upload a file or list the files, I get an exception. I was trying the example from this page <a href="http://www.kodejava.org/examples/357.html" rel="nofollow">http://www.kodejava.org/examples/357.html</a></p>
  
  <pre><code>Login success...
  java.net.SocketException: Software caused connection abort: socket write error
  at java.net.SocketOutputStream.socketWrite0(Native Method)
  at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
  at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
  at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
  at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291)
  at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:295)
  at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141)
  at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229)
  at java.io.BufferedWriter.flush(BufferedWriter.java:254)
  at org.apache.commons.net.ftp.FTP.__send(FTP.java:496)
  at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:470)
  at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:547)
  at org.apache.commons.net.ftp.FTP.port(FTP.java:872)
  at org.apache.commons.net.ftp.FTPClient._openDataConnection_(FTPClient.java:667)
  at org.apache.commons.net.ftp.FTPClient.listNames(FTPClient.java:2528)
  at org.apache.commons.net.ftp.FTPClient.listNames(FTPClient.java:2574)
  </code></pre>
  
  <p>On the server logs I see the following</p>
  
  <pre><code>(000032)9/16/2011 14:38:28 PM - (not logged in) (127.0.0.1)&gt; Connected, sending welcome message...
  (000032)9/16/2011 14:38:28 PM - (not logged in) (127.0.0.1)&gt; 220-FileZilla Server version 0.9.39 beta
  (000032)9/16/2011 14:38:28 PM - (not logged in) (127.0.0.1)&gt; 220-written by Tim Kosse    (Tim.Kosse@gmx.de)
  (000032)9/16/2011 14:38:28 PM - (not logged in) (127.0.0.1)&gt; 220 Please visit http://sourceforge.net/projects/filezilla/
  (000032)9/16/2011 14:38:28 PM - (not logged in) (127.0.0.1)&gt; USER reverb0253
  (000032)9/16/2011 14:38:28 PM - (not logged in) (127.0.0.1)&gt; 331 Password required for reverb0253
  (000032)9/16/2011 14:38:28 PM - (not logged in) (127.0.0.1)&gt; PASS ********
  (000032)9/16/2011 14:38:28 PM - reverb0253 (127.0.0.1)&gt; 230 Logged on
  (000032)9/16/2011 14:38:40 PM - reverb0253 (127.0.0.1)&gt; disconnected.
  </code></pre>
  
  <p>Right when I hits the like client.storeFile(), the server logs disconnected. I am using apache commons-net 3.0.1</p>