Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ANT FTP task: Software caused connection abort: connect

 
prabhat gupta
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am getting "Software caused connection abort: connect" error when i execute the FTP task in ANT.
I am using the FTP task in Ant and trying to connect to a Windows FTP server in the Intranet via its IP and login details.
the Ant task is as below:

<ftp action="get"
server="10.11.189.21"
userid="Myuserid"
password="MyPassword">
<fileset dir="/temp/docs/designdocs/">
<include name="**/*.doc"/>
</fileset>
</ftp>

I was able to ftp the same server from my windows command prompt by using
C:\ ftp 10.11.189.21
and then giving my userid and password. i was also able to download files from the server.

what could be the reason for this strange error.

I also tried to ftp the server using the java.net package by making a connection using URLConnection and doing IO to download.. but the same error is encountered on calling connect method of URLConnection.

I tried using the SCP task in Ant which is used for connecting to servers running Secured Shell. But since the windows ftp server is not behind any firewall(I checked it) this will not work anyways and it surely didn't.

I need to achieve unsecured FTP connection with the Windows FTP Server.

Please let me know the reasons for the problem and possible solutions.
 
Sumit Ranjan
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am getting "Software caused connection abort: connect" error when i execute the FTP task in ANT.
I am using the FTP task in Ant and trying to connect to a Windows FTP server in the Intranet via its IP and login details.
the Ant task is as below:

<ftp action="get"
server="10.11.189.21"
userid="Myuserid"
password="MyPassword">
<fileset dir="/temp/docs/designdocs/">
<include name="**/*.doc"/>
</fileset>
</ftp>

I was able to ftp the same server from my windows command prompt by using
C:\ ftp 10.11.189.21
and then giving my userid and password. i was also able to download files from the server.

what could be the reason for this strange error.

I also tried to ftp the server using the java.net package by making a connection using URLConnection and doing IO to download.. but the same error is encountered on calling connect method of URLConnection.

I tried using the SCP task in Ant which is used for connecting to servers running Secured Shell. But since the windows ftp server is not behind any firewall(I checked it) this will not work anyways and it surely didn't.

I need to achieve unsecured FTP connection with the Windows FTP Server.

Please let me know the reasons for the problem and possible solutions
----------------------------------------------------------------------------

Dear Prabhat,

I think you are getting this error because to be able to do tasks like FTP, telnet etc you would need to download addtional jars
and put them in your ANT_HOME/lib folder.In your case you would need these jars -
i) commons-net-1.4.1.jar
ii)jakarta-oro-2.0.8.jar.
You can download these jars from this site - http://ant.apache.org/manual/install.html
(U will have to scroll down to the section Library Dependencies)

Please let me know if this solves your problem.

Thanks and Regards,
Sumit
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic