Hi,
I am using the proxy to connect to the server. I use the initSOCKS and initSOCKSAuthentication for proxy and then ftpClient.login. The server authenticates the user but then I get the following error. But If I comment out the proxy authentication I can download the files by ftp.
Please can someone suggest where i am going wrong?
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 28 Jun 2004 12:10:28.598 : ---> USER sg52044
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 28 Jun 2004 12:10:28.677 : 331 Password required for sg52044.
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 28 Jun 2004 12:10:28.677 : ---> PASS ********
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 28 Jun 2004 12:10:29.5 : 230 User sg52044 logged in.
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 28 Jun 2004 12:10:29.5 : ---> TYPE I
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 28 Jun 2004 12:10:29.5 : 200 Type set to I.
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 28 Jun 2004 12:10:29.5 : ---> PASV
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 28 Jun 2004 12:10:29.5 : 227 Entering Passive Mode (150,110,142,56,99,176)
Exception occured in FTP : java.net.ConnectException: Connection refused: connect
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:350)
at java.net.PlainSocketImpl.connectToSocksServer(PlainSocketImpl.java:335)
at java.net.PlainSocketImpl.doSOCKSConnect(PlainSocketImpl.java:228)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:135)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:124)
at java.net.Socket.<init>(Socket.java:268)
at java.net.Socket.<init>(Socket.java:95)
at com.enterprisedt.net.ftp.FTPControlSocket.newPassiveDataSocket(FTPControlSocket.java:461)
at com.enterprisedt.net.ftp.FTPControlSocket.createDataSocketPASV(FTPControlSocket.java:445)
at com.enterprisedt.net.ftp.FTPControlSocket.createDataSocket(FTPControlSocket.java:293)
at com.enterprisedt.net.ftp.FTPClient.dir(FTPClient.java:1600)
at com.enterprisedt.net.ftp.FTPClient.dir(FTPClient.java:1566)
at cbm.xfer.downloadFile(Download.java:58)
at cbm.xfer.main(Download.java:105)
Process terminated with exit code 1