You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Invalid use of BasicClientConnManager: connection still allocated #3243
I have searched the issues of this repository and believe that this is not a duplicate.
I have checked the FAQ of this repository and believe that this is not a duplicate.
Environment
Dubbo version: 2.6.5
Operating System version: Red Hat 4.8.5-11
Java version:1.8.0
Steps to reproduce this issue
consumer use http protocol
submit a POST request
Pls. provide [GitHub address] to reproduce this issue.
Expected Result
response data
Actual Result
report errors
java.util.concurrent.ExecutionException: java.lang.IllegalStateException: Invalid use of BasicClientConnManager: connection still allocated.
Make sure to release the connection before allocating another one.
at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0]
at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0]
at
I see your error message, it seems that you use the hessian protocol, what do you think?
com.alibaba.dubbo.rpc.protocol.hessian.HttpClientConnection.sendRequest(HttpClientConnection.java:64) ~[dubbo-2.6.5.jar!/:2.6.5] at com.caucho.hessian.client.HessianProxy.sendRequest(HessianProxy.java:296) ~[hessian-4.0.37.jar!/:3.1.0]
if you use the hessian protoco and dubbo version is 2.6.5
httpclient is created in this way. When a concurrent request is made, the exception is thrown because the previous httpclient is not released.
'HttpClient httpClient = new DefaultHttpClient()'
In the latest version, httpclient is created this way. httpClient = HttpClientBuilder.create().setDefaultRequestConfig(requestConfig).build(); build()this method uses the PoolingHttpClientConnectionManager, so it won't cause this exception to be thrown.
Activity
CrazyHZM commentedon Jan 25, 2019
I see your error message, it seems that you use the hessian protocol, what do you think?
com.alibaba.dubbo.rpc.protocol.hessian.HttpClientConnection.sendRequest(HttpClientConnection.java:64) ~[dubbo-2.6.5.jar!/:2.6.5] at com.caucho.hessian.client.HessianProxy.sendRequest(HessianProxy.java:296) ~[hessian-4.0.37.jar!/:3.1.0]if you use the hessian protoco and dubbo version is 2.6.5
httpclient is created in this way. When a concurrent request is made, the exception is thrown because the previous httpclient is not released.
'HttpClient httpClient = new DefaultHttpClient()'
In the latest version, httpclient is created this way.
httpClient = HttpClientBuilder.create().setDefaultRequestConfig(requestConfig).build();build()this method uses the PoolingHttpClientConnectionManager, so it won't cause this exception to be thrown.CrazyHZM commentedon Jan 25, 2019
@ralf0131
If I am correct, do we have to modify 2.6.x simultaneously?
Python-IBM commentedon Mar 1, 2019
Yes,please modify 2.6.x simultaneously.
ralf0131 commentedon Mar 1, 2019
@CrazyHZM Would you help to fix it in 2.6.x?
CrazyHZM commentedon Mar 1, 2019
Python-IBM commentedon Mar 1, 2019
Thanks,I will re-download the v2.6.5 when you fix it.
fix Invalid use of BasicClientConnManager: connection still allocated a…
Python-IBM commentedon Mar 4, 2019
I downloaded the 2.6.5 version of the jar package again. Why do I see that the source code hasn't changed?
CrazyHZM commentedon Mar 7, 2019
@ralf0131 Please review that pr.
[DUBBO-3243] Fix Invalid use of BasicClientConnManager: connection st…
ralf0131 commentedon Mar 7, 2019
The pull request has been merged, it will be fixed from 2.6.7 onwards.
You can try the 2.6.x branch.
fix default setting (#4955)