Hazelcast成员正在向同一主机上运行的另一个集群发送无效的加入请求。

huangapple go评论38阅读模式
英文:

Hazelcast member is sending the invalid join request to another cluster running on the same host

问题

我们有两个应用程序,称为A和B,它们分别拥有自己的Hazelcast集群(通过TCP连接),并运行在相同的机器上。问题在于,属于应用程序A的集群成员每隔2分钟就向属于应用程序B的其他成员发送无效的加入请求。

预期行为
虽然这个加入请求被忽略了,但应用程序日志事件不必要地增加,如下所示。

日志事件
[hz.reports-NodeA.priority-generic-operation.thread-0] [WARN] com.hazelcast.internal.cluster.impl.ClusterJoinManager -- [NodeA]:5702 [hazelcast-reports] [5.3.0] 从[NodeB]:5701接收到了一个无效的加入请求,原因:属于不同集群的成员部分

我们尝试为集群中的每个成员分配唯一的实例名称,但仍然没有运气。

英文:

We have two applications , say A & B having their own hazelcast cluster (via TCP) and runs on the same machines. Here the issue is that the cluster member belongs to application A is keep sending invalid join requests to other member belong to application B for every 2 mins.

Expected behavior
Though this join request is ignored, the application log events are growing unnecessarily with the below event.

Log Event
[hz.reports-NodeA.priority-generic-operation.thread-0] [WARN] com.hazelcast.internal.cluster.impl.ClusterJoinManager -- [NodeA]:5702 [hazelcast-reports] [5.3.0] Received an invalid join request from [NodeB]:5701, cause: members part of different cluster

We tried to assign unique instance name for every member in the cluster, but still no luck

答案1

得分: 1

如果您没有在member-list上设置端口,每个集群将探测相同的默认端口范围(5701到5703),找到一个进程并尝试加入它。

对于一个集群,类似这样可以修复:

  network:
    port:
      port: 6701
    join:
      auto-detection:
        enabled: false
      multicast:
        enabled: false
      tcp-ip:
        enabled: true
        member-list:
          - 127.0.0.1:6701
          - 127.0.0.1:6702

port: 6701 指示该进程应尝试使用的端口。
127.0.0.1:6701127.0.0.1:6702 指示要探测的位置。

英文:

If you don't set ports on member-list, each cluster will probe the same default range of ports (5701 to 5703), find a process and attempt to join with it.

For one cluster something like this should fix:

  network:
    port:
      port: 6701
    join:
      auto-detection:
        enabled: false
      multicast:
        enabled: false
      tcp-ip:
        enabled: true
        member-list:
          - 127.0.0.1:6701
          - 127.0.0.1:6702

The port: 6701 indicates which port this process should try to use.
The 127.0.0.1:6701 & 127.0.0.1:6702 indicate the places to probe.

huangapple
  • 本文由 发表于 2023年6月13日 15:05:06
  • 转载请务必保留本文链接:https://go.coder-hub.com/76462406.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定