You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2005/09/03 15:26:26 UTC

DO NOT REPLY [Bug 36473] - [FTP] storeFile keeps returning false on XP only, stores nothing to FTP server

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36473>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36473





------- Additional Comments From spamnot@polard.com  2005-09-03 15:26 -------
I have done further testing on this and I have discovered that storeFile 
attempts to connect to the webserver the applet is running on, NOT the logged 
in FTP server as is logged in to when that instance of the FTPClient object 
that is having its storeFile method being called is started to be used. 
 
On all XP machines, this is displayed in the Java console. Lines tagged J are 
JVM output, lines tagged P is output System.out.prinln'ed by my program: 
 
J1: network: Connecting socket://polard.com:21 with proxy=DIRECT 
J2: network: Connecting socket://polard.com:21 with proxy=DIRECT 
P1: Connected for initial upload! 
P2: Passive mode set 
P2: Transferring... 
P2: Starting upload now... 
*J3: network: Connecting socket://www2a.your-server.co.za:50989 with 
proxy=DIRECT 
Upload failed - storeFile returned false - socket? 
 
The line marked with the asterisk is the error line. 
 
Line J3 should be: 
 
network: Connecting socket://polard.com:20 with proxy=DIRECT 
 
to initate a data port connection (FTP on port 20) with the polard.com server, 
to start transferring the file. This is NOT what happens - why does it connect 
to my webserver,  
 
network: Connecting socket://www2a.your-server.co.za:50989 with proxy=DIRECT 
 
instead of polard.com:20? With a random port number? The :50989 changes from 
run to run. 
 
On the Linux JVM, it looks and works exactly right: 
 
J1: network: Connecting socket://polard.com:21 with proxy=DIRECT 
J2: network: Connecting socket://polard.com:21 with proxy=DIRECT 
P1: Connected for initial upload! 
P2: Passive mode set 
P2: Transferring... 
P2: Starting upload now... 
*J3: network: Connecting socket://polard.com:20 with proxy=DIRECT 
 
So the apparent bug is that on Windows JVMs the commons.net FTP module 
"forgets" the server it is connected to, trying instead to open a socket to the 
host the applet is running on, instead of the FTP server connected to and 
logged in to with the FTPClient object's instances of connect() and login(). 
 

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org