gpt4 book ai didi

java - HA Karaf 酒窖群

转载 作者:太空宇宙 更新时间:2023-11-04 11:49:42 26 4
gpt4 key购买 nike

我的机器上的一个地窖组中有三个 karaf 节点。第一个节点 (lb_node) 用作负载均衡器,其他两个节点(1_node2_node)用作服务节点(具有已部署的功能)。两个节点都有可用的 /service 地址。我已经在集群上安装了cellar-http-balancer功能。此外,我还在 1_node2_node 上安装了本地示例功能。
问题是,当我启动 1_node2_node 时,它们的服务未在 lb_node 中正确注册。来自 lb_nodehttp-list 输出:

    ID  | Servlet                    | Servlet-Name    | State       | Alias               | Url
103 | CellarBalancerProxyServlet | ServletModel-10 | Failed | /features | [/features/*]
103 | CellarBalancerProxyServlet | ServletModel-11 | Failed | /jolokia | [/jolokia/*]
103 | CellarBalancerProxyServlet | ServletModel-12 | Failed | /gogo | [/gogo/*]
103 | CellarBalancerProxyServlet | ServletModel-9 | Failed | /instance | [/instance/*]
103 | CellarBalancerProxyServlet | ServletModel-13 | Failed | /services | [/services/*]
103 | CellarBalancerProxyServlet | ServletModel-8 | Deployed | /jolokia | [/jolokia/*]
103 | CellarBalancerProxyServlet | ServletModel-14 | Failed | /system/console/res | [/system/console/res/*]
103 | CellarBalancerProxyServlet | ServletModel-15 | Failed | /system/console | [/system/console/*]
103 | CellarBalancerProxyServlet | ServletModel-3 | Deployed | /gogo | [/gogo/*]
103 | CellarBalancerProxyServlet | ServletModel-2 | Deployed | /instance | [/instance/*]
103 | CellarBalancerProxyServlet | ServletModel-7 | Deployed | /features | [/features/*]
103 | CellarBalancerProxyServlet | ServletModel-6 | Deployed | /services | [/services/*]
103 | CellarBalancerProxyServlet | ServletModel-5 | Deployed | /system/console | [/system/console/*]
103 | CellarBalancerProxyServlet | ServletModel-4 | Deployed | /system/console/res | [/system/console/res/*]

如您所见,只有一个节点注册地址。当我在浏览器中输入 lb_node url 以检查其他节点的功能是否有效时,它确实有效。但是当我关闭注册节点时,lb_node 将不再充当代理。它抛出java.net.ConnectException:连接被拒绝

在教程中https://karaf.apache.org/manual/cellar/latest-4/#_http_balancer有一种情况是只有一个节点有服务和一个平衡器,这不是我的情况。

有没有办法使用karaf和cellar实现http负载均衡的active/active集群?

最佳答案

我将此作为答案,因为我无法发表评论(没有声誉),我不会回答您的问题,但它可能会对您有所帮助。

我找到了this github 项目实现了我认为您想要实现的目标,我还没有对其进行测试。

关于java - HA Karaf 酒窖群,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41969808/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com