3 Replies Latest reply on Feb 23, 2015 8:01 AM by Jakub Tyityis

    Jboss Domain session replication

    Jakub Tyityis Newbie

      Hello,

      i setup easy domain with two nodes each running two app server. My problem is with session replication. When first server goes down, traffic is routed to node2. Issue occur when traffic is routed to node02 because session has different id. To setup domain i used the link AS7 Cluster Howto - JBoss AS 7.1 - Project Documentation Editor . To test functionality of the cluster i am using https://github.com/jaysensharma/MiddlewareMagicDemos/blob/master/ClusterTest_WebApp/ClusterWebApp.war?raw=true I am sorry for stupid question but i am starting to learn JBoss and can't move forward this error.

      Note: Node1[control server] see node2 and can administrate him. Also in log of node2 is note about connection of node2 to the cluster.

      Thx

        • 1. Re: Jboss Domain session replication
          Wolf-Dieter Fink Master

          As the documentation shows you need to access the server via the loadbalancer (Apache) in front of EAP. Otherwise the session ID is different.

          If you configure it correct and use the LB to access it the session will failover but the sessionId remain the same.

           

          Also note that the domain is a different (management) concept and your four nodes might belong to the same cluster for your session or not, depend on the configuration.

          • 2. Re: Jboss Domain session replication
            Jakub Tyityis Newbie

            Hi,

            thx for your post.

            I am trying now to configure the Apache as Load Balancer. When i am trying to connect to Jboss on 8009 via AJP connection is not possible. When Jboss start AJP port is not open.

             

            In domain.xml i have

             

            <subsystem xmlns="urn:jboss:domain:web:1.5" default-virtual-server="default-host" native="false">

                            <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>

                            <connector name="ajp" protocol="AJP/1.3" scheme="http" socket-binding="ajp"/>

                            <virtual-server name="default-host" enable-welcome-root="true">

                                <alias name="labserver.local"/>

                            </virtual-server>

                        </subsystem>

             

            <socket-binding-groups>

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

                        <socket-binding name="ajp" port="8009"/>

                        <socket-binding name="http" port="8080"/>

                        <socket-binding name="https" port="8443"/>

                        <socket-binding name="remoting" port="4447"/>

                        <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-group name="full-sockets" default-interface="public">

                        <socket-binding name="ajp" port="8009"/>

                        <socket-binding name="http" port="8080"/>

                        <socket-binding name="https" port="8443"/>

                        <socket-binding name="jacorb" interface="unsecure" port="3528"/>

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

                        <socket-binding name="messaging" port="5445"/>

                        <socket-binding name="messaging-group" port="0" multicast-address="${jboss.messaging.group.address:231.7.7.7}" multicast-port="${jboss.messaging.group.port:9876}"/>

                        <socket-binding name="messaging-throughput" port="5455"/>

                        <socket-binding name="remoting" port="4447"/>

                        <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-group name="full-ha-sockets" default-interface="public">

                        <socket-binding name="ajp" port="8009"/>

                        <socket-binding name="http" port="8080"/>

                        <socket-binding name="https" port="8443"/>

                        <socket-binding name="jacorb" interface="unsecure" port="3528"/>

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

                        <socket-binding name="jgroups-mping" port="0" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45700"/>

                        <socket-binding name="jgroups-tcp" port="7600"/>

                        <socket-binding name="jgroups-tcp-fd" port="57600"/>

                        <socket-binding name="jgroups-udp" port="55200" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45688"/>

                        <socket-binding name="jgroups-udp-fd" port="54200"/>

                        <socket-binding name="messaging" port="5445"/>

                        <socket-binding name="messaging-group" port="0" multicast-address="${jboss.messaging.group.address:231.7.7.7}" multicast-port="${jboss.messaging.group.port:9876}"/>

                        <socket-binding name="messaging-throughput" port="5455"/>

                        <socket-binding name="modcluster" port="0" multicast-address="224.0.1.105" multicast-port="23364"/>

                        <socket-binding name="remoting" port="4447"/>

                        <socket-binding name="txn-recovery-environment" port="4712"/>

             

             

             

             

            IN hosts.xml

             

             

              <interfaces>

                    <interface name="management">

                        <inet-address value="${jboss.bind.address.management:10.0.0.234}"/>

                    </interface>

                    <interface name="public">

                        <inet-address value="${jboss.bind.address:10.0.0.234}"/>

                    </interface>

                    <interface name="unsecure">

                        <inet-address value="${jboss.bind.address.unsecure:10.0.0.234}"/>

                    </interface>

                </interfaces>

             

             

             

             

            When i was trying to make a connection via http://server1:8080 and http://server2:8080 it works, but session id was each time when page was reload changed.

            • 3. Re: Jboss Domain session replication
              Jakub Tyityis Newbie

              I just setup FULL-ha cluster. Create new server group, define JVMs ...

              On second node i have issue during start

               

              Host Controller] 07:08:32,324 INFO  [org.jboss.as.host.controller] (server-registration-threads - 1) JBAS010919: Registering server SrvApp2

              [Server:SrvApp2] 07:08:33,010 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 21) JBAS014613: Operation ("add") failed - address: ([

              [Server:SrvApp2]     ("subsystem" => "messaging"),

              [Server:SrvApp2]     ("hornetq-server" => "default"),

              [Server:SrvApp2]     ("broadcast-group" => "bg-group1")

              [Server:SrvApp2] ]) - failure description: "JBAS011679: The broadcast group 'bg-group1' defines reference to nonexistent connector 'netty'. Available connectors '[in-vm]'."

              [Server:SrvApp2] 07:08:33,026 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) "JBAS014784: Failed executing subsystem messaging boot operations"

              [Server:SrvApp2] 07:08:33,030 FATAL [org.jboss.as.server] (Controller Boot Thread) JBAS015957: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.

              [Server:SrvApp2] 07:08:33,050 ERROR [stderr] (main) java.lang.IllegalStateException

              [Server:SrvApp2] 07:08:33,050 ERROR [stderr] (main)     at org.jboss.as.server.mgmt.domain.HostControllerConnectionService.getValue(HostControllerConnectionService.java:143)

              [Server:SrvApp2] 07:08:33,050 ERROR [stderr] (main)     at org.jboss.as.server.mgmt.domain.HostControllerConnectionService.getValue(HostControllerConnectionService.java:63)

              [Server:SrvApp2] 07:08:33,050 ERROR [stderr] (main)     at org.jboss.msc.service.ServiceControllerImpl.getValue(ServiceControllerImpl.java:1203)

              [Server:SrvApp2] 07:08:33,050 ERROR [stderr] (main)     at org.jboss.as.server.DomainServerMain.getRequiredService(DomainServerMain.java:158)

              [Server:SrvApp2] 07:08:33,051 ERROR [stderr] (main)     at org.jboss.as.server.DomainServerMain.main(DomainServerMain.java:136)

              [Server:SrvApp2] 07:08:33,051 ERROR [stderr] (main)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              [Server:SrvApp2] 07:08:33,051 ERROR [stderr] (main)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

              [Server:SrvApp2] 07:08:33,052 ERROR [stderr] (main)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

              [Server:SrvApp2] 07:08:33,052 ERROR [stderr] (main)     at java.lang.reflect.Method.invoke(Method.java:483)

              [Server:SrvApp2] 07:08:33,052 ERROR [stderr] (main)     at org.jboss.modules.Module.run(Module.java:292)

              [Server:SrvApp2] 07:08:33,052 ERROR [stderr] (main)     at org.jboss.modules.Main.main(Main.java:455)

              [Server:SrvApp2] 07:08:33,058 INFO  [org.jboss.as] (MSC service thread 1-1) JBAS015950: JBoss EAP 6.2.0.GA (AS 7.3.0.Final-redhat-14) stopped in 16ms

              07:08:33,062 INFO  [org.jboss.as.process.Server:SrvApp2.status] (reaper for Server:SrvApp2) JBAS012010: Proces

               

              hornet-server security is disabled and i am not able to find out why jboss is not able to connect to master server