Hello!
I really hope you can help me with my problem, because I have no idea what is wrong... In my program I'm trying to connect to a server with a ftp connection. There i first want to check if some folders already exist and if not, I want to create them. I can connect to the server with no problems, but when I want to list the root directory, I get an error: 500 Invalid PORT Command. I'm connecting to port 22, and obviously that is OK because the connecting part is OK. What could be the problem? Here the log:
INFO [virtcomFakture.Main.VirtcomGUIOsnova] 16 Nov 2012 22:54:20.091 : Creating FTP client
DEBUG [FTPClient] 16 Nov 2012 22:54:20.152 : Class: com.enterprisedt.net.ftp.FTPClient
Location: file:/C:/Viki/Sluzba/Vnos%20Faktur%20App/resources/edtftpj.jar
Version: 2.3.0
Build timestamp: 26-Aug-2011 13:52:07 EST
Java version: 1.7.0_03
CLASSPATH: C:\Program Files\NetBeans 7.1.1\java\modules\ext\beansbinding-1.2.1.jar;C:\Viki\Sluzba\Vnos Faktur App\resources\jcalendar-1.4.jar;C:\Viki\Sluzba\Vnos Faktur App\resources\mysql-connector-java-5.1.17-bin.jar;C:\Viki\Sluzba\Vnos Faktur App\resources\edtftpj.jar;C:\Viki\Sluzba\Vnos Faktur App\resources\log4j-1.2.16.jar;C:\Viki\Sluzba\Vnos Faktur App\resources\sqljdbc4.jar;C:\Viki\Sluzba\Vnos Faktur App\ICEpdf-4.3.2-bin\ICEpdf-4.3.2-bin\icepdf\lib\icepdf-core.jar;C:\Viki\Sluzba\Vnos Faktur App\ICEpdf-4.3.2-bin\ICEpdf-4.3.2-bin\icepdf\lib\icepdf-viewer.jar;C:\Viki\Sluzba\Vnos Faktur App\itext-5.3.0\itext-xtra-5.3.0-javadoc.jar;C:\Viki\Sluzba\Vnos Faktur App\itext-5.3.0\itext-xtra-5.3.0-sources.jar;C:\Viki\Sluzba\Vnos Faktur App\itext-5.3.0\itext-xtra-5.3.0.jar;C:\Viki\Sluzba\Vnos Faktur App\itext-5.3.0\itextpdf-5.3.0-javadoc.jar;C:\Viki\Sluzba\Vnos Faktur App\itext-5.3.0\itextpdf-5.3.0-sources.jar;C:\Viki\Sluzba\Vnos Faktur App\itext-5.3.0\itextpdf-5.3.0.jar;C:\Users\Viki\NetBeansProjects\Vnos_Faktur_glavni\build\classes
OS name: Windows 7
OS arch: x86
OS version: 6.1
INFO [virtcomFakture.Main.VirtcomGUIOsnova] 16 Nov 2012 22:54:20.157 : Setting remote host
INFO [virtcomFakture.Main.VirtcomGUIOsnova] 16 Nov 2012 22:54:20.157 : Connecting to server xx.xxx.xxx.xxx
DEBUG [FileTransferClient] 16 Nov 2012 22:54:20.158 : Configured client
DEBUG [FTPClient] 16 Nov 2012 22:54:20.158 : Connecting to /xx.xxx.xxx.xxx:22
DEBUG [FTPControlSocket] 16 Nov 2012 22:54:20.246 : 220 Microsoft FTP Service
DEBUG [FileTransferClient] 16 Nov 2012 22:54:20.249 : Client connected
DEBUG [FileTransferClient] 16 Nov 2012 22:54:20.249 : Logging in
DEBUG [FTPControlSocket] 16 Nov 2012 22:54:20.249 : ---> USER FileSistemAdmin
DEBUG [FTPControlSocket] 16 Nov 2012 22:54:20.296 : 331 Password required for FileSistemAdmin.
DEBUG [FTPControlSocket] 16 Nov 2012 22:54:20.297 : ---> PASS ********
DEBUG [FTPControlSocket] 16 Nov 2012 22:54:20.341 : 230 User FileSistemAdmin logged in.
DEBUG [FileTransferClient] 16 Nov 2012 22:54:20.342 : Logged in
DEBUG [FTPControlSocket] 16 Nov 2012 22:54:20.342 : ---> TYPE I
DEBUG [FTPControlSocket] 16 Nov 2012 22:54:20.383 : 200 Type set to I.
INFO [virtcomFakture.Main.VirtcomGUIOsnova] 16 Nov 2012 22:54:20.383 : Connected and logged in to server xx.xxx.xxx.xxx with port: 22
Connected to FTP server.
INFO [virtcomFakture.Main.VirtcomGUIOsnova] 16 Nov 2012 22:54:20.384 : Getting current directory listing
DEBUG [FTPControlSocket] 16 Nov 2012 22:54:20.394 : ---> SYST
DEBUG [FTPControlSocket] 16 Nov 2012 22:54:20.474 : 215 Windows_NT
DEBUG [FTPControlSocket] 16 Nov 2012 22:54:20.484 : ---> PWD
DEBUG [FTPControlSocket] 16 Nov 2012 22:54:20.551 : 257 "/" is current directory.
DEBUG [FTPClient] 16 Nov 2012 22:54:20.552 : setupDirDetails(.) returning: /
DEBUG [FTPControlSocket] 16 Nov 2012 22:54:20.554 : ListenOnAllInterfaces=true
DEBUG [FTPControlSocket] 16 Nov 2012 22:54:20.557 : ---> PORT 192,168,0,64,19,17
DEBUG [FTPControlSocket] 16 Nov 2012 22:54:20.647 : 500 Invalid PORT Command.
INFO [FTPControlSocket] 16 Nov 2012 22:54:20.647 : Expected reply codes = [200,250]
DEBUG [virtcomFakture.Main.VirtcomGUIOsnova] 16 Nov 2012 22:54:20.648 : null : Invalid PORT Command.
com.enterprisedt.net.ftp.FTPException: 500 Invalid PORT Command.
at com.enterprisedt.net.ftp.FTPControlSocket.validateReply(FTPControlSocket.java:1223)
at com.enterprisedt.net.ftp.FTPControlSocket.setDataPort(FTPControlSocket.java:815)
at com.enterprisedt.net.ftp.FTPControlSocket.sendPORTCommand(FTPControlSocket.java:669)
at com.enterprisedt.net.ftp.FTPControlSocket.createDataSocketActive(FTPControlSocket.java:616)
at com.enterprisedt.net.ftp.FTPControlSocket.createDataSocket(FTPControlSocket.java:583)
at com.enterprisedt.net.ftp.FTPClient.setupDataSocket(FTPClient.java:2648)
at com.enterprisedt.net.ftp.FTPClient.dir(FTPClient.java:3664)
at com.enterprisedt.net.ftp.FTPClient.dir(FTPClient.java:3756)
at com.enterprisedt.net.ftp.FTPClient.dirDetails(FTPClient.java:3583)
at com.enterprisedt.net.ftp.FileTransferClient.directoryList(FileTransferClient.java:647)
at virtcomFakture.Main.VirtcomGUIOsnova.manageFolders(VirtcomGUIOsnova.java:6414)
at virtcomFakture.Main.VirtcomGUIOsnova.access$22600(VirtcomGUIOsnova.java:54)
at virtcomFakture.Main.VirtcomGUIOsnova$226.run(VirtcomGUIOsnova.java:6120)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:705)
at java.awt.EventQueue.access$000(EventQueue.java:101)
at java.awt.EventQueue$3.run(EventQueue.java:666)
at java.awt.EventQueue$3.run(EventQueue.java:664)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:675)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
I really have no idea why this is happening... If it helps - I am now trying to connect to a remote server (and I keep getting this error), but before (in first fase of development) I was connecting to a "server" within my home network with the same settings and it worked fine... The only thing I now changed are host and port....
I'd really appreciate your help.
Thanks :)