【问题标题】:Wildfly 9: JGRP000012: discarded message from different cluster hq-cluster (our cluster is ee)Wildfly 9: JGRP000012: 从不同集群 hq-cluster 丢弃的消息(我们的集群是 ee)
【发布时间】:2015-11-20 07:01:46
【问题描述】:

在我们从 Wildfly 8.2.1.Final 升级到 Wildfly 9.0.1.Final 后,我们开始收到很多类似以下的警告:

WARNING [org.jgroups.protocols.TCP] (INT-1,ee,dev6.example.com:server1) JGRP000012: discarded message from different cluster hq-cluster (our cluster is ee). Sender was ad3f8046-3c95-f6d4-da13-3019d931f9e4 (received 4 identical messages from ad3f8046-3c95-f6d4-da13-3019d931f9e4 in the last 64159 ms)

这些消息是针对各种主机和主机上的服务器的。 Wildfly 的 beta 和 CR 版本也是如此,另一方面,它不在版本 8 中。我们使用 TCP 作为传输,但是根据other resources 的说法,对于 UDP 也是如此。

是否有人有解决方案(当然除了提高日志的严重性级别)?谢谢。

【问题讨论】:

  • 你能发布你的 jgroups 配置吗?
  • Herehere,他们说,“这些消息是无害的”。

标签: cluster-computing wildfly hornetq


【解决方案1】:

我们终于找到了问题和解决方案。 Wildfly 9 在同一通信通道内为集群节点和 HornetQ 发送消息,这似乎会产生冲突。我们通过创建第二个堆栈并划分它们之间的流量解决了这个问题。

对于 TCP,工作配置如下:

        <stacks default="tcp">
            <stack name="tcp">
                <transport type="TCP" socket-binding="jgroups-tcp"/>
                <protocol type="TCPPING">
                     <property name="initial_hosts">
                         node1[7600],node1[7750],node2[7600],node2[7750]
                     </property>
                     <property name="port_range">
                         0
                     </property>
                </protocol>
                <protocol type="MERGE2"/>
                <protocol type="FD_SOCK" socket-binding="jgroups-tcp-fd"/>
                <protocol type="FD"/>
                <protocol type="VERIFY_SUSPECT"/>
                <protocol type="pbcast.NAKACK2"/>
                <protocol type="UNICAST3"/>
                <protocol type="pbcast.STABLE"/>
                <protocol type="pbcast.GMS"/>
                <protocol type="MFC"/>
                <protocol type="FRAG2"/>
                <protocol type="RSVP"/>
            </stack>
            <stack name="tcphq">
                <transport type="TCP" socket-binding="jgroups-tcp-hq"/>
                <protocol type="TCPPING">
                    <property name="initial_hosts">
                        node1[7660],node1[7810],node2[7660],node2[7810]
                    </property>
                    <property name="port_range">
                        0
                    </property>
                </protocol>
                <protocol type="MERGE2"/>
                <protocol type="FD_SOCK" socket-binding="jgroups-tcp-hq-fd"/>
                <protocol type="FD"/>
                <protocol type="VERIFY_SUSPECT"/>
                <protocol type="pbcast.NAKACK2"/>
                <protocol type="UNICAST3"/>
                <protocol type="pbcast.STABLE"/>
                <protocol type="pbcast.GMS"/>
                <protocol type="MFC"/>
                <protocol type="FRAG2"/>
                <protocol type="RSVP"/>
            </stack>
        </stacks>

您还需要配置 HornetQ(在这种情况下使用正确的 jgroups-stack,tcphq):

        <broadcast-groups>
            <broadcast-group name="bg-group1">
                 <jgroups-stack>tcphq</jgroups-stack>
                 <jgroups-channel>hq-cluster</jgroups-channel>
                 <broadcast-period>5000</broadcast-period>
                 <connector-ref>
                      http-connector
                 </connector-ref>
            </broadcast-group>
        </broadcast-groups>

        <discovery-groups>
            <discovery-group name="dg-group1">
                 <jgroups-stack>tcphq</jgroups-stack>
                 <jgroups-channel>hq-cluster</jgroups-channel>
                 <refresh-timeout>10000</refresh-timeout>
            </discovery-group>
        </discovery-groups>

...当然你需要将相关的socket-binding添加到socket-binding-group中:

        <socket-binding name="jgroups-tcp-hq" port="7660"/>
        <socket-binding name="jgroups-tcp-hq-fd" port="7670"/>

不幸的是,我没有使用UDP的经验,但我认为原理是一样的。

【讨论】:

  • 我注意到“initial_hosts”对两个堆栈都有相同的端口,对吗?此外,端口可能应该是“套接字绑定”中设置的端口对吗? (假设没有端口偏移)
  • 你是对的,有一个错误。我可能在复制源代码时这样做了。非常感谢!也许它仍然可以工作(这就是为什么没有人注意到?),但现在肯定更好。
  • 抱歉,出现了 necro-bump,但我也很好奇您的初始主机设置,特别是“tcp”堆栈:node1[7600],node1[7750],node2[7600],node2[7750] - 为什么您的节点列出了两次(例如 node1列出了两个端口,7600 和 7750)?
  • @rbellamy 嗨,这是因为我们在每个节点上有两个组(即单独的服务器),它们通过端口来区分。
猜你喜欢
  • 1970-01-01
  • 2020-01-14
  • 2016-06-23
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-09-11
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多