java.net.SocketException

Upload core product.
Post Reply
jarmstrong
Posts: 2
Joined: Tue Jul 09, 2013 5:43 am

java.net.SocketException

Post by jarmstrong »

Trying to evaluate JFileUpload and having a few problems. The file I’m trying to upload is fairly small. Destination directory has 777 permissions. I’m running on Apache/PHP server. I'm testing with applet_ftp.html. I tried running two different ways with PASV True and False.
============ This is the 1st run with PASV=True ==================
Fragment from applet_ftp.js

// BEGIN: Update parameters below for INTERNET EXPLORER, FIREFOX, SAFARI, OPERA, MOZILLA, NETSCAPE 6+ support.
document.writeln('<PARAM NAME="verbosemode" VALUE="trace">');
document.writeln('<PARAM NAME=CODE VALUE="jfileupload.upload.client.MApplet.class">');
document.writeln('<PARAM NAME=CODEBASE VALUE="./">');
document.writeln('<PARAM NAME=ARCHIVE VALUE="lib/jfileupload.jar,lib/ftpimpl.jar,lib/cnet.jar,lib/clogging.jar">');
document.writeln('<PARAM NAME=NAME VALUE="fileupload">');
document.writeln('<PARAM NAME="type" VALUE="application/x-java-applet;version=1.6">');
document.writeln('<PARAM NAME="scriptable" VALUE="true">');
document.writeln('<PARAM NAME="url" VALUE="ftp://ftp.alltexan.com">');
document.writeln('<PARAM NAME="param1" VALUE="username">');
document.writeln('<PARAM NAME="value1" VALUE="alltexan">');
document.writeln('<PARAM NAME="param2" VALUE="password">');
document.writeln('<PARAM NAME="value2" VALUE="Sonrise..777">');
document.writeln('<PARAM NAME="param3" VALUE="pasv">');
document.writeln('<PARAM NAME="value3" VALUE="true">');
document.writeln('<PARAM NAME="param4" VALUE="account">');
document.writeln('<PARAM NAME="value4" VALUE="www/allknowhisword/church/church_data/1/media_files">');
document.writeln('<PARAM NAME="resources" VALUE="i18n">');
document.writeln('<PARAM NAME="mode" VALUE="ftp">');
// END

From Java Console –
----------------------------------------------------
[INFO] E - Connected to ftp://ftp.alltexan.com
[INFO] E - 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 3 of 1000 allowed.
220-Local time is now 22:50. Server port: 21.
220-This is a private system - No anonymous login
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 15 minutes of inactivity.

[INFO] E - PASV enabled
[DEBUG] E - 230 OK. Current restricted directory is /

[INFO] FTPUploadTransfer - Upload started : C:\Users\Armstrong\Desktop\HOPCOG\2008_SongClip.mp4
[ERROR] FTPUploadTransfer - java.net.SocketException: Connection reset
[INFO] FTPUploadTransfer - Upload failed
[INFO] E - Disconnected from ftp://ftp.alltexan.com



=============== This is the 2nd run with PASV=False. ==============

Fragment from applet_ftp.js

// BEGIN: Update parameters below for INTERNET EXPLORER, FIREFOX, SAFARI, OPERA, MOZILLA, NETSCAPE 6+ support.
document.writeln('<PARAM NAME="verbosemode" VALUE="trace">');
document.writeln('<PARAM NAME=CODE VALUE="jfileupload.upload.client.MApplet.class">');
document.writeln('<PARAM NAME=CODEBASE VALUE="./">');
document.writeln('<PARAM NAME=ARCHIVE VALUE="lib/jfileupload.jar,lib/ftpimpl.jar,lib/cnet.jar,lib/clogging.jar">');
document.writeln('<PARAM NAME=NAME VALUE="fileupload">');
document.writeln('<PARAM NAME="type" VALUE="application/x-java-applet;version=1.6">');
document.writeln('<PARAM NAME="scriptable" VALUE="true">');
document.writeln('<PARAM NAME="url" VALUE="ftp://ftp.alltexan.com">');
document.writeln('<PARAM NAME="param1" VALUE="username">');
document.writeln('<PARAM NAME="value1" VALUE="alltexan">');
document.writeln('<PARAM NAME="param2" VALUE="password">');
document.writeln('<PARAM NAME="value2" VALUE="Sonrise..777">');
document.writeln('<PARAM NAME="param3" VALUE="pasv">');
document.writeln('<PARAM NAME="value3" VALUE="false">');
document.writeln('<PARAM NAME="param4" VALUE="account">');
document.writeln('<PARAM NAME="value4" VALUE="www/allknowhisword/church/church_data/1/media_files">');
document.writeln('<PARAM NAME="resources" VALUE="i18n">');
document.writeln('<PARAM NAME="mode" VALUE="ftp">');
// END

From Java Console –

[INFO] E - Connected to ftp://ftp.alltexan.com
[INFO] E - 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 1 of 1000 allowed.
220-Local time is now 23:10. Server port: 21.
220-This is a private system - No anonymous login
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 15 minutes of inactivity.

[INFO] E - PASV disabled
[DEBUG] E - 230 OK. Current restricted directory is /

[INFO] FTPUploadTransfer - Upload started : C:\Users\Armstrong\Desktop\HOPCOG\2008_SongClip.mp4
[ERROR] FTPUploadTransfer - java.net.SocketException: Software caused connection abort: recv failed
[INFO] FTPUploadTransfer - Upload failed
[INFO] E - Disconnected from ftp://ftp.alltexan.com


=============== This is where I’m loading the same file using CuteFTP. ==============

STATUS:> Connect: Tuesday 00:24:20 07-09-2013
STATUS:> Connecting to ftp.alltexan.com
STATUS:> Connecting to ftp.alltexan.com (ip = 69.89.30.144)
STATUS:> Socket connected. Waiting for welcome message...
220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 2 of 1000 allowed.
220-Local time is now 23:24. Server port: 21.
220-This is a private system - No anonymous login
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 15 minutes of inactivity.
STATUS:> Connected. Authenticating...
COMMAND:> USER alltexan
331 User alltexan OK. Password required
COMMAND:> PASS ********
230 OK. Current restricted directory is /
STATUS:> Login successful
COMMAND:> TYPE I
200 TYPE is now 8-bit binary
STATUS:> This site can resume broken downloads
COMMAND:> PWD
257 "/" is your current location
COMMAND:> CWD www
250 OK. Current directory is /www
COMMAND:> TYPE A
200 TYPE is now ASCII
COMMAND:> REST 0
350 Restarting at 0
STATUS:> Retrieving directory listing...
COMMAND:> PASV
227 Entering Passive Mode (69,89,30,144,114,135)
COMMAND:> LIST -a
STATUS:> Connecting data socket...
150 Accepted data connection
226-Options: -a -l
226 103 matches total
STATUS:> Received 7738 bytes Ok.
STATUS:> Time: 0:00:01, Efficiency: 7.56 KBytes/s (7738 bytes/s)
STATUS:> Done.
COMMAND:> CWD allknowhisword
250 OK. Current directory is /www/allknowhisword
STATUS:> Retrieving directory listing...
COMMAND:> PASV
227 Entering Passive Mode (69,89,30,144,138,195)
COMMAND:> LIST -a
STATUS:> Connecting data socket...
150 Accepted data connection
226-Options: -a -l
226 22 matches total
STATUS:> Received 1593 bytes Ok.
STATUS:> Time: 0:00:01, Efficiency: 1.56 KBytes/s (1593 bytes/s)
STATUS:> Done.
COMMAND:> CWD church
250 OK. Current directory is /www/allknowhisword/church
STATUS:> Retrieving directory listing...
COMMAND:> PASV
227 Entering Passive Mode (69,89,30,144,228,158)
COMMAND:> LIST -a
STATUS:> Connecting data socket...
150 Accepted data connection
226-Options: -a -l
226 52 matches total
STATUS:> Received 4127 bytes Ok.
STATUS:> Time: 0:00:01, Efficiency: 4.03 KBytes/s (4127 bytes/s)
STATUS:> Done.
COMMAND:> CWD church_data
250 OK. Current directory is /www/allknowhisword/church/church_data
STATUS:> Retrieving directory listing...
COMMAND:> PASV
227 Entering Passive Mode (69,89,30,144,190,218)
COMMAND:> LIST -a
STATUS:> Connecting data socket...
150 Accepted data connection
226-Options: -a -l
226 4 matches total
STATUS:> Received 261 bytes Ok.
STATUS:> Time: 0:00:01, Efficiency: 0.25 KBytes/s (261 bytes/s)
STATUS:> Done.
COMMAND:> CWD 1
250 OK. Current directory is /www/allknowhisword/church/church_data/1
STATUS:> Retrieving directory listing...
COMMAND:> PASV
227 Entering Passive Mode (69,89,30,144,236,150)
COMMAND:> LIST -a
STATUS:> Connecting data socket...
150 Accepted data connection
226-Options: -a -l
226 10 matches total
STATUS:> Received 745 bytes Ok.
STATUS:> Time: 0:00:01, Efficiency: 0.73 KBytes/s (745 bytes/s)
STATUS:> Done.
COMMAND:> CWD media_files
250 OK. Current directory is /www/allknowhisword/church/church_data/1/media_files
STATUS:> Retrieving directory listing...
COMMAND:> PASV
227 Entering Passive Mode (69,89,30,144,134,74)
COMMAND:> LIST -a
STATUS:> Connecting data socket...
150 Accepted data connection
226-Options: -a -l
226 18 matches total
STATUS:> Received 1388 bytes Ok.
STATUS:> Time: 0:00:01, Efficiency: 1.36 KBytes/s (1388 bytes/s)
STATUS:> Done.
COMMAND:> PASV
227 Entering Passive Mode (69,89,30,144,152,220)
COMMAND:> LIST -a
STATUS:> Connecting data socket...
150 Accepted data connection
226-Options: -a -l
226 17 matches total
STATUS:> Received 1307 bytes Ok.
STATUS:> Time: 0:00:01, Efficiency: 1.28 KBytes/s (1307 bytes/s)
STATUS:> Done.
COMMAND:> TYPE I
200 TYPE is now 8-bit binary
STATUS:> Sending 2008_SongClip.mov
COMMAND:> PASV
227 Entering Passive Mode (69,89,30,144,151,77)
COMMAND:> STOR 2008_SongClip.mov
STATUS:> Connecting data socket...
150 Accepted data connection
STATUS:> Send successful
STATUS:> Time: 0:00:01, Efficiency: 61.90 KBytes/s (63383 bytes/s)
226-File successfully transferred
226 1.013 seconds (measured here), 61.12 Kbytes per second
STATUS:> Successfully sent c:\users\armstrong\desktop\hopcog\2008_SongClip.mov
COMMAND:> TYPE A
200 TYPE is now ASCII
STATUS:> Retrieving directory listing...
COMMAND:> PASV
227 Entering Passive Mode (69,89,30,144,255,1)
COMMAND:> LIST -a
STATUS:> Connecting data socket...
150 Accepted data connection
226-Options: -a -l
226 18 matches total
STATUS:> Received 1388 bytes Ok.
STATUS:> Time: 0:00:01, Efficiency: 1.36 KBytes/s (1388 bytes/s)
STATUS:> Done.

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: java.net.SocketException

Post by support »


Post Reply