axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grover Smith" <Grover.Sm...@vocalocity.com>
Subject Axis2 doesn't play nice with PFP (payflow, paypal)
Date Tue, 10 Feb 2009 20:10:40 GMT
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)

        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)

 

 

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 = new
HttpTransportProperties.Authenticator();

  authenticator.setPreemptiveAuthentication (true);

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

  authenticator.setUsername(BasicAuthUserName);

  authenticator.setPassword(BasicAuthPassword);           

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

  CommonsHTTPTransportSender httpSender = new
CommonsHTTPTransportSender();                                

  tod.setSender(httpSender);

  if(null != stub) {

    try {

 
stub._getServiceClient().getOptions().setProperty(HTTPConstants.AUTO_REL
EASE_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 =
ConfigurationContextFactory.createEmptyConfigurationContext(); 

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

    stub = new Address_ServiceStub(c, URL);

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

 
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);


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

 
stub._getServiceClient().getOptions().setProperty(HTTPConstants.CACHED_H
TTP_CLIENT, Boolean.FALSE); 

           

  } catch (AxisFault e) {                                    

    LOG.error("start: Exception when setting up communication with xyz",
e);                                                      

  }                            

}

 

 

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: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)

 

 


Mime
View raw message