Forum Discussion

Kimberly_Stenge's avatar
Kimberly_Stenge
Occasional Contributor
16 years ago

SocketException

While doing testing using SoapUI found interesting observation.

We were doing test using approximately 10 K size XML file. We are adding more code to it and new XML has become almost 10 times more of this size to 110 K size.

When tried testing this new 110K size XML file on UNIX it worked once out of 15 times and once out of 60 times in windows.

All other times when it fails it gives error “SocketException”.

Actual Error:
2009-11-04 16:26:03 - Error getting response; java.lang.Exception: java.net.SocketException: Broken pipe

Need Help: [/font:vqhrii45]
What we can try to overcome this issue?
Do we need to set some kind of XML size some where?
Do we need to change socket related values any where?

Any help will be appreciated?

10 Replies

  • Using Soap 2.5.1

    Did not observed any other message in log?

    Do I need to change some setting related to Socket configuration. I tried one more XML with smaller size and it works always. So impresion I am geeting is bigger XML file making this unreliable. Any idea what I can check?
  • 12:42:13,083 DEBUG [SoapUIMultiThreadedHttpConnectionManager] HttpConnectionManager.getConnection:  config = HostConfiguration[host=http://155.90.82.7:25000], timeout = 0
    12:42:13,084 DEBUG [SoapUIMultiThreadedHttpConnectionManager] Getting free connection, hostConfig=HostConfiguration[host=http://155.90.82.7:25000]
    12:42:13,093 DEBUG [SoapUIMultiThreadedHttpConnectionManager] Freeing connection, hostConfig=HostConfiguration[host=http://155.90.82.7:25000]
    12:42:13,093 DEBUG [SoapUIMultiThreadedHttpConnectionManager] Notifying no-one, there are no waiting threads
    java.lang.NullPointerException
            at org.apache.commons.httpclient.HttpMethodBase.getStatusCode(HttpMethodBase.java:570)
            at com.eviware.soapui.impl.wsdl.submit.transports.http.BaseHttpResponse.(BaseHttpResponse.java:71)
            at com.eviware.soapui.impl.wsdl.submit.transports.http.SinglePartHttpResponse.(SinglePartHttpResponse.java:40)
            at com.eviware.soapui.impl.wsdl.submit.transports.http.support.attachments.WsdlSinglePartHttpResponse.(WsdlSinglePartHttpResponse.java:35)
            at com.eviware.soapui.impl.wsdl.submit.filters.WsdlPackagingResponseFilter.afterWsdlRequest(WsdlPackagingResponseFilter.java:45)
            at com.eviware.soapui.impl.wsdl.submit.filters.AbstractRequestFilter.afterAbstractHttpResponse(AbstractRequestFilter.java:62)
            at com.eviware.soapui.impl.wsdl.submit.filters.AbstractRequestFilter.afterRequest(AbstractRequestFilter.java:56)
            at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:164)
            at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:118)
            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
            at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
            at java.util.concurrent.FutureTask.run(FutureTask.java:123)
            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
            at java.lang.Thread.run(Thread.java:595)
    java.lang.NullPointerException
            at com.eviware.soapui.impl.wsdl.submit.transports.http.BaseHttpResponse.initHeaders(BaseHttpResponse.java:90)
            at com.eviware.soapui.impl.wsdl.submit.transports.http.BaseHttpResponse.(BaseHttpResponse.java:81)
            at com.eviware.soapui.impl.wsdl.submit.transports.http.SinglePartHttpResponse.(SinglePartHttpResponse.java:40)
            at com.eviware.soapui.impl.wsdl.submit.transports.http.support.attachments.WsdlSinglePartHttpResponse.(WsdlSinglePartHttpResponse.java:35)
            at com.eviware.soapui.impl.wsdl.submit.filters.WsdlPackagingResponseFilter.afterWsdlRequest(WsdlPackagingResponseFilter.java:45)
            at com.eviware.soapui.impl.wsdl.submit.filters.AbstractRequestFilter.afterAbstractHttpResponse(AbstractRequestFilter.java:62)
            at com.eviware.soapui.impl.wsdl.submit.filters.AbstractRequestFilter.afterRequest(AbstractRequestFilter.java:56)
            at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:164)
            at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:118)
            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
            at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
            at java.util.concurrent.FutureTask.run(FutureTask.java:123)
            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
            at java.lang.Thread.run(Thread.java:595)
    12:42:13,096 ERROR [WsdlSubmit] Exception in request: java.lang.Exception: java.net.SocketException: Broken pipe
    12:42:13,096 ERROR [SoapUI] An error occured [java.net.SocketException: Broken pipe], see error log for details
    12:42:13,115 INFO  [AbstractHttpRequestDesktopPanel] Error getting response for [OMQuotePortSoapBinding.createQuoteItems_2:Copy of createQuoteItems_2 - CreateQuoteItems]; java.lang.Exception: java.net.SocketException: Broken pipe
  • Installed latest build now error has changed from broken pipe to connection reset.

    Any idea what I can try now?

    Error:
    Mon Nov 16 17:25:05 EST 2009:ERROR:java.net.SocketException: Connection reset
      java.net.SocketException: Connection reset

      at java.net.SocketOutputStream.socketWrite(Unknown Source)

      at java.net.SocketOutputStream.write(Unknown Source)

      at java.io.BufferedOutputStream.write(Unknown Source)

      at java.io.FilterOutputStream.write(Unknown Source)


    Soap Ui Log:
    17:25:05,909 DEBUG [SoapUIMultiThreadedHttpConnectionManager] Allocating new connection, hostConfig=HostConfiguration[host=http://155.90.82.7:25000]
    17:25:05,964 DEBUG [SoapUIMultiThreadedHttpConnectionManager] Freeing connection, hostConfig=HostConfiguration[host=http://155.90.82.7:25000]
    17:25:05,965 DEBUG [SoapUIMultiThreadedHttpConnectionManager] Notifying no-one, there are no waiting threads
    17:25:05,969 ERROR [WsdlSubmit] Exception in request: java.net.SocketException: Connection reset
    17:25:05,970 ERROR [SoapUI] An error occured [Connection reset], see error log for details
    17:25:05,985 INFO  [AbstractHttpRequestDesktopPanel] Error getting response for [OMQuotePortSoapBinding.createQuoteItems_2:Copy of createQuoteItems_2 - CreateQuoteItems]; java.net.SocketException: Connection reset
  • Hello,

    You can check the soapUI Preferences > HTTP Settings and make sure the "Socket Timeout" setting is either blank or set to a high enough value. However, this looks to me like the connection is being closed on the server side. Could there be a timeout set on the server which prevents the full request from being transferred?

    Regards,
    Dain
    eviware.com
  • I don't know where I can check timeout for server side. But I tried installing "tcpmon" today and route traffic through "tcpmon" to reach my server and API call did work.

    Looks like when SoapUI Directly tries to talk to my server it has issue. But when SoapUI talks to "tcpmon" and "tcpmon" talks to Application it seems to be working.

    Any idea why this may be the case?
    What all diffrent things I can check?

    I will update once I try to use "tcpmon" for more testing.
  • Hi!

    wow.. that is strange.. which HTTP version are you using ? (settable in global http preferences)

    regards,

    /Ole
    eviware.com
  • HTTP 1.1

    After TCPMON installation problem is coming after few hunderd or thousand runs. If I try to do direct hit less than 10 calls work from batch of 100.

    So looks like TCPMON just delay problem arrival.

    Not able to figure out what all things I can check or configure.

    Any help will be appriciated.
  • We tried running API's through Apache and found that they are more reliable compare to hitting application JVM.

    Have anybody observed this. Any reason why hits through Apache will be working but not direct hit on application JVM.