You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Robert Lazarski (Jira)" <ji...@apache.org> on 2022/06/01 19:35:00 UTC

[jira] [Commented] (AXIS2-6030) Axis2 connections are not returned to connection pool on 1.8.0 with JAXWS

    [ https://issues.apache.org/jira/browse/AXIS2-6030?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17545111#comment-17545111 ] 

Robert Lazarski commented on AXIS2-6030:
----------------------------------------

I am looking more into this issue however the Axis2 team has a lot of pressure for a release due to CVE's that I plan on calling for a vote this Friday or soon after.

Having some example code helps, thanks for that. I started looking it at and will continue to do so, though I need to time box this issue for today - no ETA as we are all volunteers. 

The biggest change by far in 1.8.0 is the move from commons httpclient 3.x to httpclient 4.x.

In my own client code, the JVM is only does the call and exits so I don't come near 200 connections.

It is possible to run httpclient 4.x on 1.7.9. Maybe that will expose the problem to be how Axis2 supports httpclient 4.x, though this support has been going on for about five years now so it'd be odd that no one else saw it.

Simply remove all httpclient 3.x jars from the Axis2 client lib dir, and replace with {color:#000000}httpclient-4.5.13.jar{color}
 and {color:#000000}httpcore-4.4.15.jar.  {color}

Then change your axis2.xml on the server as follows - if your server runs axis2:. 

<transportSender name="http"
 class="org.apache.axis2.transport.http.impl.httpclient4.HTTPClient4TransportSender">
 <parameter name="PROTOCOL">HTTP/1.1</parameter>
 <parameter name="Transfer-Encoding">chunked</parameter>

<!-- If following is set to 'true', optional action part of the Content-Type will not be added to the SOAP 1.2 messages -->
 <!-- <parameter name="OmitSOAP12Action">true</parameter> -->
 </transportSender>

<transportSender name="https"
 class="org.apache.axis2.transport.http.impl.httpclient4.HTTPClient4TransportSender">
 <parameter name="PROTOCOL">HTTP/1.1</parameter>
 <parameter name="Transfer-Encoding">chunked</parameter>
 </transportSender>


The net question is configuring your client. This was discussed quite a bit in the Jira issue axis2-6009.

Here's a code snippet from that issue.

TransportOutDescription transportOut = new TransportOutDescription("https");
HTTPClient4TransportSender sender = new HTTPClient4TransportSender();
sender.init(stub._getServiceClient().getServiceContext().getConfigurationContext(), transportOut);
transportOut.setSender(sender);
options.setTransportOut(transportOut);

Anything you can do on your side to help get to the bottom of this will speed up a fix if warranted.

 

> Axis2 connections are not returned to connection pool on 1.8.0 with JAXWS
> -------------------------------------------------------------------------
>
>                 Key: AXIS2-6030
>                 URL: https://issues.apache.org/jira/browse/AXIS2-6030
>             Project: Axis2
>          Issue Type: Bug
>          Components: transports
>    Affects Versions: 1.8.0
>            Reporter: David Steindorfer
>            Assignee: Robert Lazarski
>            Priority: Major
>         Attachments: echoTestInterruptionException.txt
>
>
> Good Afternoon,
>  
> I have upgraded Axis2 from 1.7.9 to 1.8.0 on one of our projects.
> However with the upgrade the requests seem to get stuck. 
> On further analysis I figured out that the connection pool ran dry as the connections were not returned.
>  
> It took a while to reproduce the issue reliably and isolated from the other code of our project but under very similar circumstances.
> Thus I created a public git repo with the code I wrote to reproduce the issue:
> [https://github.com/dsteindo/Axis2Examples]
>  
> I think the affected component is the "axis2-transport-http" library.
> For now I reverted the project's libraries back to 1.7.9.
> But it would be awesome to use the latest libraries, considering that you did quite a lot of changes and improvements :) 
>  
> Please feel free to contact me if more information is needed, but I guess that everything should be documented with the git repository.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org