0 Replies Latest reply on Mar 25, 2011 5:45 PM by matthiaswille

    Software caused connection abort: socket write error

    matthiaswille

      I have developed a web service for uploading and downloading files running on a Lotus Domino server. The web service is working fine, except if consumed by Flex. When uploading files from an Air application compiled for Android devices (Flash Builder 4 Burito, SDK Hero Build 17689) I'm receiving intermittend errors.

       

      The web service call triggers a FaultEvent (though the file is correctly uploaded and attached to a Notes document)...

       

      (mx.messaging.messages::ErrorMessage)#0

        body = ""

        clientId = "DirectHTTPChannel0"

        correlationId = "B9741A25-2718-A11F-5ED6-EE8A94387A38"

        destination = ""

        extendedData = (null)

        faultCode = "Server.Error.Request"

        faultDetail = "Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://localhost:37813/soapgateq_16.nsf/DominoUtilityWebServices?hostport=demo.flexdomino. net&https=N&id=B9741A25-2718-A11F-5ED6-EE8A94387A38" errorID=2032]. URL: http://demo.flexdomino.net/soapgateq_16.nsf/DominoUtilityWebServices"

        faultString = "HTTP request error"

        headers = (Object)#1

          DSStatusCode = 0

        messageId = "4FFB6936-ED6C-D707-EC48-EF5C1C0CA730"

        rootCause = (flash.events::IOErrorEvent)#2

          bubbles = false

          cancelable = false

          currentTarget = (flash.net::URLLoader)#3

            bytesLoaded = 0

            bytesTotal = 0

            data = ""

            dataFormat = "text"

          errorID = 2032

          eventPhase = 2

          target = (flash.net::URLLoader)#3

          text = "Error #2032: Stream Error. URL: http://localhost:37813/soapgateq_16.nsf/DominoUtilityWebServices?hostport=demo.flexdomino. net&https=N&id=B9741A25-2718-A11F-5ED6-EE8A94387A38"

          type = "ioError"

        timestamp = 0

        timeToLive = 0

       

      I have researched the error and it seems it is a misleading error message resulting from the fact that certain HTTP error codes cannot be handled by the WebService class. So I used the Network Monitor to see what is happening exactly and I'm stuck with what the Network Monitor reports...

       

      socketerror.png

       

      I highlighted the response body as it shows the correct return value (the unique id of the document the uploaded file has been attached to).

       

      To summarize this: the web service call does everything as it should. The file is uploaded, attached to a document and the unique id of that document is returned. However, intermittantly a FaultEvent is triggered. Filesize doesn't matter; sometimes a 3MB file triggers the error whilst a 12MB file is fine. Network connectivity is not an issue as client and server run on the same machine.

       

      I was thinking of a time out problem, but for the Domino server the time out is set to 120 seconds and on the flex side it is set to infinite. In average the web service execution takes around 20 seconds depending on the filesize.   

       

      So I'm at loss. Any ideas are appreciated.