Daniel,
Here's the logs snippets...
(syslog)
226-ASCII
226-Options: -l
226 1 matches total
PASV
227 Entering Passive Mode (24.www.xxx.yy,253,112)
java.net.ConnectException: Operation timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:452)
at java.net.Socket.connect(Socket.java:402)
at java.net.Socket.<init>(Socket.java:309)
at java.net.Socket.<init>(Socket.java:124)
at com.digipixart.application
.autodownload.CustomSocketFactory.createSocket(CustomSocketFactory.java:78)
at org.apache.commons.net.ftp
.FTPClient._openDataConnection_(FTPClient.java:513)
at org.apache.commons.net.ftp
.FTPClient.initiateListParsing(FTPClient.java:2390)
at org.apache.commons.net.ftp
.FTPClient.initiateListParsing(FTPClient.java:2364)
at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:2141)
at com.digipixart.application
.autodownload.ApacheDownloadFiles.downloadFiles(ApacheDownloadFiles.java:390)
at com.digipixart.application
.autodownload.ApacheDownloadFiles.run(ApacheDownloadFiles.java:126)
at java.lang.Thread.run(Thread.java:552)
java.lang.NullPointerException
at com.digipixart.application
.autodownload.CustomSocketFactory.createSocket(CustomSocketFactory.java:91)
at org.apache.commons.net.ftp
.FTPClient._openDataConnection_(FTPClient.java:513)
at org.apache.commons.net.ftp
.FTPClient.initiateListParsing(FTPClient.java:2390)
at org.apache.commons.net.ftp
.FTPClient.initiateListParsing(FTPClient.java:2364)
at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:2141)
at com.digipixart.application
.autodownload.ApacheDownloadFiles.downloadFiles(ApacheDownloadFiles.java:390)
at com.digipixart.application
.autodownload.ApacheDownloadFiles.run(ApacheDownloadFiles.java:126)
at java.lang.Thread.run(Thread.java:552)
and from my application log...
2005-11-03 08:34:37,468 DEBUG createSocket with host: 24.www.xxx.yy,
port: 64880 with timeout of 300000
... blah blah blah ...
2005-11-03 08:42:33,157 DEBUG *** PassiveHost: 24.www.xxx.yy
I also get quite a few "Timeouts" with no apparent reason (where the IP
is correct, and the sever connects but nothing happens), but the wrong IP
happens much more. Just FYI, I switched the code to use edtFTPj and
tested several times with no problems.
also, it happened even before I created the CustomSocketFactory, which I
did just to get more debugging information (and set the timeouts).
I'm on Mac OS X 10.3.9 with Java 1.4.2, but also had the same type of
problems on Linux with Java 1.5.0
Regards,
Barrie
>
>In message <[EMAIL PROTECTED]>, "Barrie Selack"
writes:
>>2005-11-01 11:55:46,362 DEBUG createSocket with host: 207.www.xx.yy,
>>port: 60027 with timeout of 300000
>>... lots of other debugging ...
>>2005-11-01 11:55:46,751 DEBUG createSocket with host: 24.www.xxx.yy,
>>port: 51897 with timeout of 300000
>>
>>Hey! that last address is MY local address, the one the client is
running on!
>...
>>Has anyone seen such behavior.. does FTPClient just get lost?
>>
>>Any help would be greatly appreciated.
>
>Can you print the value of FTPClient.getPassiveHost() immediately
>after that happens? Also, can you log the FTP conversation with
>PrintCommandListener from src/java/examples/ so we can see how the FTP
>server is responding to the PASV command?
>
>For FTPClient hackers:
>The only way I see this happening is if __passiveHost is null
>when the socket is created. __passiveHost is set to null by
>enterLocalPassiveMode() and is given a value by _openDataConnection_()
>by calling __parsePassiveReply() after issuing a successful pasv().
>So if __parsePassiveReply() doesn't set __passiveHost, it
>will remain null when SocketFactory.createSocket() is called,
>causing Socket() to be called with a null host, which will
>cause the local host IP to be used. However, I don't see how
>__parsePassiveReply() can leave __passiveHost null without
>throwing an exception. Therefore, the need for the extra
>information.
>
>daniel
>
>-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-
> s a v a r e s e # In distant lands, I hear the call of my home.
> software research # Yet my work is not done. My journey's just begun.
>http://www.savarese.com/ # -- http://www.sleepandthetraveller.com/
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]