Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 44786 invoked from network); 10 Feb 2009 20:11:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Feb 2009 20:11:21 -0000 Received: (qmail 13356 invoked by uid 500); 10 Feb 2009 20:11:17 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 13309 invoked by uid 500); 10 Feb 2009 20:11:17 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 13300 invoked by uid 99); 10 Feb 2009 20:11:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Feb 2009 12:11:17 -0800 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [129.41.63.60] (HELO out002.atlarge.net) (129.41.63.60) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Feb 2009 20:11:05 +0000 Received: from mail-41ps.atlarge.net ([10.100.60.10]) by out002.atlarge.net with Microsoft SMTPSVC(6.0.3790.1830); Tue, 10 Feb 2009 14:06:37 -0600 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C98BBB.10021DBE" Subject: Axis2 doesn't play nice with PFP (payflow, paypal) Date: Tue, 10 Feb 2009 14:10:40 -0600 Message-ID: <9BCCB7054FD99E499020515FAC2D4C81017275AF@mail-41ps.atlarge.net> In-Reply-To: <9BCCB7054FD99E499020515FAC2D4C810165ABDD@mail-41ps.atlarge.net> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Axis2 doesn't play nice with PFP (payflow, paypal) Thread-Index: AcmA1q8dwgnUftwAR/m8UY25Fjql+wK4J4SQ References: <9BCCB7054FD99E499020515FAC2D4C810165ABDD@mail-41ps.atlarge.net> From: "Grover Smith" To: X-OriginalArrivalTime: 10 Feb 2009 20:06:37.0796 (UTC) FILETIME=[14A03A40:01C98BBB] X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. ------_=_NextPart_001_01C98BBB.10021DBE Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable This may be somewhat of an obscure issue, but we have discovered that after making a PFP transaction (basically a creditcard processing API call though paypal), our Axis2 based communication ceases to function completely. Before making the PFP call, our Axis2 client can successfully send soap requests and receive soap responses from a remote server. After making a PFP API call, all future Axis2 soap requests immediately receive a connection refused error. ngrep shows that packets are no longer being sent to the remote soap server, but connection refused exceptions are thrown from what appears to be the native http socket connection. We have reproduced this on 2 different JVMs: Jrockit jdk1.5.0_11 Sun jdk 1.5.0_17 =20 The OS running the Axis2 client and making the PFP calls is Linux. =20 Once this state is entered, the only way to re-establish successful Axis2 soap communication is to restart the appserver (jboss). This almost seems like a system resource contention issue. However, making Axis2 soap calls first does not break the PFP call. Any ideas as to what might be happening or how to work around this issue would be appreciated. A partial stack trace of the connection refused exception follows. =20 Thanks, Grover Smith =20 2009-01-29 19:09:00,843 [http-0.0.0.0-8080-10] INFO [org.apache.commons.httpclient.HttpMethodDirector] I/O exception (java.net.ConnectException) caught when processing request: Connection refused 2009-01-29 19:09:00,843 [http-0.0.0.0-8080-10] INFO [org.apache.commons.httpclient.HttpMethodDirector] Retrying request 2009-01-29 19:09:00,844 [http-0.0.0.0-8080-10] INFO [org.apache.commons.httpclient.HttpMethodDirector] I/O exception (java.net.ConnectException) caught when processing request: Connection refused 2009-01-29 19:09:00,844 [http-0.0.0.0-8080-10] INFO [org.apache.commons.httpclient.HttpMethodDirector] Retrying request 2009-01-29 19:09:00,844 [http-0.0.0.0-8080-10] INFO [org.apache.commons.httpclient.HttpMethodDirector] I/O exception (java.net.ConnectException) caught when processing request: Connection refused 2009-01-29 19:09:00,844 [http-0.0.0.0-8080-10] INFO [org.apache.commons.httpclient.HttpMethodDirector] Retrying request 2009-01-29 19:09:00,844 [http-0.0.0.0-8080-10] INFO [org.apache.axis2.transport.http.HTTPSender] Unable to sendViaPost to url[https://www.xyz.com/911form/wsdl/e911/soap_server2.php] java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:519) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:54 9) at sun.reflect.GeneratedMethodAccessor1136.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSoc ket(ReflectionSocketFactory.java:140) at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSo cket(SSLProtocolSocketFactory.java:130) at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:70 7) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpCon nectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361) at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMe thodDirector.java:387) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMetho dDirector.java:171) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:3 97) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:3 46) at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(Abstrac tHTTPSender.java:542) at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:1 89) at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageW ithCommons(CommonsHTTPTransportSender.java:371) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(Common sHTTPTransportSender.java:209) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper ation.java:401) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInA xisOperation.java:228) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163 ) at com._xyz.soap.wsdl.Address_ServiceStub.addEnterpriseRequest(Address_Serv iceStub.java:686) =20 =20 From: Grover Smith [mailto:Grover.Smith@vocalocity.com]=20 Sent: Tuesday, January 27, 2009 6:27 PM To: axis-dev@ws.apache.org Subject: Intermittent, automatic connection refused with no packets to or from the server =20 Greetings All, =20 I am having some strange, intermittent connection refused problems with the Axis2 client. I have used Axis2 1.4.1 to construct a java stub class from a SOAP server WSDL. In a jboss server, I instantiate the stub and use it to send requests to the SOAP server. This generally works fine, but occasionally (as often as once a day), the Axis2 engine will begin to throw Connection refused faults on every SOAP call. The strange thing is, in this state ngrep shows zero packets to or from the SOAP server. It seems clear that the connection refused faults are generated without ever attempting to communicate with the SOAP server. At this point, only redeploying the application will fix the issue. Even instantiating a new stub will not allow communication to resume. Does anyone have any ideas what might be happening and how it can be fixed? If nothing else, is there a way to reinitialize the Axis engine without redeploying? =20 =20 This is the stub initialization code. It is also called when we want to reinitialize the connection (such as when we detect a config change or when we get into this state where communication is failing) =20 public void start() { HttpTransportProperties.Authenticator authenticator =3D new HttpTransportProperties.Authenticator(); authenticator.setPreemptiveAuthentication (true); authenticator.setAuthSchemes(Arrays.asList(new String[]{HttpTransportProperties.Authenticator.BASIC})); authenticator.setUsername(BasicAuthUserName); authenticator.setPassword(BasicAuthPassword); =20 TransportOutDescription tod =3D new TransportOutDescription(org.apache.axis2.Constants.TRANSPORT_HTTPS);=20 CommonsHTTPTransportSender httpSender =3D new CommonsHTTPTransportSender(); =20 tod.setSender(httpSender); if(null !=3D stub) { try { =20 stub._getServiceClient().getOptions().setProperty(HTTPConstants.AUTO_REL EASE_CONNECTION, Boolean.TRUE); =20 stub._getServiceClient().getOptions().setCallTransportCleanup(true); } catch (Throwable e) { LOG.warn("error when trying to clean up old Axis stub",e); } } try { =20 ConfigurationContext c =3D ConfigurationContextFactory.createEmptyConfigurationContext();=20 c.setProperty("WSAddressingVersion", "http://schemas.xmlsoap.org/ws/2004/08/addressing");=20 stub =3D new Address_ServiceStub(c, URL); stub._getServiceClient().getOptions().setProperty( HTTPConstants.AUTHENTICATE,authenticator); =20 stub._getServiceClient().getOptions().setProperty(org.apache.axis2.addre ssing.AddressingConstants.WS_ADDRESSING_VERSION,org.apache.axis2.address ing.AddressingConstants.Submission.WSA_NAMESPACE); stub._getServiceClient().getOptions().setTransportOut(tod); =20 stub._getServiceClient().getOptions().setProperty(HTTPConstants.REUSE_HT TP_CLIENT, Boolean.FALSE);=20 =20 stub._getServiceClient().getOptions().setProperty(HTTPConstants.CACHED_H TTP_CLIENT, Boolean.FALSE);=20 =20 } catch (AxisFault e) { =20 LOG.error("start: Exception when setting up communication with xyz", e); =20 } =20 } =20 =20 This is a portion of the fault stack we are getting: =20 2009-01-27 22:31:37,264 [http-0.0.0.0-8080-10] ERROR [...] Exception when attempting to communicate with xyx server. org.apache.axis2.AxisFault: Connection refused at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430) at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:1 93) at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageW ithCommons(CommonsHTTPTransportSender.java:371) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(Common sHTTPTransportSender.java:209) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper ation.java:401) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInA xisOperation.java:228) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163 ) at com._xyz.soap.wsdl.Address_ServiceStub.validateAddressRequest(Address_Se rviceStub.java:2511) =20 =20 ------_=_NextPart_001_01C98BBB.10021DBE Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

This may be somewhat = of an obscure issue, but we have discovered that after making a PFP = transaction (basically a creditcard processing API call though paypal), our Axis2 based = communication ceases to function completely.  Before making the PFP call, our = Axis2 client can successfully send soap requests and receive soap responses = from a remote server.  After making a PFP API call, all future Axis2 soap requests immediately receive a connection refused error. ngrep shows = that packets are no longer being sent to the remote soap server, but = connection refused exceptions are thrown from what appears to be the native http = socket connection.  We have reproduced this on 2 different = JVMs:

Jrockit = jdk1.5.0_11

Sun jdk = 1.5.0_17

 

The OS running the = Axis2 client and making the PFP calls is Linux.

 

Once this state is = entered, the only way to re-establish successful Axis2 soap communication is to = restart the appserver (jboss). This almost seems like a system resource contention = issue. However, making Axis2 soap calls first does not break the PFP = call.  Any ideas as to what might be happening or how to work around this issue = would be appreciated.  A partial stack trace of the connection refused exception = follows.

 

Thanks,

Grover = Smith

 

2009-01-29 = 19:09:00,843 [http-0.0.0.0-8080-10] INFO  [org.apache.commons.httpclient.HttpMethodDirector] I/O exception (java.net.ConnectException) caught when processing request: Connection = refused

2009-01-29 = 19:09:00,843 [http-0.0.0.0-8080-10] INFO  = [org.apache.commons.httpclient.HttpMethodDirector] Retrying request

2009-01-29 = 19:09:00,844 [http-0.0.0.0-8080-10] INFO  [org.apache.commons.httpclient.HttpMethodDirector] I/O exception (java.net.ConnectException) caught when processing request: Connection = refused

2009-01-29 = 19:09:00,844 [http-0.0.0.0-8080-10] INFO  = [org.apache.commons.httpclient.HttpMethodDirector] Retrying request

2009-01-29 = 19:09:00,844 [http-0.0.0.0-8080-10] INFO  [org.apache.commons.httpclient.HttpMethodDirector] I/O exception (java.net.ConnectException) caught when processing request: Connection = refused

2009-01-29 = 19:09:00,844 [http-0.0.0.0-8080-10] INFO  [org.apache.commons.httpclient.HttpMethodDirector] Retrying = request

2009-01-29 = 19:09:00,844 [http-0.0.0.0-8080-10] INFO  = [org.apache.axis2.transport.http.HTTPSender] Unable to sendViaPost to = url[https://www.xyz.com/911form/wsdl/e911/soap_server2.php]

java.net.ConnectException: Connection refused

        at java.net.PlainSocketImpl.socketConnect(Native = Method)

        at = java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)

        at = java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)<= /o:p>

        at = java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)

        at = java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)

        at java.net.Socket.connect(Socket.java:519)

        at = com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:549= )

        at sun.reflect.GeneratedMethodAccessor1136.invoke(Unknown = Source)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI= mpl.java:25)

        at = java.lang.reflect.Method.invoke(Method.java:585)

        at org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSock= et(ReflectionSocketFactory.java:140)

        at = org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSoc= ket(SSLProtocolSocketFactory.java:130)

        at = org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707= )

        at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConn= ectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)

        at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMet= hodDirector.java:387)

        at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethod= Director.java:171)

        at = org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:39= 7)

        at = org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:34= 6)

        at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(Abstract= HTTPSender.java:542)

        at = org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:18= 9)

        at = org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)<= /o:p>

        at = org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWi= thCommons(CommonsHTTPTransportSender.java:371)

        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(Commons= HTTPTransportSender.java:209)

        at = org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)

        at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOpera= tion.java:401)

        at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAx= isOperation.java:228)

        at = org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)=

        at = com._xyz.soap.wsdl.Address_ServiceStub.addEnterpriseRequest(Address_Servi= ceStub.java:686)

 

 

From:= Grover = Smith [mailto:Grover.Smith@vocalocity.com]
Sent: Tuesday, January 27, 2009 6:27 PM
To: axis-dev@ws.apache.org
Subject: Intermittent, automatic connection refused with no = packets to or from the server

 

Greetings All,

 

I am having some strange, intermittent connection = refused problems with the Axis2 client. I have used Axis2 1.4.1 to construct a = java stub class from a SOAP server WSDL.  In a jboss server, I = instantiate the stub and use it to send requests to the SOAP server.  This = generally works fine, but occasionally (as often as once a day), the Axis2 engine will = begin to throw Connection refused faults on every SOAP call.  The strange = thing is, in this state ngrep shows zero packets to or from the SOAP server.  = It seems clear that the connection refused faults are generated without = ever attempting to communicate with the SOAP server.  At this point, = only redeploying the application will fix the issue. Even instantiating a new = stub will not allow communication to resume. Does anyone have any ideas what = might be happening and how it can be fixed?  If nothing else, is there a = way to reinitialize the Axis engine without redeploying?

 

 

This is the stub initialization code.  It is = also called when we want to reinitialize the connection (such as when we = detect a config change or when we get into this state where communication is = failing)

 

public void start() {

  HttpTransportProperties.Authenticator = authenticator =3D new HttpTransportProperties.Authenticator();

  authenticator.setPreemptiveAuthentication = (true);

  = authenticator.setAuthSchemes(Arrays.asList(new String[]{HttpTransportProperties.Authenticator.BASIC}));

  = authenticator.setUsername(BasicAuthUserName);

  = authenticator.setPassword(BasicAuthPassword);    &nbs= p;     

  TransportOutDescription tod =3D new TransportOutDescription(org.apache.axis2.Constants.TRANSPORT_HTTPS); =

  CommonsHTTPTransportSender httpSender =3D = new CommonsHTTPTransportSender();       &n= bsp;           &nb= sp;           

  tod.setSender(httpSender);

  if(null !=3D stub) {

    try {

      stub._getServiceClient().getOptions().setProperty(HTTPConstants.AUTO_RELE= ASE_CONNECTION, Boolean.TRUE);

      stub._getServiceClient().getOptions().setCallTransportCleanup(true);=

    } catch (Throwable e) = {

      LOG.warn("error = when trying to clean up old Axis stub",e);

    }

  }

  try {      =

    ConfigurationContext c =3D ConfigurationContextFactory.createEmptyConfigurationContext(); =

    c.setProperty("WSAddressingVersion", "http://schemas.xmlsoap.org/ws/2004/08/addressing"); =

    stub =3D new = Address_ServiceStub(c, URL);

    stub._getServiceClient().getOptions().setProperty( HTTPConstants.AUTHENTICATE,authenticator);

     stub._getServiceClient().getOptions().setProperty(org.apache.axis2.addres= sing.AddressingConstants.WS_ADDRESSING_VERSION,org.apache.axis2.addressin= g.AddressingConstants.Submission.WSA_NAMESPACE);

    stub._getServiceClient().getOptions().setTransportOut(tod);  &n= bsp;           &nb= sp;           &nbs= p;            = ;         

    stub._getServiceClient().getOptions().setProperty(HTTPConstants.REUSE_HTT= P_CLIENT, Boolean.FALSE);

    stub._getServiceClient().getOptions().setProperty(HTTPConstants.CACHED_HT= TP_CLIENT, Boolean.FALSE);

         &= nbsp;

  } catch (AxisFault e) {            =             &= nbsp;          

    LOG.error("start: Exception = when setting up communication with xyz", e);           &nbs= p;            = ;            =             &= nbsp;    

  }             &= nbsp;           &n= bsp; 

}

 

 

This is a portion of the fault stack we are = getting:

 

2009-01-27 22:31:37,264 [http-0.0.0.0-8080-10] = ERROR […] Exception when attempting to communicate with xyx = server.

org.apache.axis2.AxisFault: Connection = refused

        at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)

        at = org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:19= 3)

        at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)<= /o:p>

        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWi= thCommons(CommonsHTTPTransportSender.java:371)

        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(Commons= HTTPTransportSender.java:209)

        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)

        at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOpera= tion.java:401)

        at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAx= isOperation.java:228)

        at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)=

        at com._xyz.soap.wsdl.Address_ServiceStub.validateAddressRequest(Address_Ser= viceStub.java:2511)

 

 

------_=_NextPart_001_01C98BBB.10021DBE--