[jira] [Commented] (AXIS2-5809) Axis2 does not properly return http connection to connection pool when using http client 4
[ https://issues.apache.org/jira/browse/AXIS2-5809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15580777#comment-15580777 ] Hudson commented on AXIS2-5809: --- SUCCESS: Integrated in Jenkins build axis2-1.7 #90 (See [https://builds.apache.org/job/axis2-1.7/90/]) AXIS2-5809: Merge r1765193 to the 1.7 branch. (veithen: rev 1765194) * (edit) axis2 * (edit) axis2/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5809/EchoServiceImpl.java * (edit) axis2/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5809/ServiceTest.java * (edit) axis2/modules/transport/http/src/org/apache/axis2/transport/http/impl/httpclient4 * (edit) axis2/modules/transport/http/src/org/apache/axis2/transport/http/impl/httpclient4/HTTPClient4TransportSender.java > Axis2 does not properly return http connection to connection pool when using > http client 4 > -- > > Key: AXIS2-5809 > URL: https://issues.apache.org/jira/browse/AXIS2-5809 > Project: Axis2 > Issue Type: Bug > Components: transports >Affects Versions: 1.7.3 > Environment: Ubuntu 16.04, OpenJDK 7 >Reporter: Christian H. >Priority: Critical > Fix For: 1.7.4 > > > When using HTTP Client 4 with a generated WSDL-Client the HTTP connections > are not returned properly to underlying connection pool. The HTTP connections > are still allocated, when new requests are made. This ends up in waiting for > HTTP connections from pool, but no connections are available anymore. > The connections should be returned to pool as stated in the Apache HTTP > Client 4 documentation (2.3.1): > https://hc.apache.org/httpcomponents-client-ga/tutorial/html/connmgmt.html > Here is some example code to reproduce the problem. The BLZServiceStub is a > generated WSDL client (wsdl2java) of the following service: > http://www.thomas-bayer.com/axis2/services/BLZService?wsdl . But the problem > is independent of the used service. > {code:title=TestRunner.java} > package com.thomas_bayer.blz; > import java.rmi.RemoteException; > import org.apache.axis2.transport.http.HTTPConstants; > import org.apache.http.client.HttpClient; > import org.apache.http.impl.client.DefaultHttpClient; > import org.apache.http.impl.conn.PoolingClientConnectionManager; > import org.apache.http.params.BasicHttpParams; > import org.apache.http.params.CoreConnectionPNames; > import org.apache.http.params.HttpParams; > public class TestRunner { > private static final int timeoutMillis = 5000; > private static final int maxConnections = 2; > > private static final String[] BLZs = new String[] { > "1203", "1207" > }; > > public static void main(String[] args) throws RemoteException { > BLZServiceStub blzService = new BLZServiceStub(); > > blzService._getServiceClient().getServiceContext().getConfigurationContext().setProperty(HTTPConstants.CACHED_HTTP_CLIENT, > buildHttpClient()); > for(int i = 0; i <= maxConnections; i++) { > BLZServiceStub.GetBankType getBankType = new > BLZServiceStub.GetBankType(); > getBankType.setBlz(BLZs[i % BLZs.length]); > BLZServiceStub.GetBank getBank = new BLZServiceStub.GetBank(); > getBank.setGetBank(getBankType); > > System.out.println("Querying for bank (iteration: " + i + ")"); > BLZServiceStub.GetBankResponse response = blzService.getBank(getBank); > System.out.println("Bank queried"); > > System.out.println("Result: " + > response.getGetBankResponse().getDetails().getBezeichnung()); > } > } > protected static HttpClient buildHttpClient() { > final PoolingClientConnectionManager conmgr = new > PoolingClientConnectionManager(); > conmgr.setDefaultMaxPerRoute(maxConnections); > conmgr.setMaxTotal(maxConnections); > > final HttpParams params = new BasicHttpParams(); > params.setLongParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, > timeoutMillis); > params.setLongParameter(CoreConnectionPNames.SO_TIMEOUT, timeoutMillis); > > return new DefaultHttpClient(conmgr, params); > } > } > {code} > Running this code will produce the following output: > {noformat} > Querying for bank (iteration: 0) > Bank queried > Result: Deutsche Kreditbank Berlin > Querying for bank (iteration: 1) > Bank queried > Result: Deutsche Bank Ld Brandenburg > Querying for bank (iteration: 2) > Sep 27, 2016 8:32:43 AM > org.apache.axis2.transport.http.impl.httpclient4.HTTPSenderImpl sendViaPost > INFORMATION: Unable to sendViaPost to > url[http://www.thomas-bayer.com/axis2/services/BLZService] > org.apache.http.conn.ConnectionPoolTimeoutException: Timeout waiting for > connection from pool > at > org.apache.http.impl.conn.PoolingClientConnectionManager.lease
[jira] [Commented] (AXIS2-5809) Axis2 does not properly return http connection to connection pool when using http client 4
[ https://issues.apache.org/jira/browse/AXIS2-5809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15580712#comment-15580712 ] Hudson commented on AXIS2-5809: --- SUCCESS: Integrated in Jenkins build Axis2 #3601 (See [https://builds.apache.org/job/Axis2/3601/]) AXIS2-5809: Ensure that connections are properly released. (veithen: rev 1765193) * (edit) axis2/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5809/EchoServiceImpl.java * (edit) axis2/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5809/ServiceTest.java * (edit) axis2/modules/transport/http/src/org/apache/axis2/transport/http/impl/httpclient4/HTTPClient4TransportSender.java > Axis2 does not properly return http connection to connection pool when using > http client 4 > -- > > Key: AXIS2-5809 > URL: https://issues.apache.org/jira/browse/AXIS2-5809 > Project: Axis2 > Issue Type: Bug > Components: transports >Affects Versions: 1.7.3 > Environment: Ubuntu 16.04, OpenJDK 7 >Reporter: Christian H. >Priority: Critical > > When using HTTP Client 4 with a generated WSDL-Client the HTTP connections > are not returned properly to underlying connection pool. The HTTP connections > are still allocated, when new requests are made. This ends up in waiting for > HTTP connections from pool, but no connections are available anymore. > The connections should be returned to pool as stated in the Apache HTTP > Client 4 documentation (2.3.1): > https://hc.apache.org/httpcomponents-client-ga/tutorial/html/connmgmt.html > Here is some example code to reproduce the problem. The BLZServiceStub is a > generated WSDL client (wsdl2java) of the following service: > http://www.thomas-bayer.com/axis2/services/BLZService?wsdl . But the problem > is independent of the used service. > {code:title=TestRunner.java} > package com.thomas_bayer.blz; > import java.rmi.RemoteException; > import org.apache.axis2.transport.http.HTTPConstants; > import org.apache.http.client.HttpClient; > import org.apache.http.impl.client.DefaultHttpClient; > import org.apache.http.impl.conn.PoolingClientConnectionManager; > import org.apache.http.params.BasicHttpParams; > import org.apache.http.params.CoreConnectionPNames; > import org.apache.http.params.HttpParams; > public class TestRunner { > private static final int timeoutMillis = 5000; > private static final int maxConnections = 2; > > private static final String[] BLZs = new String[] { > "1203", "1207" > }; > > public static void main(String[] args) throws RemoteException { > BLZServiceStub blzService = new BLZServiceStub(); > > blzService._getServiceClient().getServiceContext().getConfigurationContext().setProperty(HTTPConstants.CACHED_HTTP_CLIENT, > buildHttpClient()); > for(int i = 0; i <= maxConnections; i++) { > BLZServiceStub.GetBankType getBankType = new > BLZServiceStub.GetBankType(); > getBankType.setBlz(BLZs[i % BLZs.length]); > BLZServiceStub.GetBank getBank = new BLZServiceStub.GetBank(); > getBank.setGetBank(getBankType); > > System.out.println("Querying for bank (iteration: " + i + ")"); > BLZServiceStub.GetBankResponse response = blzService.getBank(getBank); > System.out.println("Bank queried"); > > System.out.println("Result: " + > response.getGetBankResponse().getDetails().getBezeichnung()); > } > } > protected static HttpClient buildHttpClient() { > final PoolingClientConnectionManager conmgr = new > PoolingClientConnectionManager(); > conmgr.setDefaultMaxPerRoute(maxConnections); > conmgr.setMaxTotal(maxConnections); > > final HttpParams params = new BasicHttpParams(); > params.setLongParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, > timeoutMillis); > params.setLongParameter(CoreConnectionPNames.SO_TIMEOUT, timeoutMillis); > > return new DefaultHttpClient(conmgr, params); > } > } > {code} > Running this code will produce the following output: > {noformat} > Querying for bank (iteration: 0) > Bank queried > Result: Deutsche Kreditbank Berlin > Querying for bank (iteration: 1) > Bank queried > Result: Deutsche Bank Ld Brandenburg > Querying for bank (iteration: 2) > Sep 27, 2016 8:32:43 AM > org.apache.axis2.transport.http.impl.httpclient4.HTTPSenderImpl sendViaPost > INFORMATION: Unable to sendViaPost to > url[http://www.thomas-bayer.com/axis2/services/BLZService] > org.apache.http.conn.ConnectionPoolTimeoutException: Timeout waiting for > connection from pool > at > org.apache.http.impl.conn.PoolingClientConnectionManager.leaseConnection(PoolingClientConnectionManager.java:232) > at > org.apache.http.impl.conn.PoolingClientConnectionManager$1.get
[jira] [Commented] (AXIS2-5809) Axis2 does not properly return http connection to connection pool when using http client 4
[ https://issues.apache.org/jira/browse/AXIS2-5809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15580640#comment-15580640 ] Hudson commented on AXIS2-5809: --- FAILURE: Integrated in Jenkins build axis2-1.7 #89 (See [https://builds.apache.org/job/axis2-1.7/89/]) AXIS2-5809: Merge r1765188 (with changes) to the 1.7 so that we can reproduce the problem. (veithen: rev 1765189) * (edit) axis2 * (edit) axis2/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5809/ServiceTest.java * (edit) axis2/modules/testutils/src/main/java/org/apache/axis2/testutils/Axis2Server.java > Axis2 does not properly return http connection to connection pool when using > http client 4 > -- > > Key: AXIS2-5809 > URL: https://issues.apache.org/jira/browse/AXIS2-5809 > Project: Axis2 > Issue Type: Bug > Components: transports >Affects Versions: 1.7.3 > Environment: Ubuntu 16.04, OpenJDK 7 >Reporter: Christian H. >Priority: Critical > > When using HTTP Client 4 with a generated WSDL-Client the HTTP connections > are not returned properly to underlying connection pool. The HTTP connections > are still allocated, when new requests are made. This ends up in waiting for > HTTP connections from pool, but no connections are available anymore. > The connections should be returned to pool as stated in the Apache HTTP > Client 4 documentation (2.3.1): > https://hc.apache.org/httpcomponents-client-ga/tutorial/html/connmgmt.html > Here is some example code to reproduce the problem. The BLZServiceStub is a > generated WSDL client (wsdl2java) of the following service: > http://www.thomas-bayer.com/axis2/services/BLZService?wsdl . But the problem > is independent of the used service. > {code:title=TestRunner.java} > package com.thomas_bayer.blz; > import java.rmi.RemoteException; > import org.apache.axis2.transport.http.HTTPConstants; > import org.apache.http.client.HttpClient; > import org.apache.http.impl.client.DefaultHttpClient; > import org.apache.http.impl.conn.PoolingClientConnectionManager; > import org.apache.http.params.BasicHttpParams; > import org.apache.http.params.CoreConnectionPNames; > import org.apache.http.params.HttpParams; > public class TestRunner { > private static final int timeoutMillis = 5000; > private static final int maxConnections = 2; > > private static final String[] BLZs = new String[] { > "1203", "1207" > }; > > public static void main(String[] args) throws RemoteException { > BLZServiceStub blzService = new BLZServiceStub(); > > blzService._getServiceClient().getServiceContext().getConfigurationContext().setProperty(HTTPConstants.CACHED_HTTP_CLIENT, > buildHttpClient()); > for(int i = 0; i <= maxConnections; i++) { > BLZServiceStub.GetBankType getBankType = new > BLZServiceStub.GetBankType(); > getBankType.setBlz(BLZs[i % BLZs.length]); > BLZServiceStub.GetBank getBank = new BLZServiceStub.GetBank(); > getBank.setGetBank(getBankType); > > System.out.println("Querying for bank (iteration: " + i + ")"); > BLZServiceStub.GetBankResponse response = blzService.getBank(getBank); > System.out.println("Bank queried"); > > System.out.println("Result: " + > response.getGetBankResponse().getDetails().getBezeichnung()); > } > } > protected static HttpClient buildHttpClient() { > final PoolingClientConnectionManager conmgr = new > PoolingClientConnectionManager(); > conmgr.setDefaultMaxPerRoute(maxConnections); > conmgr.setMaxTotal(maxConnections); > > final HttpParams params = new BasicHttpParams(); > params.setLongParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, > timeoutMillis); > params.setLongParameter(CoreConnectionPNames.SO_TIMEOUT, timeoutMillis); > > return new DefaultHttpClient(conmgr, params); > } > } > {code} > Running this code will produce the following output: > {noformat} > Querying for bank (iteration: 0) > Bank queried > Result: Deutsche Kreditbank Berlin > Querying for bank (iteration: 1) > Bank queried > Result: Deutsche Bank Ld Brandenburg > Querying for bank (iteration: 2) > Sep 27, 2016 8:32:43 AM > org.apache.axis2.transport.http.impl.httpclient4.HTTPSenderImpl sendViaPost > INFORMATION: Unable to sendViaPost to > url[http://www.thomas-bayer.com/axis2/services/BLZService] > org.apache.http.conn.ConnectionPoolTimeoutException: Timeout waiting for > connection from pool > at > org.apache.http.impl.conn.PoolingClientConnectionManager.leaseConnection(PoolingClientConnectionManager.java:232) > at > org.apache.http.impl.conn.PoolingClientConnectionManager$1.getConnection(PoolingClientConnectionManager.java:199) > at > org.apache.http.impl.cli
[jira] [Commented] (AXIS2-5809) Axis2 does not properly return http connection to connection pool when using http client 4
[ https://issues.apache.org/jira/browse/AXIS2-5809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15580562#comment-15580562 ] Hudson commented on AXIS2-5809: --- FAILURE: Integrated in Jenkins build Axis2 #3600 (See [https://builds.apache.org/job/Axis2/3600/]) AXIS2-5809: Use the custom axis2.xml config on the client as well. (veithen: rev 1765188) * (edit) axis2/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5809/ServiceTest.java * (edit) axis2/modules/testutils/src/main/java/org/apache/axis2/testutils/Axis2Server.java Add test case for the scenario described in AXIS2-5809 and AXIS2-5811. (veithen: rev 1765183) * (edit) axis2/modules/adb-tests/pom.xml * (add) axis2/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5809 * (add) axis2/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5809/EchoServiceImpl.java * (add) axis2/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5809/ServiceTest.java * (add) axis2/modules/adb-tests/src/test/repo * (add) axis2/modules/adb-tests/src/test/repo/AXIS2-5809 * (add) axis2/modules/adb-tests/src/test/repo/AXIS2-5809/axis2.xml * (add) axis2/modules/adb-tests/src/test/wsdl/AXIS2-5809.wsdl * (add) axis2/modules/adb-tests/src/test/xslt/AXIS2-5809.xsl > Axis2 does not properly return http connection to connection pool when using > http client 4 > -- > > Key: AXIS2-5809 > URL: https://issues.apache.org/jira/browse/AXIS2-5809 > Project: Axis2 > Issue Type: Bug > Components: transports >Affects Versions: 1.7.3 > Environment: Ubuntu 16.04, OpenJDK 7 >Reporter: Christian H. >Priority: Critical > > When using HTTP Client 4 with a generated WSDL-Client the HTTP connections > are not returned properly to underlying connection pool. The HTTP connections > are still allocated, when new requests are made. This ends up in waiting for > HTTP connections from pool, but no connections are available anymore. > The connections should be returned to pool as stated in the Apache HTTP > Client 4 documentation (2.3.1): > https://hc.apache.org/httpcomponents-client-ga/tutorial/html/connmgmt.html > Here is some example code to reproduce the problem. The BLZServiceStub is a > generated WSDL client (wsdl2java) of the following service: > http://www.thomas-bayer.com/axis2/services/BLZService?wsdl . But the problem > is independent of the used service. > {code:title=TestRunner.java} > package com.thomas_bayer.blz; > import java.rmi.RemoteException; > import org.apache.axis2.transport.http.HTTPConstants; > import org.apache.http.client.HttpClient; > import org.apache.http.impl.client.DefaultHttpClient; > import org.apache.http.impl.conn.PoolingClientConnectionManager; > import org.apache.http.params.BasicHttpParams; > import org.apache.http.params.CoreConnectionPNames; > import org.apache.http.params.HttpParams; > public class TestRunner { > private static final int timeoutMillis = 5000; > private static final int maxConnections = 2; > > private static final String[] BLZs = new String[] { > "1203", "1207" > }; > > public static void main(String[] args) throws RemoteException { > BLZServiceStub blzService = new BLZServiceStub(); > > blzService._getServiceClient().getServiceContext().getConfigurationContext().setProperty(HTTPConstants.CACHED_HTTP_CLIENT, > buildHttpClient()); > for(int i = 0; i <= maxConnections; i++) { > BLZServiceStub.GetBankType getBankType = new > BLZServiceStub.GetBankType(); > getBankType.setBlz(BLZs[i % BLZs.length]); > BLZServiceStub.GetBank getBank = new BLZServiceStub.GetBank(); > getBank.setGetBank(getBankType); > > System.out.println("Querying for bank (iteration: " + i + ")"); > BLZServiceStub.GetBankResponse response = blzService.getBank(getBank); > System.out.println("Bank queried"); > > System.out.println("Result: " + > response.getGetBankResponse().getDetails().getBezeichnung()); > } > } > protected static HttpClient buildHttpClient() { > final PoolingClientConnectionManager conmgr = new > PoolingClientConnectionManager(); > conmgr.setDefaultMaxPerRoute(maxConnections); > conmgr.setMaxTotal(maxConnections); > > final HttpParams params = new BasicHttpParams(); > params.setLongParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, > timeoutMillis); > params.setLongParameter(CoreConnectionPNames.SO_TIMEOUT, timeoutMillis); > > return new DefaultHttpClient(conmgr, params); > } > } > {code} > Running this code will produce the following output: > {noformat} > Querying for bank (iteration: 0) > Bank queried > Result: Deutsche Kreditbank Berlin > Querying for bank (iteration: 1) > Ba
[jira] [Commented] (AXIS2-5809) Axis2 does not properly return http connection to connection pool when using http client 4
[ https://issues.apache.org/jira/browse/AXIS2-5809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15580541#comment-15580541 ] Hudson commented on AXIS2-5809: --- SUCCESS: Integrated in Jenkins build axis2-1.7 #88 (See [https://builds.apache.org/job/axis2-1.7/88/]) AXIS2-5809: Merge r1765183 to the 1.7 branch. (veithen: rev 1765187) * (edit) axis2 * (edit) axis2/modules/adb-tests/pom.xml * (add) axis2/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5809 * (add) axis2/modules/adb-tests/src/test/repo * (add) axis2/modules/adb-tests/src/test/wsdl/AXIS2-5809.wsdl * (add) axis2/modules/adb-tests/src/test/xslt/AXIS2-5809.xsl > Axis2 does not properly return http connection to connection pool when using > http client 4 > -- > > Key: AXIS2-5809 > URL: https://issues.apache.org/jira/browse/AXIS2-5809 > Project: Axis2 > Issue Type: Bug > Components: transports >Affects Versions: 1.7.3 > Environment: Ubuntu 16.04, OpenJDK 7 >Reporter: Christian H. >Priority: Critical > > When using HTTP Client 4 with a generated WSDL-Client the HTTP connections > are not returned properly to underlying connection pool. The HTTP connections > are still allocated, when new requests are made. This ends up in waiting for > HTTP connections from pool, but no connections are available anymore. > The connections should be returned to pool as stated in the Apache HTTP > Client 4 documentation (2.3.1): > https://hc.apache.org/httpcomponents-client-ga/tutorial/html/connmgmt.html > Here is some example code to reproduce the problem. The BLZServiceStub is a > generated WSDL client (wsdl2java) of the following service: > http://www.thomas-bayer.com/axis2/services/BLZService?wsdl . But the problem > is independent of the used service. > {code:title=TestRunner.java} > package com.thomas_bayer.blz; > import java.rmi.RemoteException; > import org.apache.axis2.transport.http.HTTPConstants; > import org.apache.http.client.HttpClient; > import org.apache.http.impl.client.DefaultHttpClient; > import org.apache.http.impl.conn.PoolingClientConnectionManager; > import org.apache.http.params.BasicHttpParams; > import org.apache.http.params.CoreConnectionPNames; > import org.apache.http.params.HttpParams; > public class TestRunner { > private static final int timeoutMillis = 5000; > private static final int maxConnections = 2; > > private static final String[] BLZs = new String[] { > "1203", "1207" > }; > > public static void main(String[] args) throws RemoteException { > BLZServiceStub blzService = new BLZServiceStub(); > > blzService._getServiceClient().getServiceContext().getConfigurationContext().setProperty(HTTPConstants.CACHED_HTTP_CLIENT, > buildHttpClient()); > for(int i = 0; i <= maxConnections; i++) { > BLZServiceStub.GetBankType getBankType = new > BLZServiceStub.GetBankType(); > getBankType.setBlz(BLZs[i % BLZs.length]); > BLZServiceStub.GetBank getBank = new BLZServiceStub.GetBank(); > getBank.setGetBank(getBankType); > > System.out.println("Querying for bank (iteration: " + i + ")"); > BLZServiceStub.GetBankResponse response = blzService.getBank(getBank); > System.out.println("Bank queried"); > > System.out.println("Result: " + > response.getGetBankResponse().getDetails().getBezeichnung()); > } > } > protected static HttpClient buildHttpClient() { > final PoolingClientConnectionManager conmgr = new > PoolingClientConnectionManager(); > conmgr.setDefaultMaxPerRoute(maxConnections); > conmgr.setMaxTotal(maxConnections); > > final HttpParams params = new BasicHttpParams(); > params.setLongParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, > timeoutMillis); > params.setLongParameter(CoreConnectionPNames.SO_TIMEOUT, timeoutMillis); > > return new DefaultHttpClient(conmgr, params); > } > } > {code} > Running this code will produce the following output: > {noformat} > Querying for bank (iteration: 0) > Bank queried > Result: Deutsche Kreditbank Berlin > Querying for bank (iteration: 1) > Bank queried > Result: Deutsche Bank Ld Brandenburg > Querying for bank (iteration: 2) > Sep 27, 2016 8:32:43 AM > org.apache.axis2.transport.http.impl.httpclient4.HTTPSenderImpl sendViaPost > INFORMATION: Unable to sendViaPost to > url[http://www.thomas-bayer.com/axis2/services/BLZService] > org.apache.http.conn.ConnectionPoolTimeoutException: Timeout waiting for > connection from pool > at > org.apache.http.impl.conn.PoolingClientConnectionManager.leaseConnection(PoolingClientConnectionManager.java:232) > at > org.apache.http.impl.conn.PoolingClientConnectionManager$1.getConnection(PoolingClientConnectionMa