WebLogic 集群平衡器始终路由到第二个节点

发布于 2024-12-28 11:35:51 字数 1801 浏览 4 评论 0原文

我已将 Apache 配置为负载平衡两个 WebLogic 节点(使用 mod_weblogic), 但所有请求都转发到第二个节点。

这是我添加到 httpd.conf 的内容:

LoadModule weblogic_module modules/mod_wl_22.so
<IfModule mod_weblogic.c>
MatchExpression /soa-infra WebLogicCluster=node1.domain.com:8001,node2.domain.com:8001
</IfModule>
<Location /soa-infra>
SetHandler weblogic-handler
WebLogicCluster node1.domain.com:8001,node2.domain.com:8001
</Location>

我尝试过但没有效果:

1) swap node1.domain.com and node2.domain.com
2) change balancing algorithm in WebLogic Administration Console

一些说明: 1. 客户端正在寻址 apache - 我正在测试自己。 2.我看到apache仅在来自客户端/我的请求之后才创建连接,并且它仅连接到第二个节点(它正在其上执行)。 3. 是的,两个节点都在本地网络中并且可以访问。 我发现了有趣的事情: 如果我从httpd.conf中删除除了用于加载mod_weblogic的行之外的所有行并重新启动apache,那么我无法通过负载平衡器进行访问 - 所以平衡器实际上正在使用我的配置行, 但如果我从列表中删除第二个节点,则负载均衡器仍会重定向第二个节点,而不是仅重定向一个列出的第一个节点。

看来我发现问题了!

经过几次请求后,我在日志中看到:

Wed Jan 25 19:56:49 2012 <480013275070093> Trying a pooled connection for '192.168.0.111/8001/8001'
Wed Jan 25 19:56:49 2012 <480013275070093> getPooledConn: No more connections in the pool for Host[192.168.0.111] Port[8001] SecurePort[8001]
Wed Jan 25 19:56:49 2012 <480013275070093> general list: trying connect to '192.168.0.111'/8001/8001 at line 2724 for '/soa-infra/services/partition/my_composite/my_composite_client_ep'

Wed Jan 25 19:57:05 2012 <480013275070256> Trying to locate Primary or Secondary using SrvrInfo with JVMID: -76285319
Wed Jan 25 19:57:05 2012 <480013275070256> getPreferredFromCookie: Found Primary 192.168.0.112:8001:0
Wed Jan 25 19:57:05 2012 <480013275070256> getPreferredFromCookie: Found 1 servers

192.168.0.111 是第一个节点,192.168.0.112 - 第二个节点。

有什么建议吗?

I have configured Apache to load balance two WebLogic nodes (using mod_weblogic),
but all requests are forwarded to second node.

Here what I have added to httpd.conf:

LoadModule weblogic_module modules/mod_wl_22.so
<IfModule mod_weblogic.c>
MatchExpression /soa-infra WebLogicCluster=node1.domain.com:8001,node2.domain.com:8001
</IfModule>
<Location /soa-infra>
SetHandler weblogic-handler
WebLogicCluster node1.domain.com:8001,node2.domain.com:8001
</Location>

What I have tried with no effect:

1) swap node1.domain.com and node2.domain.com
2) change balancing algorithm in WebLogic Administration Console

Some clarifications:
1. client is adressing apache - I am testing myself.
2. I see that apache is creating connection only after request from client/me and it is only connection to second node (on which it is executing).
3. yes, both nodes are in local network and are reachable.
I have found interesting thing:
if I remove all my lines from httpd.conf except line for loading mod_weblogic and restart apache then I have no access via load-balancer - so balancer is really using my config lines,
but if I remove second node from list then load balancer are still redirecting second node instead of only one listed first node.

Looks like I have found issue!

After several requests I see in log:

Wed Jan 25 19:56:49 2012 <480013275070093> Trying a pooled connection for '192.168.0.111/8001/8001'
Wed Jan 25 19:56:49 2012 <480013275070093> getPooledConn: No more connections in the pool for Host[192.168.0.111] Port[8001] SecurePort[8001]
Wed Jan 25 19:56:49 2012 <480013275070093> general list: trying connect to '192.168.0.111'/8001/8001 at line 2724 for '/soa-infra/services/partition/my_composite/my_composite_client_ep'

Wed Jan 25 19:57:05 2012 <480013275070256> Trying to locate Primary or Secondary using SrvrInfo with JVMID: -76285319
Wed Jan 25 19:57:05 2012 <480013275070256> getPreferredFromCookie: Found Primary 192.168.0.112:8001:0
Wed Jan 25 19:57:05 2012 <480013275070256> getPreferredFromCookie: Found 1 servers

192.168.0.111 is a first node, 192.168.0.112 - second.

Any suggestions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

唯憾梦倾城 2025-01-04 11:35:51

来自 WLS 的 Hdrs:[X-WebLogic-Cluster-List]=[-76285319!node2.domain.com!8001!-1]

节点 2 中的 WebLogic 服务器不知道集群的其余部分。请确保您的集群工作正常。

如果使用单播消息传递,您可以检查组是否已正确创建。

服务器组

Hdrs from WLS:[X-WebLogic-Cluster-List]=[-76285319!node2.domain.com!8001!-1]

WebLogic server in node2 is not aware of the rest of the cluster. Please ensure you cluster is working ok.

If using Unicast messaging, you can check groups are created ok.

ServerGroup

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文