Search code examples
antftp

Ant Ftp task unable to send file to remote machine


Hi im trying to send a file to a remote machine using ant FTP task . The code looks like this

<ftp server="rbhanu"
       userid="rbhanu"
       password="prapanch"
       remotedir="C:\"
       action="send">
     <fileset dir="./ragz"/>
</ftp>

where rbhanu is the name of the host. I am trying to send an ear file present inside ragz folder to C drive of rbhanu(remote machine) its generating the following error

error during FTP transfer: java.net.ConnectException: Connection refused: connect

Note: I included all the libraries related to ftp task its not the problem because i can send files to ftp server but unable to send files to remote machine

I greatly appreciate if any one could figure it out


Solution

  • Connection refused:connect implies that there is no FTP server running on the specified destination.

    Can you try the same directly, i.e. without using the ant task and see if that works?