Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-5452

AXIS-1.6.2 Exception org.apache.axis2.AxisFault: Address already in use: connect

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.6.2
    • Fix Version/s: None
    • Component/s: client-api
    • Labels:
      None
    • Environment:
      Windows XP

      Description

      Hello,

      IF THIS IS A DEFECT THEN IT SHOULD HAVE PROBABLY LOWEST PRIORITY.

      I am using a Axis client to call a webservice requiring client certificate for mutual authentication. This is a batch job making frequent invocations of the webservice (e.g 20-30 invocations per second). If the client certificate is incorrect then I get "No trusted certificate found exception" which is expected. However after about 1000 or more invocation, I start getting following exception instead of bad_certificate exception.

      I do not get the following exception when the certificate is trusted. Everything works fine. Is there a way to avoid following exception even in the other scenario when certificate is untrusted? I am expecting consistent "No trusted certificate found" exception that time.

      Caused by: org.apache.axis2.AxisFault: Address already in use: connect
      at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
      at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:197)
      at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
      at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:404)
      at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:231)
      at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:443)
      at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:406)
      at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
      at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
      at au.com.westpac.wsdl.generated.client.AdaptiveAuthenticationStub.createUser(AdaptiveAuthenticationStub.java:1068)
      ... 13 more
      Caused by: java.net.BindException: Address already in use: connect
      at java.net.PlainSocketImpl.socketConnect(Native Method)
      at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:413)
      at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:274)
      at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:261)
      at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:389)
      at java.net.Socket.connect(Socket.java:556)
      at com.ibm.jsse2.pc.connect(pc.java:642)
      at sun.reflect.GeneratedMethodAccessor112.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:619)
      at org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocketFactory.java:140)
      at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:130)
      at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
      at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
      at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
      at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
      at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
      at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:621)
      at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:193)
      ... 21 more

      Exception that I get for untrusted certificate (which is expected):

      Caused by: org.apache.axis2.AxisFault: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: com.ibm.jsse2.util.h: No trusted certificate found
      at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
      at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:78)
      at org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:84)
      at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499)
      at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
      at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
      at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
      at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
      at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
      at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:621)
      at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:193)
      at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
      at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:404)
      at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:231)
      at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:443)
      at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:406)
      at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
      at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
      at au.com.westpac.wsdl.generated.client.AdaptiveAuthenticationStub.createUser(AdaptiveAuthenticationStub.java:1068)
      ... 13 more
      Caused by: com.ctc.wstx.exc.WstxIOException: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: com.ibm.jsse2.util.h: No trusted certificate found
      at com.ctc.wstx.sw.BaseStreamWriter.finishDocument(BaseStreamWriter.java:1692)
      at com.ctc.wstx.sw.BaseStreamWriter.close(BaseStreamWriter.java:288)
      at org.apache.axiom.util.stax.wrapper.XMLStreamWriterWrapper.close(XMLStreamWriterWrapper.java:46)
      at org.apache.axiom.om.impl.MTOMXMLStreamWriter.close(MTOMXMLStreamWriter.java:222)
      at org.apache.axiom.om.impl.llom.OMSerializableImpl.serializeAndConsume(OMSerializableImpl.java:192)
      at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:74)
      ... 30 more
      Caused by: javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: com.ibm.jsse2.util.h: No trusted certificate found
      at com.ibm.jsse2.pc.j(pc.java:135)
      at com.ibm.jsse2.pc.k(pc.java:458)
      at com.ibm.jsse2.j.write(j.java:19)
      at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:88)
      at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:146)
      at org.apache.commons.httpclient.ChunkedOutputStream.flush(ChunkedOutputStream.java:191)
      at com.ctc.wstx.io.UTF8Writer.flush(UTF8Writer.java:99)
      at com.ctc.wstx.sw.BufferingXmlWriter.flush(BufferingXmlWriter.java:214)
      at com.ctc.wstx.sw.BufferingXmlWriter.close(BufferingXmlWriter.java:194)
      at com.ctc.wstx.sw.BaseStreamWriter.finishDocument(BaseStreamWriter.java:1690)
      ... 35 more
      Caused by: javax.net.ssl.SSLHandshakeException: com.ibm.jsse2.util.h: No trusted certificate found

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sxpati2 Sachin Patil
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: