Les version de WildFly
- 2017-10-23 WildFly 11.0.0.Final
- 2016-08-19 WildFly 10.1.0.Final
- 2016-01-29 WildFly 10.0.0.Final
Doc WildFly
Les commandes de bases avec jtips.info pour WildFly (7)
wildfly TCPPING "urn:jboss:domain:jgroups:4.0"
- WildFly Model Reference - WildFly subsystem=jgroups - The configuration of the JGroups subsystem.
- Is it possible to make a cluster of Wildfly 10 instances without using multicast - JBoss Developer
- WildFly Clustering without Multicast - NovaOrdis Knowledge Base
- WildFly 10 Jgroups allways binding to localhost interface - JBoss Developer
- WildFly 10 Jgroups allways binding to localhost interface - Stack Overflow
- Configure the TCP communication channel on JGroups
- How to configure JBoss EAP and WildFly to use TCPPING
- Creating TCP cluster in JBoss AS 7.1 in standalone mode?
- Chapter 22. Configuring High Availability - Red Hat Customer Portal
- TCP configuration bind_addr external_addr
- Advanced Concepts Using UDP / TCP without IP multicasting
- TCPPING (static list of member addresses),
- TCPGOSSIP (external lookup service),
- FILE_PING (shared directory), BPING (using broadcasts),
- JDBC_PING (using a shared database).
- List of Protocols
- TCPPING. Properties :
- initial_hosts : Comma delimited list of hosts to be contacted for initial membership (It is recommended to include the addresses of all cluster members in initial_hosts.)
- max_dynamic_hosts : max number of hosts to keep beyond the ones in initial_hosts
- port_range : Number of additional ports to be probed for membership. A port_range of 0 does not probe additional ports. Example: initial_hosts=A7800 port_range=0 probes A:7800, port_range=1 probes A:7800 and A:7801
- TCPPING. Properties :
- JGroups Services
- TCPPING
- timeout specifies the maximum number of milliseconds to wait for any responses. The default is 3000.
- num_initial_members specifies the maximum number of responses to wait for unless timeout has expired. The default is 2.
- initial_hosts is a comma-separated list of addresses/ports (e.g., host112345,host223456) which are pinged for discovery. All possible cluster members must be listed, not just a few "well known hosts"; otherwise discovery of cluster splits by MERGE2 will not work reliably
- TCPPING
- port_range
Wildfly 10.0.00 et 10.1.0 sont livrés avec cette configuration par défaut pour JGroups pour le High Availability (HA)
wildfly-10.1.0.Final/standalone/ standalone-ha.xml ou standalone-full-ha.xml :
<subsystem xmlns="urn:jboss:domain:jgroups:4.0">
<channels default="ee">
<channel name="ee" stack="udp"/>
</channels>
<stacks>
<stack name="udp">
<transport type="UDP" socket-binding="jgroups-udp"/>
<protocol type="PING"/>
<protocol type="MERGE3"/>
<protocol type="FD_SOCK" socket-binding="jgroups-udp-fd"/>
<protocol type="FD_ALL"/>
<protocol type="VERIFY_SUSPECT"/>
<protocol type="pbcast.NAKACK2"/>
<protocol type="UNICAST3"/>
<protocol type="pbcast.STABLE"/>
<protocol type="pbcast.GMS"/>
<protocol type="UFC"/>
<protocol type="MFC"/>
<protocol type="FRAG2"/>
</stack>
<stack name="tcp">
<transport type="TCP" socket-binding="jgroups-tcp"/>
<protocol type="MPING" socket-binding="jgroups-mping"/>
<protocol type="MERGE3"/>
<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"/>
</stack>
</stacks>
</subsystem>
<interfaces>
<interface name="management">
<inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
</interface>
<interface name="public">
<inet-address value="${jboss.bind.address:127.0.0.1}"/>
</interface>
<interface name="private">
<inet-address value="${jboss.bind.address.private:127.0.0.1}"/>
</interface>
<interface name="unsecure">
<inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
</interface>
</interfaces>
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
<!- ... -->
<socket-binding name="jgroups-mping" interface="private" port="0" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45700"/>
<socket-binding name="jgroups-tcp" interface="private" port="7600"/>
<socket-binding name="jgroups-tcp-fd" interface="private" port="57600"/>
<socket-binding name="jgroups-udp" interface="private" port="55200" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45688"/>
<socket-binding name="jgroups-udp-fd" interface="private" port="54200"/>
<!- ... -->
</socket-binding-group>
Pour activer le TCPPING, il faut :
Commenter la section <stack name="udp">
(ou est ce que remplacer <stacks> en <stacks default="tcp">, ou bien encore rajouter default-stack="tcp"> dans <subsystem xmlns="urn:jboss:domain:jgroups:4.0" default-stack="tcp"> fait l'affaire ? il me semble que c'est obsolète)
Configurer <protocol type="TCPPING">
<!--
<subsystem xmlns="urn:jboss:domain:jgroups:4.0">
-->
<subsystem xmlns="urn:jboss:domain:jgroups:4.0" default-stack="tcp">
<channels default="ee">
<!--
<channel name="ee" stack="udp"/>
-->
<channel name="ee" stack="tcp"/>
</channels>
<!--
<stacks>
-->
<stacks default="tcp">
<!--
<stack name="udp">
<transport type="UDP" socket-binding="jgroups-udp"/>
<protocol type="PING"/>
<protocol type="MERGE3"/>
<protocol type="FD_SOCK" socket-binding="jgroups-udp-fd"/>
<protocol type="FD_ALL"/>
<protocol type="VERIFY_SUSPECT"/>
<protocol type="pbcast.NAKACK2"/>
<protocol type="UNICAST3"/>
<protocol type="pbcast.STABLE"/>
<protocol type="pbcast.GMS"/>
<protocol type="UFC"/>
<protocol type="MFC"/>
<protocol type="FRAG2"/>
</stack>
-->
<stack name="tcp">
<transport type="TCP" socket-binding="jgroups-tcp"/>
<protocol type="TCPPING">
<property name="initial_hosts">
${jboss.jgroups.custom.ippeer.addr:127.0.0.1}[7600]
</property>
<!--
<property name="initial_hosts">
1.1.1.1[7600],2.2.2.2[7600]
</property>
-->
<property name="port_range">
0
</property>
<property name="timeout">
3000
</property>
<property name="num_initial_members">
2
</property>
</protocol>
<!--
<protocol type="MPING" socket-binding="jgroups-mping"/>
-->
<protocol type="MERGE3"/>
<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"/>
</stack>
</stacks>
</subsystem>
Déclarer les accès IP
Avec les serveurs configurés par IP / Nom de nœud :
- Serveur N°1 : 1.1.1.1 / NodeL1
- Serveur N°2 : 2.2.2.2 / NodeW1
./standalone.sh -b 0.0.0.0 --server-config=standalone-full-ha.xml -Djboss.node.name=NodeL1 -Djboss.bind.address=1.1.1.1 -Djboss.bind.address.management=1.1.1.1 -Djboss.bind.address.private=1.1.1.1 -Djgroups.bind_addr=1.1.1.1 -Djboss.jgroups.custom.ippeer.addr=2.2.2.2
.\standalone.bat --server-config=standalone-full-ha.xml -Djboss.node.name=NodeW1 -Djboss.bind.address=2.2.2.2 -Djboss.bind.address.management=2.2.2.2 -Djboss.bind.address.private=2.2.2.2 -Djgroups.bind_addr=2.2.2.2 -Djboss.jgroups.custom.ippeer.addr=1.1.1.1
Voyez les configurations WFLY10 :