Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-51612

Rocket Chat notification send fails if two jobs try to send one at the same time

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Environment:
    • Similar Issues:

      Description

      Hi,

      I am sending Rocket Chat notifications from two Jenkins multibranch pipeline jobs. The job that gets executed as the first one sends all of its notifications correctly. The second one however fails with error message:

      java.lang.IllegalStateException: Invalid use of BasicClientConnManager: connection still allocated. Make sure to release the connection before allocating another one.

      ...

       

      Please see the stacktrace and pipeline sample code in attachment. 

      Thank you in advance for the fix.

        Attachments

          Activity

          Hide
          mreinhardt Martin Reinhardt added a comment -

          sorry to say, but currently don't have to time to fix this...

          Any PR is welcome...

          Show
          mreinhardt Martin Reinhardt added a comment - sorry to say, but currently don't have to time to fix this... Any PR is welcome...
          Hide
          lasselindqvist Lasse Lindqvist added a comment - - edited

          I got this issue too.

          Seems like something I could take a look at.

           

          Something like

          PoolingHttpClientConnectionManager manager = new PoolingHttpClientConnectionManager();
          manager.setDefaultMaxPerRoute(20);
          HttpClient client = HttpClientBuilder.create().setConnectionManager(manager).build();
          Unirest.setHttpClient(client);

           

          in the constructor should do the trick.

          Show
          lasselindqvist Lasse Lindqvist added a comment - - edited I got this issue too. Seems like something I could take a look at.   Something like PoolingHttpClientConnectionManager manager = new PoolingHttpClientConnectionManager(); manager.setDefaultMaxPerRoute(20); HttpClient client = HttpClientBuilder.create().setConnectionManager(manager).build(); Unirest.setHttpClient(client);   in the constructor should do the trick.
          Hide
          mreinhardt Martin Reinhardt added a comment -

          fixed in develop branch.

          Will be corrected in the next release

          Show
          mreinhardt Martin Reinhardt added a comment - fixed in develop branch. Will be corrected in the next release
          Hide
          mreinhardt Martin Reinhardt added a comment -

          Fixed in 1.3.1

          Show
          mreinhardt Martin Reinhardt added a comment - Fixed in 1.3.1

            People

            • Assignee:
              mreinhardt Martin Reinhardt
              Reporter:
              stanislav_bebej Stanislav Bebej
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: