【问题标题】:Jgroups cluster breaks on restart of individual cluster membersJgroups 集群在单个集群成员重新启动时中断
【发布时间】:2016-03-03 21:18:22
【问题描述】:

当一些集群成员重新启动时,我遇到了 jgroups 集群相互丢失的问题。 我们在集群中有 13 个节点,它们都在同一个子网中。当重新启动 4 个节点时,整个集群会崩溃。所有的成员都停止相互识别,并且没有重新启动的现有成员也找不到彼此。

我们开始收到 SUSPECT 消息,但未能收集所有 ACK

0;33mWARN [Incoming-1,broadcast,node-12] [GMS] node-12:在 2000 毫秒后未能收集视图 [node-12|27] 的所有 ACK(预期 = 11),缺少来自的 11 个 ACK节点 12、节点 4、节点 6、节点 13、节点 11、节点 2、节点 7、节点 8、节点 9、节点 0、节点 3

0;33mWARN [INT-2,broadcast,node-12] [FD] node-12:我被node-5怀疑了;忽略 SUPECT 消息并返回 HEARTBEAT_ACK

PFB 我们正在使用的配置,如果配置有任何问题,请告诉我。我们正在使用 3.4.1.Final 版本的 JGroups

<TCP loopback="true"
recv_buf_size="${tcp.recv_buf_size:20M}"
send_buf_size="${tcp.send_buf_size:640K}"
discard_incompatible_packets="true"
max_bundle_size="64K"
max_bundle_timeout=“5"
enable_bundling="true"
use_send_queues="true"
sock_conn_timeout="300"
timer_type="new"
timer.min_threads="4"
timer.max_threads="10"
timer.keep_alive_time="3000"
timer.queue_max_size="500"
thread_pool.enabled="true"
thread_pool.min_threads="1"
thread_pool.max_threads="10"
thread_pool.keep_alive_time="5000"
thread_pool.queue_enabled=“true"
thread_pool.queue_max_size="100000"
thread_pool.rejection_policy="discard"
oob_thread_pool.enabled="true"
oob_thread_pool.min_threads="1"
oob_thread_pool.max_threads="8"
oob_thread_pool.keep_alive_time="5000"
oob_thread_pool.queue_enabled="false"
oob_thread_pool.queue_max_size="100"
oob_thread_pool.rejection_policy="discard"
bind_addr="${jgroups.bind_addr}"
bind_port="${jgroups.bind_port}" />

<JDBC_PING connection_driver="${database.driver}"
            connection_password="${database.password}"
            connection_username="${database.user}"
            connection_url="${database.url}"
            initialize_sql="${jgroups.schema}"
    datasource_jndi_name="${datasource.jndi.name}"/>

    <MERGE2 min_interval="10000" max_interval="30000" />
    <FD_SOCK />
    <FD timeout="3000" max_tries="3" />
    <VERIFY_SUSPECT timeout="1500" />
    <BARRIER />
    <pbcast.NAKACK use_mcast_xmit="false" exponential_backoff="500" discard_delivered_msgs="true" />
    <UNICAST2 />
    <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000" max_bytes="4M" />
    <pbcast.GMS print_local_addr="true" join_timeout="3000" view_bundling="true" />
    <UFC max_credits="20M" min_threshold="0.4" />
    <MFC max_credits="20M" min_threshold="0.4" /`enter code here`>
    <FRAG2 frag_size="60K" />
    <pbcast.STATE_TRANSFER />

【问题讨论】:

    标签: jgroups


    【解决方案1】:

    如何重新启动节点?通过杀死它们,还是通过正常关闭(=集群离开)? 为您的配置添加一些 cmets:

    • 常规线程池只有 1 个线程在运行,直到队列满(100'000 个元素),因此队列中可能有相当多的消息待处理。我建议禁用队列(thread_pool.queue_enabled=“false"),或增加最小线程数和/或减小队列大小(比如 100)

    • 试试TCPPING而不是JDBC_PING,看看是否有帮助

    • 使用MERGE3 而不是MERGE2

    • 使用NAKACK2 代替NAKACK。一般来说,我建议使用您使用的 JGroups 版本附带的udp.xml,并应用我上面的建议。这会阻止您使用旧协议。

    • 使用FD_ALL 而不是FD

    • 20M 的最大积分对于MFC/UFC 来说太多了,并且实际上违背了流量控制的目的。

    同时运行probe.sh(查看 JGroups 手册了解详细信息)以获取有关各种协议的信息,例如传输中的线程池使用情况(TCP),FD_ALL 中的怀疑等。

    希望对你有帮助,

    【讨论】:

    • 很高兴听到这有帮助。您的线程池配置仍然是有效的单线程...
    猜你喜欢
    • 1970-01-01
    • 2019-01-21
    • 2018-05-25
    • 2013-02-22
    • 2015-04-17
    • 2017-11-09
    • 2018-11-06
    • 1970-01-01
    • 2023-01-26
    相关资源
    最近更新 更多