1 2 Previous Next 25 Replies Latest reply on Feb 5, 2019 9:27 AM by Paul Ferraro Go to original post
      • 15. Re: HowTo enable session-replication in EAP7 ..?
        Vamshi Krishna Newbie

        I was mixing and matching cluster n server-group, thanks for getting me straight. So I would be creating 2 profiles, 2 server-groups, 2 JVMs in each server-group and then I am using only one socket-bidning-group in my domain.xml (full-ha-sockets), removed others.

         

             profile1 => server-group1 => jvm1(Host-B) and jvm2(Host-C) => full-ha-sockets

             profile2 => server-group2 => jvm1(Host-D) and jvm2(Host-E) => full-ha-sockets

         

         

        This is my jgroups subsystem configuration changed the stack from "udp" to "tcp", do I have to add a property for protocol type MPING in order for the jvms to be discovered

         

                    <subsystem xmlns="urn:jboss:domain:jgroups:4.0">

                        <channels default="ee">

                            <channel name="ee" stack="tcp"/>

                        </channels>

                        <stacks>

                            <stack name="udp">...................</stack>

                            <stack name="tcp">

                                <transport type="TCP" socket-binding="jgroups-tcp"/>

                                <protocol type="MPING" socket-binding="jgroups-mping"/>

                                 <!-- properties ...? -------->

                                <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>

         

            <socket-binding-groups>

                <socket-binding-group name="full-ha-sockets" default-interface="public">

                    <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="iiop" interface="unsecure" port="3528"/>

                    <socket-binding name="iiop-ssl" interface="unsecure" port="3529"/>

                    <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 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>

            </socket-binding-groups>

        • 16. Re: HowTo enable session-replication in EAP7 ..?
          Paul Ferraro Master

          What is the definition of your "private" interface?  By default, this uses the loopback interface (for security reasons) - and will likely need to be set to something else (for reference, see how the public interface is configured).

          • 17. Re: HowTo enable session-replication in EAP7 ..?
            Vamshi Krishna Newbie

            I'm using the default one's.

             

                <interfaces>

                    <interface name="management"/>

                    <interface name="public"/>

                    <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>

             

             

            my java process

             

            jboss     6424 28698  0 Apr26 ?        00:05:06 /usr/lib/jvm/jre-1.8.0/bin/java -D[Process Controller] -server -Xms64m -Xmx512m -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Dorg.jboss.boot.log.file=/opt/rh/eap7/root/usr/share/wildfly/domain/log/process-controller.log -Dlogging.configuration=file:/opt/rh/eap7/root/usr/share/wildfly/domain/configuration/logging.properties -jar /opt/rh/eap7/root/usr/share/wildfly/jboss-modules.jar -mp /opt/rh/eap7/root/usr/share/wildfly/modules org.jboss.as.process-controller -jboss-home /opt/rh/eap7/root/usr/share/wildfly -jvm /usr/lib/jvm/jre-1.8.0/bin/java -mp /opt/rh/eap7/root/usr/share/wildfly/modules -- -Dorg.jboss.boot.log.file=/opt/rh/eap7/root/usr/share/wildfly/domain/log/host-controller.log -Dlogging.configuration=file:/opt/rh/eap7/root/usr/share/wildfly/domain/configuration/logging.properties -server -Xms64m -Xmx512m -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -- -default-jvm /usr/lib/jvm/jre-1.8.0/bin/java -c domain.xml -b 0.0.0.0

             

            jboss     6438  6424  0 Apr26 ?        00:06:13 /usr/lib/jvm/jre-1.8.0/bin/java -D[Host Controller] -Dorg.jboss.boot.log.file=/opt/rh/eap7/root/usr/share/wildfly/domain/log/host-controller.log -Dlogging.configuration=file:/opt/rh/eap7/root/usr/share/wildfly/domain/configuration/logging.properties -server -Xms64m -Xmx512m -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -jar /opt/rh/eap7/root/usr/share/wildfly/jboss-modules.jar -mp /opt/rh/eap7/root/usr/share/wildfly/modules org.jboss.as.host-controller -mp /opt/rh/eap7/root/usr/share/wildfly/modules --pc-address 127.0.0.1 --pc-port 40839 -default-jvm /usr/lib/jvm/jre-1.8.0/bin/java -c domain.xml -b 0.0.0.0 -Djboss.home.dir=/opt/rh/eap7/root/usr/share/wildfly

            • 18. Re: HowTo enable session-replication in EAP7 ..?
              Paul Ferraro Master

              Unless you specify a "jboss.bind.address.private" system property, or directly override the address of this interface in the configuration, your clustering sockets will use the loopback interface (i.e. 127.0.0.1).  This will prevent your hosts from forming a cluster.

              • 19. Re: HowTo enable session-replication in EAP7 ..?
                Vamshi Krishna Newbie

                JVM1

                2018-04-30 14:47:32,080 INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-4) ISPN000078: Starting JGroups channel hibernate

                2018-04-30 14:47:32,083 INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-2) ISPN000078: Starting JGroups channel server

                2018-04-30 14:47:32,085 INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-3) ISPN000078: Starting JGroups channel ejb

                2018-04-30 14:47:32,087 INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-1) ISPN000078: Starting JGroups channel web

                2018-04-30 14:47:32,121 INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-3) ISPN000094: Received new cluster view for channel ejb: [app06:app05.Member2|1] (2) [app06:app05.Member2, app05:app05.Member1]

                2018-04-30 14:47:32,128 INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-3) ISPN000079: Channel ejb local address is app05:app05.Member1, physical addresses are [IP-address1:7700]

                2018-04-30 14:47:32,131 INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-1) ISPN000094: Received new cluster view for channel web: [app06:app05.Member2|1] (2) [app06:app05.Member2, app05:app05.Member1]

                2018-04-30 14:47:32,131 INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-1) ISPN000079: Channel web local address is app05:app05.Member1, physical addresses are [IP-address1:7700]

                2018-04-30 14:47:32,132 INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-4) ISPN000094: Received new cluster view for channel hibernate: [app06:app05.Member2|1] (2) [app06:app05.Member2, app05:app05.Member1]

                2018-04-30 14:47:32,132 INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-4) ISPN000079: Channel hibernate local address is app05:app05.Member1, physical addresses are [IP-address1:7700]

                2018-04-30 14:47:32,138 INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-2) ISPN000094: Received new cluster view for channel server: [app06:app05.Member2|1] (2) [app06:app05.Member2, app05:app05.Member1]

                 

                 

                 

                JMV2

                 

                2018-04-30 14:47:32,613 INFO  [org.infinispan.CLUSTER] (remote-thread--p6-t1) ISPN000310: Starting cluster-wide rebalance for cache cluster-demo.war, topology CacheTopology{id=1, rebalanceId=1, currentCH=DefaultConsistentHash{ns=80, owners = (1)[app06:app05.Member2: 80+0]}, pendingCH=DefaultConsistentHash{ns=80, owners = (2)[app06:app05.Member2: 40+40, app05:app05.Member1: 40+40]}, unionCH=null, actualMembers=[app06:app05.Member2, app05:app05.Member1]}

                2018-04-30 14:47:32,634 INFO  [org.infinispan.CLUSTER] (remote-thread--p6-t1) ISPN000310: Starting cluster-wide rebalance for cache routing, topology CacheTopology{id=1, rebalanceId=1, currentCH=DefaultConsistentHash{ns=80, owners = (1)[app06:app05.Member2: 80+0]}, pendingCH=DefaultConsistentHash{ns=80, owners = (2)[app06:app05.Member2: 40+40, app05:app05.Member1: 40+40]}, unionCH=null, actualMembers=[app06:app05.Member2, app05:app05.Member1]}

                2018-04-30 14:47:32,648 INFO  [org.infinispan.CLUSTER] (remote-thread--p6-t2) ISPN000310: Starting cluster-wide rebalance for cache counter.war, topology CacheTopology{id=1, rebalanceId=1, currentCH=DefaultConsistentHash{ns=80, owners = (1)[app06:app05.Member2: 80+0]}, pendingCH=DefaultConsistentHash{ns=80, owners = (2)[app06:app05.Member2: 40+40, app05:app05.Member1: 40+40]}, unionCH=null, actualMembers=[app06:app05.Member2, app05:app05.Member1]}

                2018-04-30 14:47:32,947 INFO  [org.infinispan.CLUSTER] (remote-thread--p6-t1) ISPN000336: Finished cluster-wide rebalance for cache cluster-demo.war, topology id = 1

                2018-04-30 14:47:33,010 INFO  [org.infinispan.CLUSTER] (remote-thread--p6-t1) ISPN000336: Finished cluster-wide rebalance for cache counter.war, topology id = 1

                2018-04-30 14:47:33,030 INFO  [org.infinispan.CLUSTER] (remote-thread--p6-t2) ISPN000336: Finished cluster-wide rebalance for cache routing, topology id = 1

                2018-04-30 14:47:33,169 INFO  [org.apache.activemq.artemis.core.server] (Thread-11 (ActiveMQ-server-org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl$2@725143d2-236937250)) AMQ221027: Bridge ClusterConnectionBridge@50dffa19 [name=sf.my-cluster.4ecfca81-48d3-11e8-9af0-2f1c4ddb01e8, queue=QueueImpl[name=sf.my-cluster.4ecfca81-48d3-11e8-9af0-2f1c4ddb01e8, postOffice=PostOfficeImpl [server=ActiveMQServerImpl::serverUUID=82904834-495d-11e8-a426-b9b82ccfca1b]]@4989e265 targetConnector=ServerLocatorImpl (identity=(Cluster-connection-bridge::ClusterConnectionBridge@50dffa19 [name=sf.my-cluster.4ecfca81-48d3-11e8-9af0-2f1c4ddb01e8, queue=QueueImpl[name=sf.my-cluster.4ecfca81-48d3-11e8-9af0-2f1c4ddb01e8, postOffice=PostOfficeImpl [server=ActiveMQServerImpl::serverUUID=82904834-495d-11e8-a426-b9b82ccfca1b]]@4989e265 targetConnector=ServerLocatorImpl [initialConnectors=[TransportConfiguration(name=http-connector, factory=org-apache-activemq-artemis-core-remoting-impl-netty-NettyConnectorFactory) ?httpUpgradeEnabled=true&httpPpgradeEndpoint=http-acceptor&port=8180&host=0-0-0-0], discoveryGroupConfiguration=null]]::ClusterConnectionImpl@190153248[nodeUUID=82904834-495d-11e8-a426-b9b82ccfca1b, connector=TransportConfiguration(name=http-connector, factory=org-apache-activemq-artemis-core-remoting-impl-netty-NettyConnectorFactory) ?httpUpgradeEnabled=true&httpPpgradeEndpoint=http-acceptor&port=8180&host=app06-wernerds-net, address=jms, server=ActiveMQServerImpl::serverUUID=82904834-495d-11e8-a426-b9b82ccfca1b])) [initialConnectors=[TransportConfiguration(name=http-connector, factory=org-apache-activemq-artemis-core-remoting-impl-netty-NettyConnectorFactory) ?httpUpgradeEnabled=true&httpPpgradeEndpoint=http-acceptor&port=8180&host=0-0-0-0], discoveryGroupConfiguration=null]] is connected

                • 20. Re: HowTo enable session-replication in EAP7 ..?
                  Vamshi Krishna Newbie

                  pferraro I don't see session replication working in my application with below configuration, I have 2 nodes in a cluster, when I log into the app with both nodes up and running and once I take down or pause the traffic to one of the node my session is lost, kicked out of the app and re-directed to login screen.

                   

                  F5 "Sticky Sessions” have been enabled through the Persistence Profiles in the VIP configurations. For VIP’s the primary Persistence Profile is encrypted cookies and the fallback Persistence Profile is the client’s source address and the web-app tags are included </distributable> in all web.xml files.

                   

                  EJB3 subsystem:

                   

                              <subsystem xmlns="urn:jboss:domain:ejb3:5.0">

                                  <session-bean>

                                      <stateless>

                                          <bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>

                                      </stateless>

                                      <stateful default-access-timeout="5000" cache-ref="distributable" passivation-disabled-cache-ref="simple"/>

                                      <singleton default-access-timeout="5000"/>

                                  </session-bean>

                                  <mdb>

                                      <resource-adapter-ref resource-adapter-name="${ejb.resource-adapter-name:activemq-ra.rar}"/>

                                      <bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>

                                  </mdb>

                                  <pools>

                                      <bean-instance-pools>

                                          <strict-max-pool name="slsb-strict-max-pool" max-pool-size="30" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>

                                          <strict-max-pool name="mdb-strict-max-pool" max-pool-size="30" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>

                                      </bean-instance-pools>

                                  </pools>

                                  <caches>

                                      <cache name="simple"/>

                                      <cache name="distributable" passivation-store-ref="infinispan" aliases="passivating clustered"/>

                                  </caches>

                                  <passivation-stores>

                                      <passivation-store name="infinispan" cache-container="ejb" max-size="10000"/>

                                  </passivation-stores>

                                  <async thread-pool-name="default"/>

                                  <timer-service thread-pool-name="default" default-data-store="default-file-store">

                                      <data-stores>

                                          <file-data-store name="default-file-store" path="timer-service-data" relative-to="jboss.server.data.dir"/>

                                      </data-stores>

                                  </timer-service>

                                  <remote connector-ref="http-remoting-connector" thread-pool-name="default">

                                      <channel-creation-options>

                                          <option name="READ_TIMEOUT" value="${prop.remoting-connector.read.timeout:20}" type="xnio"/>

                                          <option name="MAX_OUTBOUND_MESSAGES" value="1234" type="remoting"/>

                                      </channel-creation-options>

                                  </remote>

                                  <thread-pools>

                                      <thread-pool name="default">

                                          <max-threads count="10"/>

                                          <keepalive-time time="100" unit="milliseconds"/>

                                      </thread-pool>

                                  </thread-pools>

                                  <iiop enable-by-default="false" use-qualified-name="false"/>

                                  <default-security-domain value="other"/>

                                  <default-missing-method-permissions-deny-access value="true"/>

                                  <log-system-exceptions value="true"/>

                              </subsystem>

                   

                  Infinispan subsystem:

                   

                              <subsystem xmlns="urn:jboss:domain:infinispan:4.0">

                                  <cache-container name="server" aliases="singleton cluster" default-cache="default" module="org.wildfly.clustering.server">

                                      <transport lock-timeout="60000"/>

                                      <replicated-cache name="default">

                                          <transaction mode="BATCH"/>

                                      </replicated-cache>

                                  </cache-container>

                                  <cache-container name="web" default-cache="dist" module="org.wildfly.clustering.web.infinispan" statistics-enabled="true">

                                      <transport lock-timeout="60000"/>

                                      <distributed-cache name="dist" mode="ASYNC">

                                          <locking isolation="REPEATABLE_READ"/>

                                          <transaction mode="BATCH"/>

                                          <file-store/>

                                      </distributed-cache>

                                  </cache-container>

                                  <cache-container name="ejb" aliases="sfsb" default-cache="dist" module="org.wildfly.clustering.ejb.infinispan">

                                      <transport lock-timeout="60000"/>

                                      <distributed-cache name="dist">

                                          <locking isolation="REPEATABLE_READ"/>

                                          <transaction mode="BATCH"/>

                                          <file-store/>

                                      </distributed-cache>

                                  </cache-container>

                                  <cache-container name="hibernate" default-cache="local-query" module="org.hibernate.infinispan">

                                      <transport lock-timeout="60000"/>

                                      <local-cache name="local-query">

                                          <eviction strategy="LRU" max-entries="10000"/>

                                          <expiration max-idle="100000"/>

                                      </local-cache>

                                      <invalidation-cache name="entity">

                                          <transaction mode="NON_XA"/>

                                          <eviction strategy="LRU" max-entries="10000"/>

                                          <expiration max-idle="100000"/>

                                      </invalidation-cache>

                                      <replicated-cache name="timestamps" mode="ASYNC"/>

                                  </cache-container>

                              </subsystem>

                  • 22. Re: HowTo enable session-replication in EAP7 ..?
                    Paul Ferraro Master

                    Which version of WildFly are you using?  Does your application make use of ServletRequest.startAsync(...)?

                    • 23. Re: HowTo enable session-replication in EAP7 ..?
                      Vamshi Krishna Newbie

                      Hi Paul, I'm using EAP 7.1 and I don't see any ServletRequest.startAsync in our code base.

                      • 24. Re: HowTo enable session-replication in EAP7 ..?
                        Paul Ferraro Master

                        Change the cache mode of the caches in your "web" cache-container to SYNC and paste any exceptions you encounter.

                        e.g.

                        <distributed-cache name="..." mode="SYNC">...</distributed-cache>

                        • 25. Re: HowTo enable session-replication in EAP7 ..?
                          Paul Ferraro Master

                          Just to say, the issue may not necessarily be with replication of the session, but rather with security configuration.  Can you describe your authentication mechanism?

                          1 2 Previous Next