0

I have an autoscaling group in Amazon. I've configured Jboss in each instance as:

<subsystem xmlns="urn:jboss:domain:jgroups:1.1" default-stack="tcps3">
<stack name="tcps3">
            <transport type="TCP" socket-binding="jgroups-tcp" diagnostics-socket-binding="jgroups-diagnostics"/>
            <protocol type="S3_PING">
                <property name="access_key">
                    xxxxxxxxxxxxx
                </property>
                <property name="secret_access_key">
                    /xxxxxxxxxxxx
                </property>
                <property name="location">
                    mybucket
                </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>
    </subsystem>

When I enter in my mybucket I see files for each node, but the sessions are not being replicated.

This is part of my jboss log file in initialization of node-2:

17:27:19,674 INFO  [stdout] (pool-25-thread-1) -------------------------------------------------------------------
17:27:19,674 INFO  [stdout] (pool-25-thread-1) -------------------------------------------------------------------
17:27:19,675 INFO  [stdout] (pool-25-thread-1) GMS: address=ip-172-31-20-76/hibernate, cluster=hibernate, physical address=127.0.0.1:7600
17:27:19,675 INFO  [stdout] (pool-25-thread-1) GMS: address=ip-172-31-20-76/hibernate, cluster=hibernate, physical address=127.0.0.1:7600
17:27:19,677 INFO  [stdout] (pool-25-thread-1) -------------------------------------------------------------------
17:27:19,677 INFO  [stdout] (pool-25-thread-1) -------------------------------------------------------------------
17:27:19,830 INFO  [stdout] (pool-15-thread-1) 
17:27:19,830 INFO  [stdout] (pool-15-thread-1) 
17:27:19,831 INFO  [stdout] (pool-15-thread-1) -------------------------------------------------------------------
17:27:19,831 INFO  [stdout] (pool-15-thread-1) -------------------------------------------------------------------
17:27:19,835 INFO  [stdout] (pool-15-thread-1) GMS: address=ip-172-31-20-76/web, cluster=web, physical address=127.0.0.1:7600
17:27:19,835 INFO  [stdout] (pool-15-thread-1) GMS: address=ip-172-31-20-76/web, cluster=web, physical address=127.0.0.1:7600
17:27:19,837 INFO  [stdout] (pool-15-thread-1) -------------------------------------------------------------------
17:27:19,837 INFO  [stdout] (pool-15-thread-1) -------------------------------------------------------------------
17:27:23,569 INFO  [org.jboss.as.jpa] (MSC service thread 1-2) JBAS011402: Starting Persistence Unit Service 'QuestoesEAR.ear/QuestoesEJB.jar#CrudPU'
17:27:23,569 INFO  [org.jboss.as.jpa] (MSC service thread 1-2) JBAS011402: Starting Persistence Unit Service 'QuestoesEAR.ear/QuestoesEJB.jar#CrudPU'
17:27:23,642 INFO  [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (MSC service thread 1-3) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be pasivated.
17:27:23,642 INFO  [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (MSC service thread 1-3) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be pasivated.
17:27:23,652 INFO  [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (MSC service thread 1-4) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be pasivated.
17:27:23,652 INFO  [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (MSC service thread 1-4) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be pasivated.
17:27:23,820 INFO  [org.hibernate.annotations.common.Version] (MSC service thread 1-2) HCANN000001: Hibernate Commons Annotations {4.0.1.Final}
17:27:23,820 INFO  [org.hibernate.annotations.common.Version] (MSC service thread 1-2) HCANN000001: Hibernate Commons Annotations {4.0.1.Final}
17:27:23,826 INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (pool-16-thread-1) ISPN000078: Starting JGroups Channel
17:27:23,826 INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (pool-16-thread-1) ISPN000078: Starting JGroups Channel
17:27:23,831 INFO  [org.hibernate.Version] (MSC service thread 1-2) HHH000412: Hibernate Core {4.0.1.Final}
17:27:23,831 INFO  [org.hibernate.Version] (MSC service thread 1-2) HHH000412: Hibernate Core {4.0.1.Final}
17:27:23,842 INFO  [org.hibernate.cfg.Environment] (MSC service thread 1-2) HHH000206: hibernate.properties not found
17:27:23,842 INFO  [org.hibernate.cfg.Environment] (MSC service thread 1-2) HHH000206: hibernate.properties not found
17:27:23,845 INFO  [org.hibernate.cfg.Environment] (MSC service thread 1-2) HHH000021: Bytecode provider name : javassist
17:27:23,845 INFO  [org.hibernate.cfg.Environment] (MSC service thread 1-2) HHH000021: Bytecode provider name : javassist
17:27:23,850 INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (pool-16-thread-1) ISPN000094: Received new cluster view: [ip-172-31-20-76/web|0] [ip-172-31-20-76/web]
17:27:23,850 INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (pool-16-thread-1) ISPN000094: Received new cluster view: [ip-172-31-20-76/web|0] [ip-172-31-20-76/web]
17:27:23,853 INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (pool-16-thread-1) ISPN000079: Cache local address is ip-172-31-20-76/web, physical addresses are [127.0.0.1:7600]
17:27:23,853 INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (pool-16-thread-1) ISPN000079: Cache local address is ip-172-31-20-76/web, physical addresses are [127.0.0.1:7600]
17:27:23,872 INFO  [org.infinispan.factories.GlobalComponentRegistry] (pool-16-thread-1) ISPN000128: Infinispan version: Infinispan 'Brahma' 5.1.2.FINAL
17:27:23,872 INFO  [org.infinispan.factories.GlobalComponentRegistry] (pool-16-thread-1) ISPN000128: Infinispan version: Infinispan 'Brahma' 5.1.2.FINAL
17:27:23,875 INFO  [org.infinispan.config.ConfigurationValidatingVisitor] (pool-16-thread-1) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be pasivated.
17:27:23,875 INFO  [org.infinispan.config.ConfigurationValidatingVisitor] (pool-16-thread-1) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be pasivated.
17:27:23,909 INFO  [org.hibernate.ejb.Ejb3Configuration] (MSC service thread 1-2) HHH000204: Processing PersistenceUnitInfo [
    name: CrudPU
    ...]
17:27:23,909 INFO  [org.hibernate.ejb.Ejb3Configuration] (MSC service thread 1-2) HHH000204: Processing PersistenceUnitInfo [
    name: CrudPU
    ...]
17:27:24,126 INFO  [org.infinispan.jmx.CacheJmxRegistration] (pool-16-thread-1) ISPN000031: MBeans were successfully registered to the platform mbean server.
17:27:24,126 INFO  [org.infinispan.jmx.CacheJmxRegistration] (pool-16-thread-1) ISPN000031: MBeans were successfully registered to the platform mbean server.
17:27:24,184 INFO  [org.jboss.as.clustering.infinispan] (pool-16-thread-1) JBAS010281: Started repl cache from web container
17:27:24,184 INFO  [org.jboss.as.clustering.infinispan] (pool-16-thread-1) JBAS010281: Started repl cache from web container
17:27:24,212 INFO  [org.jboss.as.clustering.impl.CoreGroupCommunicationService.web] (MSC service thread 1-4) JBAS010206: Number of cluster members: 1
17:27:24,212 INFO  [org.jboss.as.clustering.impl.CoreGroupCommunicationService.web] (MSC service thread 1-4) JBAS010206: Number of cluster members: 1
Camilla
  • 489
  • 5
  • 14

1 Answers1

0

First, check you have added <distributable/> in the web.xml file of the application.

After, take a look at these links, there are some problems in replication in EC2:

Problem with packet sizes on EC2

Possible workaround, limiting packet size with FRAG2: FRAG and FRAG2

Federico Sierra
  • 5,118
  • 2
  • 23
  • 36
  • I've already had ``. I've changed `` for ` 16K ` but still not working.. :( – Camilla Oct 21 '14 at 22:30
  • @Camila try enabling debug level for jgroups, and check if exist messages for replication. – Federico Sierra Oct 21 '14 at 23:53
  • I've edited my answer with part of my log file. I couldn't see any errors. – Camilla Oct 22 '14 at 20:05
  • @Camilla This message in the log shows that the JGroups configuration is not correct: `Number of cluster members: 1` You would have to have at least 2 members. Check if the firewall is enable and exist connectivity between nodes – Federico Sierra Oct 22 '14 at 22:00
  • One interesting thing in the log is the duplicate entries for each message. How are you create instances of jboss? seem to run together and send messages to the same log – Federico Sierra Oct 22 '14 at 22:09