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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed

    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

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

          Any PR is welcome...

          mreinhardt Martin Reinhardt added a comment - sorry to say, but currently don't have to time to fix this... Any PR is welcome...
          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.

          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.

          fixed in develop branch.

          Will be corrected in the next release

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

          Fixed in 1.3.1

          mreinhardt Martin Reinhardt added a comment - Fixed in 1.3.1

          People

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

            Dates

              Created:
              Updated:
              Resolved: