legacy-knowledge-base
公開されました Sep. 10, 2025

UDPマルチキャストプロトコルとファイアウォール

written-by

Emma Liu

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

この記事は、システム管理者がクラスタ環境に展開されたLiferay DXPインスタンスのトラブルシューティングを行うためのものです。 ファイアウォールの設定が厳しすぎるために起こる問題もあります(すべてのシステムがファイアウォールで保護されているわけではありませんが、ほとんどの場合、ファイアウォールはあります)。 また、ファイアウォールで特定のポートが開放されていない場合、ランダムなクラスタの問題が発生することがあります。 これは、LiferayプラットフォームのClusterLinkがJGroupsを基盤技術としており、クラスタノードの通信に特定のアドレスとポートを使用するためです。

ファイアウォールの設定に起因するクラスタリングの潜在的な問題をいくつか紹介します。

  1. クラスタノード間でキャッシュを複製できない(あるノードの更新をクラスタの他のノードに複製できない)。
  2. 正しいクラスタ設定をしているにもかかわらず、クラスタが形成されない。

これらはあくまで症状であり、根本的な原因の一部を以下に示します:

環境

  • Liferay DXP 7.1
  • Liferay DXP 7.0

解決策

課題ブロック型マルチキャストクラスターノードの内部通信プロトコルについて

クラスタノードが互いに通信できるようにするために、ファイアウォールで開く必要のあるノードがいくつかあります:

 #
    # See the property "cluster.link.channel.properties.control".
    #
    multicast.group.address["cluster-link-control"]=239.255.0.1
    #multicast.group.address["cluster-link-control"]=ff0e::8:8:1
    multicast.group.port["cluster-link-control"]=23301

    #
    # See the properties "cluster.link.channel.properties.transport.0" and
    # "cluster.link.channel.system.properties".
    #
    multicast.group.address["cluster-link-udp"]=239.255.0.2
    #multicast.group.address["cluster-link-udp"]=ff0e::8:8:2
    multicast.group.port["cluster-link-udp"]=23302

    #
    # See the property "cluster.link.channel.system.properties".
    #
    multicast.group.address["cluster-link-mping"]=239.255.0.3
    #multicast.group.address["cluster-link-mping"]=ff0e::8:8:3
    multicast.group.port["cluster-link-mping"]=23303

    #
    # See the properties "ehcache.multi.vm.config.location" and
    # "ehcache.multi.vm.config.location.peerProviderProperties".
    #
    multicast.group.address["multi-vm"]=239.255.0.5
    multicast.group.port["multi-vm"]=23305
	

問題点JGroupでポートがランダムに選ばれる

JGroupsのドキュメントによると、

UDP は、グループの全メンバーにメッセージを送信するためにIPマルチキャストを使用し、ユニキャストメッセージ(1人のメンバーに送信する)にはUDPデータグラムを使用します。 UDPは起動するとユニキャストソケットとマルチキャストソケットを開きます。ユニキャストソケットはユニキャストメッセージの送受信に使用され、マルチキャストソケットはマルチキャストメッセージを送受信します。 (強調)


デフォルトでは、JGroupsはユニキャストポートをランダムに選択します。 例えば、ポータルの起動ログにあるように、55091と52920がランダムに選ばれます:

GMS: address=emma-12723, cluster=liferay-channel-control, physical address=192.168.1.115:55091
GMS: address=emma-15524, cluster=liferay-channel-transport-0, physical address=192.168.1.115:52920
		

そのため、ファイアウォールでこの2つのポートを開放する必要があります。

管理者がファイアウォールで許可されるポートを固定したい場合は、 portal-ext.propertiesbind_port プロパティを定義することができます:

cluster.link.channel.properties.control=UDP(bind_addr=${cluster.link.bind.addr["cluster-link-control"]};bind_port=8888;mcast_group_addr=${multicast.group.address["cluster-link-control"]};mcast_port=${multicast.group.port["cluster-link-control"]}):PING:MERGE3(min_interval=10000;max_interval=30000):FD_SOCK:FD_ALL:VERIFY_SUSPECT(timeout=1500):pbcast.NAKACK2(xmit_interval=500;xmit_table_num_rows=100;xmit_table_msgs_per_row=2000;xmit_table_max_compaction_time=30000;max_msg_batch_size=500;use_mcast_xmit=false;discard_delivered_msgs=true):UNICAST3(xmit_interval=500;xmit_table_num_rows=100;xmit_table_msgs_per_row=2000;xmit_table_max_compaction_time=60000;conn_expiry_timeout=0;max_msg_batch_size=500):pbcast.STABLE(stability_delay=1000;desired_avg_gossip=50000;max_bytes=4M):pbcast.GMS(join_timeout=2000;print_local_addr=true;view_bundling=true):UFC(max_credits=2M;min_threshold=0.4):MFC(max_credits=2M;min_threshold=0.4):FRAG2(frag_size=60K):RSVP(resend_interval=2000;timeout=10000)
	
cluster.link.channel.properties.transport.0=UDP(bind_addr=${cluster.link.bind.addr["cluster-link-udp"]};bind_port=9999;mcast_group_addr=${multicast.group.address["cluster-link-udp"]};mcast_port=${multicast.group.port["cluster-link-udp"]}):PING:MERGE3(min_interval=10000;max_interval=30000):FD_SOCK:FD_ALL:VERIFY_SUSPECT(timeout=1500):pbcast.NAKACK2(xmit_interval=500;xmit_table_num_rows=100;xmit_table_msgs_per_row=2000;xmit_table_max_compaction_time=30000;max_msg_batch_size=500;use_mcast_xmit=false;discard_delivered_msgs=true):UNICAST3(xmit_interval=500;xmit_table_num_rows=100;xmit_table_msgs_per_row=2000;xmit_table_max_compaction_time=60000;conn_expiry_timeout=0;max_msg_batch_size=500):pbcast.STABLE(stability_delay=1000;desired_avg_gossip=50000;max_bytes=4M):pbcast.GMS(join_timeout=2000;print_local_addr=true;view_bundling=true):UFC(max_credits=2M;min_threshold=0.4):MFC(max_credits=2M;min_threshold=0.4):FRAG2(frag_size=60K):RSVP(resend_interval=2000;timeout=10000)
	

did-this-article-resolve-your-issue

legacy-knowledge-base