4 Replies Latest reply on Mar 16, 2013 3:48 AM by Mohammed Harb

    JBoss EAP 6.0 cluster with two server authinticating the user on both servers

    Mohammed Harb Newbie

      Hey there ,,

       

      i have configured a jboss cluster on two VM's and used a hardware network load balancers (did not use mod_cluster), the requestes are routed correctly and sessions are replicated with no issues ,, i have an application that uses a security domain ,, the  deployment of my war file is successful.. my problem is when i request a page the network load balancer sends my request to the first server insatance and asks for username and password and log me in,,, my next requests, will be routed to another server instance and again asks for the username and password which i already provided to the first server instance !!!  i dont know what else i have to do ,, and no body is talking about extra configurations for the security domain subsystem in a cluster.

       

      in my domain.xml i am using "ha" profile,"ha-sockets" socket mapping and Database login module. i did not make any extra changes to the default configurations except for the datasources. i dont know if i have to do extra configurations for the security domain subsystem ?!

       

       

      your help is highly appreciated . and thanks in advance.

        • 1. Re: JBoss EAP 6.0 cluster with two server authinticating the user on both servers
          Wolf-Dieter Fink Master

          I'm not sure how the replication works in that case.

          But it is recommended to use session stickyness.

          I suppose the session is not found if you reach the other server, it may that it is not replicated at this moment or a different id is used.

          • 2. Re: JBoss EAP 6.0 cluster with two server authinticating the user on both servers
            Mohammed Harb Newbie

            when i  login on the second server i can see my session data ,, this means that my session has been replicated (according to my understanding this should be right). i also tried the same application without enabling security domain the session gets replicated with no issues ,,

             

            the session affinity is not an option as my company seeking to achieve LB through round-robin routing policy..

             

            i only face this problem when enabling the security domain... any suggestions guys

            • 3. Re: JBoss EAP 6.0 cluster with two server authinticating the user on both servers
              Thomas Qvarnström Newbie

              Have you configured the web sub system to use use the sso replication?

               

              E.g.

              <subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" instance-id="${jboss.node.name}" native="false">

                    ...

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

                         ...

                         <sso cache-container="web" cache-name="sso" reauthenticate="false"/>

                    </virtual-server>

              </subsystem>

              • 4. Re: JBoss EAP 6.0 cluster with two server authinticating the user on both servers
                Mohammed Harb Newbie

                thanks thomas, but it did not work either

                 

                and also i have noticed alot of warnnings and errors like :

                 

                [Server:server-three] 10:45:52,375 WARN  [org.jgroups.protocols.MPING] (Receiver

                Thread) discarding discovery request for cluster 'ejb' from slave:server-three/e

                jb; our cluster name is 'web'. Please separate your clusters cleanly.

                 

                and :

                 

                [Server:server-three] Caused by: org.jboss.as.clustering.lock.TimeoutException:

                JBAS010213: Cannot acquire lock default-host/WebApp/HCZKqTBMOSD4fLR8Sybw

                0+l0 from cluster

                [Server:server-three]   at org.jboss.as.clustering.lock.SharedLocalYieldingClust

                erLockManager.lock(SharedLocalYieldingClusterLockManager.java:439)

                [Server:server-three]   at org.jboss.as.clustering.web.infinispan.DistributedCac

                heManager.acquireSessionOwnership(DistributedCacheManager.java:381)

                [Server:server-three]   at org.jboss.as.web.session.ClusteredSession.acquireSess

                ionOwnership(ClusteredSession.java:529) [jboss-as-web-7.1.3.Final-redhat-4.jar:7

                .1.3.Final-redhat-4]

                [Server:server-three]   at org.jboss.as.web.session.ClusteredSession.access(Clus

                teredSession.java:501) [jboss-as-web-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat

                -4]

                [Server:server-three]   ... 17 more

                 

                 

                any suggestion !!