Menu

java.net.SocketException: Connection reset

Help
2009-07-24
2012-09-21
  • Neil Walden

    Neil Walden - 2009-07-24

    Im using the chunked upload in jupload and its been working fine for me and a few other people but one of my users keeps reporting this error when they try and upload. It seems to me to be happening after the first chunk has been sent?

    I upgraded to use the same set up as them (firefox 3.5 and java 1.6.0_14) and I cant replicate it.

    Does anyone know what it might be, im thinking maybe something on his setup like a firewall problem or something? Heres the log file:

    15:55:38.656 [INFO] JUpload applet started, with wjhk.jupload2.policies.DefaultUploadPolicy upload policy
    15:55:38.671 [INFO] Debug level set to 0
    15:55:38.671 [INFO] lang = null, taking default language
    15:55:40.656 [INFO] JUpload applet, version 4.3.2 [SVN-Rev: 735] (compiled: 05/05/2009 11:13 AM), available at http://jupload.sourceforge.net/
    15:55:40.656 [INFO] maxFileSize: 2147483648
    15:55:42.796 [INFO] JUploadApplet is now started.
    15:55:52.640 [INFO] Debug level set to 100
    15:55:52.640 [DEBUG] =======================================================================
    15:55:52.640 [DEBUG] ======= Parameters managed by DefaultUploadPolicy
    15:55:52.640 [INFO] JUpload applet, version 4.3.2 [SVN-Rev: 735] (compiled: 05/05/2009 11:13 AM), available at http://jupload.sourceforge.net/
    15:55:52.640 [DEBUG] Java version: 1.6.0_14
    15:55:52.640 [DEBUG] Cookie: PHPSESSID=9kloqqv2db1uskvnp2vvd44mu4
    15:55:52.640 [DEBUG] userAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1
    15:55:52.640 [DEBUG] List of all applet parameters:
    15:55:52.640 [DEBUG] language: en
    15:55:52.640 [DEBUG] country:
    15:55:52.656 [DEBUG] afterUploadURL: javascript:processResponse(%success%, '%msg%');
    15:55:52.656 [DEBUG] allowHttpPersistent: false
    15:55:52.656 [DEBUG] allowedFileExtensions: /wav/
    15:55:52.656 [DEBUG] browsingDirectory (current value): null
    15:55:52.656 [DEBUG] debugLevel: 100
    15:55:52.656 [DEBUG] fileChooserIconFromFileContent: 0
    15:55:52.656 [DEBUG] fileChooserIconSize: 20
    15:55:52.656 [DEBUG] filenameEncoding: null
    15:55:52.656 [DEBUG] ftpCreateDirectoryStructure: false
    15:55:52.656 [DEBUG] ftpTransfertBinary: true
    15:55:52.656 [DEBUG] ftpTransfertPassive: true
    15:55:52.656 [DEBUG] lang: null
    15:55:52.656 [DEBUG] maxChunkSize: 7340032
    15:55:52.656 [INFO] maxFileSize: 2147483648
    15:55:52.656 [DEBUG] nbFilesPerRequest: 1
    15:55:52.656 [DEBUG] postURL: http://criticalrhythm.zanixit.com/views/audio/process_upload.php
    15:55:52.656 [DEBUG] readCookieFromNavigator: true
    15:55:52.656 [DEBUG] serverProtocol: HTTP/1.1
    15:55:52.656 [DEBUG] showLogWindow: true
    15:55:52.656 [DEBUG] showStatusbar: true
    15:55:52.656 [DEBUG] specificHeaders: null
    15:55:52.656 [DEBUG] stringUploadError: ^ERROR: (.)$
    15:55:52.656 [DEBUG] stringUploadSuccess: ^SUCCESS$
    15:55:52.656 [DEBUG] stringUploadWarning: ^WARNING: (.
    )$
    15:55:52.656 [DEBUG] urlToSendErrorTo: null
    15:55:52.656 [DEBUG]
    15:55:54.718 [DEBUG] Action : Browse ...
    15:56:00.000 [DEBUG] [JUploadFileView] Directory changed
    15:56:04.078 [DEBUG] Creation of the DefaultFileData for C:\Documents and Settings\Panagiotis Georgiou\Desktop\SerhiyKlimenkov_Chavash_OriginalMix.wav(root: C:\Documents and Settings\Panagiotis Georgiou\Desktop)
    15:56:04.078 [DEBUG] Mime types list loaded Ok (/conf/mimetypes.properties)
    15:56:15.203 [DEBUG] Action : Upload
    15:56:15.203 [DEBUG] DefaultFileUploadThread created
    15:56:15.203 [DEBUG] Using wjhk.jupload2.upload.FileUploadThreadHTTP
    15:56:15.203 [DEBUG] Upload done by using the wjhk.jupload2.upload.FileUploadThreadHTTP class
    15:56:15.218 [DEBUG] Start of the FileUploadThread
    15:56:15.234 [DEBUG] Start of the FileUploadManagerThread
    15:56:15.234 [DEBUG] Timer started
    15:56:15.234 [DEBUG] ============== Start of file preparation (SerhiyKlimenkov_Chavash_OriginalMix.wav)
    15:56:15.234 [DEBUG] ============== End of file preparation (SerhiyKlimenkov_Chavash_OriginalMix.wav)
    15:56:15.234 [DEBUG] Waiting for fileUploadThread to die
    15:56:15.421 [DEBUG] Before do upload
    15:56:15.421 [DEBUG] Trying to add formdata element num 0 (name: track_id, value: 60, type: hidden, class: null)
    15:56:15.421 [DEBUG] Trying to add formdata element num 1 (name: uploaded_name, value: 60_280378537.wav, type: hidden, class: null)
    15:56:17.968 [DEBUG] file 0: content=104870804 bytes, getAdditionnalBytesForUpload=1503 bytes
    15:56:17.968 [DEBUG] chunkHttpParam: jupart=1&jufinal=0
    15:56:17.984 [DEBUG] Cookie: PHPSESSID=9kloqqv2db1uskvnp2vvd44mu4
    15:56:17.984 [DEBUG] User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1
    15:56:17.984 [DEBUG] [HTTPConnectionHelper append] Content-Type: multipart/form-data; boundary=
    15:56:17.984 [DEBUG] [HTTPConnectionHelper append] ---------------------------ygr9vjgg4y2
    15:56:17.984 [DEBUG] [HTTPConnectionHelper append]
    15:56:17.984 [DEBUG] [HTTPConnectionHelper append] Content-Length:
    15:56:17.984 [DEBUG] [HTTPConnectionHelper append] 7341856
    15:56:17.984 [DEBUG] [HTTPConnectionHelper append]
    15:56:17.984 [DEBUG] [HTTPConnectionHelper append]
    15:56:17.984 [DEBUG] [HTTPConnectionHelper append] -----------------------------ygr9vjgg4y2
    15:56:17.984 [DEBUG] Content-Disposition: form-data; name="jufinal"
    15:56:17.984 [DEBUG] Content-Transfer-Encoding: 8bit
    15:56:17.984 [DEBUG] Content-Type: text/plain; UTF-8
    15:56:17.984 [DEBUG]
    15:56:17.984 [DEBUG] 0
    15:56:17.984 [DEBUG] -----------------------------ygr9vjgg4y2
    15:56:17.984 [DEBUG] Content-Disposition: form-data; name="jupart"
    15:56:17.984 [DEBUG] Content-Transfer-Encoding: 8bit
    15:56:17.984 [DEBUG] Content-Type: text/plain; UTF-8
    15:56:17.984 [DEBUG]
    15:56:17.984 [DEBUG] 1
    15:56:17.984 [DEBUG] Using non SSL socket, direct connection
    15:56:18.000 [DEBUG] === main header (len=739):
    15:56:18.000 [DEBUG] POST /views/audio/process_upload.php?jupart=1&jufinal=0 HTTP/1.1\r\n
    15:56:18.000 [DEBUG] Host: criticalrhythm.zanixit.com\r\n
    15:56:18.000 [DEBUG] Accept: /\r\n
    15:56:18.000 [DEBUG] Accept-Encoding: identity\r\n
    15:56:18.000 [DEBUG] Connection: close\r\n
    15:56:18.000 [DEBUG] Cookie: PHPSESSID=9kloqqv2db1uskvnp2vvd44mu4\r\n
    15:56:18.000 [DEBUG] User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1\r\n
    15:56:18.000 [DEBUG] Content-Type: multipart/form-data; boundary=---------------------------ygr9vjgg4y2\r\n
    15:56:18.000 [DEBUG] Content-Length: 7341856\r\n
    15:56:18.000 [DEBUG] \r\n
    15:56:18.000 [DEBUG] -----------------------------ygr9vjgg4y2\r\n
    15:56:18.000 [DEBUG] Content-Disposition: form-data; name="jufinal"\r\n
    15:56:18.000 [DEBUG] Content-Transfer-Encoding: 8bit\r\n
    15:56:18.000 [DEBUG] Content-Type: text/plain; UTF-8\r\n
    15:56:18.000 [DEBUG] \r\n
    15:56:18.000 [DEBUG] 0\r\n
    15:56:18.000 [DEBUG] -----------------------------ygr9vjgg4y2\r\n
    15:56:18.000 [DEBUG] Content-Disposition: form-data; name="jupart"\r\n
    15:56:18.000 [DEBUG] Content-Transfer-Encoding: 8bit\r\n
    15:56:18.000 [DEBUG] Content-Type: text/plain; UTF-8\r\n
    15:56:18.000 [DEBUG] \r\n
    15:56:18.000 [DEBUG] 1\r\n
    15:56:18.015 [DEBUG] === main header end
    15:56:18.031 [DEBUG] --- fileheader start (len=1264):
    15:56:18.046 [DEBUG] -----------------------------ygr9vjgg4y2\r\n
    15:56:18.046 [DEBUG] Content-Disposition: form-data; name="track_id"\r\n
    15:56:18.046 [DEBUG] Content-Transfer-Encoding: 8bit\r\n
    15:56:18.046 [DEBUG] Content-Type: text/plain; UTF-8\r\n
    15:56:18.046 [DEBUG] \r\n
    15:56:18.046 [DEBUG] 60\r\n
    15:56:18.046 [DEBUG] -----------------------------ygr9vjgg4y2\r\n
    15:56:18.046 [DEBUG] Content-Disposition: form-data; name="uploaded_name"\r\n
    15:56:18.046 [DEBUG] Content-Transfer-Encoding: 8bit\r\n
    15:56:18.046 [DEBUG] Content-Type: text/plain; UTF-8\r\n
    15:56:18.046 [DEBUG] \r\n
    15:56:18.046 [DEBUG] 60_280378537.wav\r\n
    15:56:18.046 [DEBUG] -----------------------------ygr9vjgg4y2\r\n
    15:56:18.046 [DEBUG] Content-Disposition: form-data; name="mimetype[]"\r\n
    15:56:18.046 [DEBUG] Content-Transfer-Encoding: 8bit\r\n
    15:56:18.046 [DEBUG] Content-Type: text/plain; UTF-8\r\n
    15:56:18.046 [DEBUG] \r\n
    15:56:18.046 [DEBUG] audio/x-wav\r\n
    15:56:18.046 [DEBUG] -----------------------------ygr9vjgg4y2\r\n
    15:56:18.046 [DEBUG] Content-Disposition: form-data; name="pathinfo[]"\r\n
    15:56:18.046 [DEBUG] Content-Transfer-Encoding: 8bit\r\n
    15:56:18.046 [DEBUG] Content-Type: text/plain; UTF-8\r\n
    15:56:18.046 [DEBUG] \r\n
    15:56:18.046 [DEBUG] C:\Documents and Settings\Panagiotis Georgiou\Desktop\r\n
    15:56:18.046 [DEBUG] -----------------------------ygr9vjgg4y2\r\n
    15:56:18.046 [DEBUG] Content-Disposition: form-data; name="relpathinfo[]"\r\n
    15:56:18.046 [DEBUG] Content-Transfer-Encoding: 8bit\r\n
    15:56:18.046 [DEBUG] Content-Type: text/plain; UTF-8\r\n
    15:56:18.046 [DEBUG] \r\n
    15:56:18.046 [DEBUG] \r\n
    15:56:18.046 [DEBUG] -----------------------------ygr9vjgg4y2\r\n
    15:56:18.046 [DEBUG] Content-Disposition: form-data; name="filemodificationdate[]"\r\n
    15:56:18.046 [DEBUG] Content-Transfer-Encoding: 8bit\r\n
    15:56:18.046 [DEBUG] Content-Type: text/plain; UTF-8\r\n
    15:56:18.046 [DEBUG] \r\n
    15:56:18.046 [DEBUG] 28/02/2009 19:27:06\r\n
    15:56:18.046 [DEBUG] -----------------------------ygr9vjgg4y2\r\n
    15:56:18.046 [DEBUG] Content-Disposition: form-data; name="File0"; filename="SerhiyKlimenkov_Chavash_OriginalMix.wav"\r\n
    15:56:18.046 [DEBUG] Content-Type: audio/x-wav\r\n
    15:56:18.046 [DEBUG] \r\n
    15:56:18.062 [DEBUG] --- fileheader end
    15:56:18.062 [DEBUG] in UploadFileData.uploadFile (amount:7340032, getUploadLength(): 104870804)
    15:56:18.453 [DEBUG] --- filetail start (len=239):
    15:56:18.453 [DEBUG] \r\n
    15:56:18.453 [DEBUG] -----------------------------ygr9vjgg4y2\r\n
    15:56:18.453 [DEBUG] Content-Disposition: form-data; name="md5sum[]"\r\n
    15:56:18.453 [DEBUG] Content-Transfer-Encoding: 8bit\r\n
    15:56:18.453 [DEBUG] Content-Type: text/plain; UTF-8\r\n
    15:56:18.453 [DEBUG] \r\n
    15:56:18.453 [DEBUG] ba7e6d799d84da08e082ab15f11b0316\r\n
    15:56:18.453 [DEBUG] -----------------------------ygr9vjgg4y2--\r\n
    15:56:18.468 [DEBUG] --- filetail end
    15:58:18.390 [ERROR] [wjhk.jupload2.exception.JUploadException:java.net.SocketException] Connection reset (java.net.SocketException: Connection reset)
    15:58:18.406 wjhk.jupload2.exception.JUploadException: java.net.SocketException: Connection reset
    15:58:18.406 at wjhk.jupload2.upload.helper.HTTPInputStreamReader.readHttpResponse(HTTPInputStreamReader.java:184)
    15:58:18.406 at wjhk.jupload2.upload.helper.HTTPConnectionHelper.readHttpResponse(HTTPConnectionHelper.java:685)
    15:58:18.406 at wjhk.jupload2.upload.FileUploadThreadHTTP.finishRequest(FileUploadThreadHTTP.java:163)
    15:58:18.406 at wjhk.jupload2.upload.DefaultFileUploadThread.doChunkedUpload(DefaultFileUploadThread.java:475)
    15:58:18.406 at wjhk.jupload2.upload.DefaultFileUploadThread.doUpload(DefaultFileUploadThread.java:382)
    15:58:18.406 at wjhk.jupload2.upload.DefaultFileUploadThread.run(DefaultFileUploadThread.java:297)
    15:58:18.406 Caused by: java.net.SocketException: Connection reset
    15:58:18.406 at java.net.SocketInputStream.read(Unknown Source)
    15:58:18.406 at java.net.SocketInputStream.read(Unknown Source)
    15:58:18.406 at java.io.FilterInputStream.read(Unknown Source)
    15:58:18.406 at java.io.PushbackInputStream.read(Unknown Source)
    15:58:18.406 at wjhk.jupload2.upload.helper.HTTPInputStreamReader.readLine(HTTPInputStreamReader.java:278)
    15:58:18.406 at wjhk.jupload2.upload.helper.HTTPInputStreamReader.readLine(HTTPInputStreamReader.java:239)
    15:58:18.406 at wjhk.jupload2.upload.helper.HTTPInputStreamReader.readHeaders(HTTPInputStreamReader.java:360)
    15:58:18.406 at wjhk.jupload2.upload.helper.HTTPInputStreamReader.readHttpResponse(HTTPInputStreamReader.java:171)
    15:58:18.406 ... 5 more
    15:58:18.406 Caused by:
    15:58:18.406 java.net.SocketException: Connection reset
    15:58:18.406 at java.net.SocketInputStream.read(Unknown Source)
    15:58:18.406 at java.net.SocketInputStream.read(Unknown Source)
    15:58:18.406 at java.io.FilterInputStream.read(Unknown Source)
    15:58:18.406 at java.io.PushbackInputStream.read(Unknown Source)
    15:58:18.406 at wjhk.jupload2.upload.helper.HTTPInputStreamReader.readLine(HTTPInputStreamReader.java:278)
    15:58:18.406 at wjhk.jupload2.upload.helper.HTTPInputStreamReader.readLine(HTTPInputStreamReader.java:239)
    15:58:18.406 at wjhk.jupload2.upload.helper.HTTPInputStreamReader.readHeaders(HTTPInputStreamReader.java:360)
    15:58:18.406 at wjhk.jupload2.upload.helper.HTTPInputStreamReader.readHttpResponse(HTTPInputStreamReader.java:171)
    15:58:18.406 at wjhk.jupload2.upload.helper.HTTPConnectionHelper.readHttpResponse(HTTPConnectionHelper.java:685)
    15:58:18.406 at wjhk.jupload2.upload.FileUploadThreadHTTP.finishRequest(FileUploadThreadHTTP.java:163)
    15:58:18.406 at wjhk.jupload2.upload.DefaultFileUploadThread.doChunkedUpload(DefaultFileUploadThread.java:475)
    15:58:18.406 at wjhk.jupload2.upload.DefaultFileUploadThread.doUpload(DefaultFileUploadThread.java:382)
    15:58:18.406 at wjhk.jupload2.upload.DefaultFileUploadThread.run(DefaultFileUploadThread.java:297)
    16:09:26.484 [DEBUG] End of the FileUploadThread
    16:09:26.484 [INFO] Sending debug information to null
    16:09:31.484 [DEBUG] End of the FileUploadManagerThread

     
    • Etienne

      Etienne - 2009-07-24

      Hum, hum,

      That's a hard one.

      Yes it looks like the applet can't read the response from the first chunk request.

      From your comment(s), I guess you try to upload such a big file...

      One interesting thing would be to put the applet in debug mode when it starts: add the debugLevel parameter to 100, in the APPLET tag.

      You'll then see the result of the first HEAD request to the postURL, that is done before logging the line 'JUploadApplet is now started'.
      You can then see if this a problem in the upload itself (if the HEAD is Ok), or in the communication between the applet and the server (if the HEAD is KO too).

      If it's the second one, check the network Java configuration on the 'faulty' computer (fro the Java control panel).

      Etienne

       
      • Neil Walden

        Neil Walden - 2009-07-25

        Cant test this until after the weekend now but im assuming for the minute its the second one as ive uploaded the exact same file to the exact same page with the same java version and browser and I dont get the error!

        Any pointers on what I would be looking for in their java config that might be causing the issue?

        Thanks, Neil

         
    • Etienne

      Etienne - 2009-07-25

      In the Java control Panel (available on the Control Panel, when in Windows), check the network configuration. You have choices like: direct connection, proxy, or use the navigator configuration.

      Then, if he has a laptop, he can change of place (another network, at home or at work for instance), to see if the problem is relevant to his/her computer or to his/her network.

      Etienne

       

Log in to post a comment.