AWS上的Wildfly 10 HA群集不起作用

时间:2016-06-09 07:24:46

标签: amazon-web-services wildfly high-availability wildfly-10

我正在尝试使用Wildfly-10在Amazon Web Service上设置HA群集。我的standalone-ha.xml配置是

...
<subsystem xmlns="urn:jboss:domain:jgroups:4.0">
<channels default="ee">
    <channel name="ee" stack="s3ping"/>
<channels>
<stacks>
       ...            
    <stack name="s3ping">
       <transport type="TCP" socket-binding="jgroups-tcp" diagnostics-socket-binding="jgroups-diagnostics"/>
           <protocol type="S3_PING">
               <property name="access_key">
                   <%= @s3_access_key %>
               </property>
               <property name="secret_access_key">
                   <%= @s3_secret_access_key %>
               </property>
               <property name="prefix">
                   <%= @s3_bucket %>
               </property>
               <property name="timeout">
                   60000
               </property>
           </protocol>
           <protocol type="MERGE2"/>
           <protocol type="FD_SOCK" socket-binding="jgroups-tcp-fd"/>              
           <protocol type="FD"/>
           <protocol type="VERIFY_SUSPECT"/>
           <protocol type="BARRIER"/>
           <protocol type="pbcast.NAKACK"/>
           <protocol type="UNICAST2"/>
           <protocol type="pbcast.STABLE"/>
           <protocol type="pbcast.GMS"/>
           <protocol type="UFC"/>
           <protocol type="MFC"/>
           <protocol type="FRAG2"/>
       </stack>
</stacks>
</subsystem>
...

使用非常相似的配置,我可以使用Wildfly 8和Wildfly 8.2进行聚类。但是对于Wildfly 10,我无法成功。

此外,我已将<distributable/>添加到web.xml

在控制台上,我得到一个警告说;

[org.jboss.protocols.pbcast.GMS] (MSC service thread 1-1) node1: JOIN(node1) sent to node1 timed out (after 3000 ms), on try 1

并且一直持续到on try 10

我的错是什么,如何解决。

感谢。

1 个答案:

答案 0 :(得分:0)

我找到了警告的原因。两台机器无法相互接触。我正在分享相关部分;

<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>
</interfaces>
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
    <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
    <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9993}"/>
    <socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>
    <socket-binding name="http" port="${jboss.http.port:8080}"/>
    <socket-binding name="https" port="${jboss.https.port:8443}"/>
    <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="public" port="7600"/>
    <socket-binding name="jgroups-tcp-fd" interface="public" 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 name="modcluster" port="0" multicast-address="224.0.1.105" multicast-port="23364"/>
    <socket-binding name="txn-recovery-environment" port="4712"/>
    <socket-binding name="txn-status-manager" port="4713"/>
    <outbound-socket-binding name="mail-smtp">
        <remote-destination host="localhost" port="25"/>
    </outbound-socket-binding>
</socket-binding-group>