1

Am trying to get s3ping discovery method working in wildfly 8.0.0. I am using default Amazon Linux AMI and using chef to launch instances in ec2 based on this tutorial http://aws.typepad.com/awsaktuell/tutorial/. I have deployed a sample web app which is clustered. As of now i have a single node. But in the near future i ill be adding more nodes in the cluster..

I have modified the file standalone-full-ha.xml with the required s3 credentials and bucket details.

<subsystem xmlns="urn:jboss:domain:jgroups:2.0" default-stack="s3ping">
......
<stack name="s3ping">
            <transport type="TCP" socket-binding="jgroups-tcp" diagnostics-socket-binding="jgroups-diagnostics"/>
            <protocol type="S3_PING">
                <property name="access_key">
                    XXXXXXXXXXXXXXXXXXX
                </property>
                <property name="secret_access_key">
                    XXXXXXXXXXXXXXXXXXXXXXXX
                </property>
                <property name="prefix">
                    jboss-config
                </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>

And i start this jboss instance

sudo /etc/init.d/jboss start

Its getting started successfully,can access the application. I have created s3 bucket manually, "jboss" as Iam user (using "jboss" user credentitals in standalone-full-ha.xml)and also user policy to access s3 bucket, but am unable to see any node information file created inside this s3 bucket. Is there any other configuration i need to add to get it work?

Andrew Schulman
  • 8,561
  • 21
  • 31
  • 47
karthik101
  • 131
  • 7

1 Answers1

0

I was having this same problem and it turned out to be that nothing was broadcasting to the jgroups stack.

Adding something like this fixed it for me:

<subsystem xmlns="urn:jboss:domain:messaging:2.0">
    <hornetq-server>
        <broadcast-groups>
            <broadcast-group name="bg-group1">
                <jgroups-stack>s3ping</jgroups-stack>
                <jgroups-channel>hq-cluster</jgroups-channel>
                <connector-ref>http-connector</connector-ref>
            </broadcast-group>
        </broadcast-groups>
    </hornetq-server>
</subsystem>
  • Thank you very much for this, glad you got it working. I already tried this in standalone mode, it did created a file in s3 but there was no communication between cluster members. Finally i got it working in domain controller mode with some changes in host.xml and domain.xml, it works great even in httpd+mod_cluster configuration. which version of jboss/wildlfy are you using? – karthik101 Jul 28 '15 at 12:29