Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-3548

Thread used by LoadBalancer remains when connection to kie-server fails during instantinating of KieServicesClient

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.18.0.Final
    • 7.11.0.Final, 7.14.0.Final
    • kie server
    • 2019 Week 05-07
    • Hide

      run attacked reproducer by the following command

      1. mvn clean test
      Show
      run attacked reproducer by the following command mvn clean test
    • NEW
    • NEW

      When KieServicesClient fails to connect to KieServer, LoadBalancer is invoked to check availability of server like the following.
      ~~~
      [2019/01/24 18:19:38.411] [pool-1-thread-1] [DEBUG] (LoadBalancer.java:149) - Starting to scan if any of the failed endpoints is back online
      org.kie.server.common.rest.NoEndpointFoundException: No available endpoints found
      at org.kie.server.client.balancer.impl.AbstractBalancerStrategy.checkEmpty(AbstractBalancerStrategy.java:27)
      at org.kie.server.client.balancer.impl.RoundRobinBalancerStrategy.next(RoundRobinBalancerStrategy.java:37)
      at org.kie.server.client.balancer.LoadBalancer.getUrl(LoadBalancer.java:52)
      at org.kie.server.client.impl.AbstractKieServicesClientImpl.invoke(AbstractKieServicesClientImpl.java:809)
      at org.kie.server.client.impl.AbstractKieServicesClientImpl.makeHttpGetRequestAndCreateServiceResponse(AbstractKieServicesClientImpl.java:177)
      at org.kie.server.client.impl.KieServicesClientImpl.getServerInfo(KieServicesClientImpl.java:159)
      at org.kie.server.client.impl.KieServicesClientImpl.getCapabilitiesFromServer(KieServicesClientImpl.java:132)
      at org.kie.server.client.impl.KieServicesClientImpl.init(KieServicesClientImpl.java:87)
      at org.kie.server.client.impl.KieServicesClientImpl.<init>(KieServicesClientImpl.java:74)
      at org.kie.server.client.KieServicesFactory.newKieServicesClient(KieServicesFactory.java:101)
      at com.sample.rules.test.KieServerRestClientTest.connectionFailureTest(KieServerRestClientTest.java:55)
      ~~~

      But after that, the thread used by LoadBalancer remains until termination of client application as LoadBalancer.close() is not called.

              swiderski.maciej Maciej Swiderski (Inactive)
              rhn-support-hmiura Hiroko Miura
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: