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

RuleServicesClientImpl.executeCommandsWithResults() doesn't correctly fail over with client LoadBalancer

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.68.0.Final
    • 7.66.0.Final
    • kie server
    • None
    • 2022 Week 11-13 (from Mar 14)
    • 3
    • NEW
    • NEW

      When you configure a LoadBalancer for kie-server-client,

      For example)

      String LB_URL = "http://localhost:8180/kie-server/services/rest/server|http://localhost:8280/kie-server/services/rest/server";
      
      KieServicesConfiguration config = KieServicesFactory.newRestConfiguration(LB_URL, USERNAME, PASSWORD);
      

      RuleServicesClientImpl.executeCommandsWithResults() doesn't correctly fail over to server2 when server1 is down.

      2022-03-15 16:12:09,813 [main][org.kie.server.client.impl.AbstractKieServicesClientImpl] WARN  Marking endpoint 'http://localhost:8180/kie-server/services/rest/server/containers/instances/kie-server-kjar-example_1.0.0' as failed due to Connection refused (Connection refused)
      2022-03-15 16:12:09,813 [main][org.kie.server.client.balancer.LoadBalancer] DEBUG Url 'http://localhost:8180/kie-server/services/rest/server/containers/instances/kie-server-kjar-example_1.0.0' is marked as failed and will be considered offline by RoundRobinBalancerStrategy{availableEndpoints=[http://localhost:8280/kie-server/services/rest/server]}
      2022-03-15 16:12:09,814 [main][org.kie.server.client.balancer.LoadBalancer] DEBUG Load balancer RoundRobinBalancerStrategy{availableEndpoints=[http://localhost:8280/kie-server/services/rest/server]} selected url 'http://localhost:8280/kie-server/services/rest/server'
      2022-03-15 16:12:09,814 [main][org.kie.server.client.impl.AbstractKieServicesClientImpl] DEBUG Selecting next endpoint from load balancer - 'http://localhost:8280/kie-server/services/rest/server/containers/instances/kie-server-kjar-example_1.0.0'
      2022-03-15 16:12:09,814 [main][org.kie.server.client.impl.AbstractKieServicesClientImpl] WARN  Marking endpoint 'http://localhost:8280/kie-server/services/rest/server/containers/instances/kie-server-kjar-example_1.0.0' as failed due to Connection refused (Connection refused)
      2022-03-15 16:12:09,814 [main][org.kie.server.client.balancer.LoadBalancer] DEBUG Url 'http://localhost:8280/kie-server/services/rest/server/containers/instances/kie-server-kjar-example_1.0.0' is marked as failed and will be considered offline by RoundRobinBalancerStrategy{availableEndpoints=[]}
      2022-03-15 16:12:09,815 [main][org.kie.server.client.impl.AbstractKieServicesClientImpl] WARN  Cannot invoke request - 'No available endpoints found'
      2022-03-15 16:12:09,815 [pool-2-thread-1][org.kie.server.client.balancer.LoadBalancer] DEBUG Starting to scan if any of the failed endpoints is back online
      2022-03-15 16:12:09,816 [main][org.kie.server.client.impl.AbstractKieServicesClientImpl] WARN  Marking endpoint 'http://localhost:8280/kie-server/services/rest/server/containers/instances/kie-server-kjar-example_1.0.0' as failed due to Connection refused (Connection refused)
      2022-03-15 16:12:09,816 [pool-2-thread-1][org.kie.server.client.balancer.LoadBalancer] DEBUG Url 'http://localhost:8180/kie-server/services/rest/server' is still offline due to Connection refused (Connection refused)
      

              rhn-support-tkobayas Toshiya Kobayashi
              rhn-support-tkobayas Toshiya Kobayashi
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: