JGroups Instances communication

前提是你 提交于 2019-12-10 16:49:54

问题


I have two machines in which the JGroups is running. The Problem I am facing is, once a Instances is created in one of the machines, few seconds later I start the other Instances. Both of them initiate separatly(Same Cluster) i.e they don not join the cluster together. After 10 to 15 seconds they both communicate and join together.

This delay is causing problem with my Business in the code... There is also a Warning thrown while startin the Program

WARNING: send buffer of socket java.net.MulticastSocket@5954864a was set to 640KB, but the OS only allocated 135.17KB. This might lead to performance problems. Please set your max send buffer in the OS correctly (e.g. net.core.wmem_max on Linux)

Do this has some thing to do with the Issue?


回答1:


You will absolutely need to increase these values – otherwise UNICAST is almost unusable.

If you aren’t familiar with how to do so, modify the /etc/sysctl.conf file. These are my values on my nodes.

JGroups UDP configuration

net.core.rmem_max = 25480000

net.core.wmem_max = 25480000

To reload these values, issue a "sysctl -p" as root to force a reload of this file.

Source: http://comments.gmane.org/gmane.comp.java.javagroups.general/7922




回答2:


The Warning is not related to your problem, this can only lead to performance issues, because the OS buffer is to small for your Multicast-Buffer.

Concerning your problem: check your log for all jgroups messages (not only warnings) and check the timings of them. And post your cluster configuration.




回答3:


Edit the /etc/sysctl.conf by changing this value (net.core.wmem_max) and run the "sysctl -p"



来源:https://stackoverflow.com/questions/7579150/jgroups-instances-communication

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!