Skip to content

Invalid use of BasicClientConnManager: connection still allocated #3243

Closed

Description

@Python-IBM
  • 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

  1. consumer use http protocol
  2. 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 

Activity

  1. CrazyHZM commented on Jan 25, 2019

    @CrazyHZM
    Member

    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.

  2. CrazyHZM commented on Jan 25, 2019

    @CrazyHZM
    Member

    @ralf0131
    If I am correct, do we have to modify 2.6.x simultaneously?

  3. Python-IBM commented on Mar 1, 2019

    @Python-IBM
    Author

    @ralf0131
    If I am correct, do we have to modify 2.6.x simultaneously?

    Yes,please modify 2.6.x simultaneously.

  4. ralf0131 commented on Mar 1, 2019

    @ralf0131
    Contributor

    @CrazyHZM Would you help to fix it in 2.6.x?

  5. CrazyHZM commented on Mar 1, 2019

    @CrazyHZM
    Member

    @CrazyHZM Would you help to fix it in 2.6.x?
    I will fix it later.

  6. Python-IBM commented on Mar 1, 2019

    @Python-IBM
    Author

    @CrazyHZM Would you help to fix it in 2.6.x?
    I will fix it later.

    Thanks,I will re-download the v2.6.5 when you fix it.

  7. Python-IBM commented on Mar 4, 2019

    @Python-IBM
    Author

    I downloaded the 2.6.5 version of the jar package again. Why do I see that the source code hasn't changed?

  8. CrazyHZM commented on Mar 7, 2019

    @CrazyHZM
    Member

    @ralf0131 Please review that pr.

  9. ralf0131 commented on Mar 7, 2019

    @ralf0131
    Contributor

    The pull request has been merged, it will be fixed from 2.6.7 onwards.
    You can try the 2.6.x branch.

  10. added a commit that references this issue on Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions