SSO replication in domain mode
suarem22 Sep 15, 2014 4:18 PMHello, I am trying to set up SSO replication in domain mode for a customized Portal. I made the following changes:
- To my server group which belongs to the ha-profile, I added:
<system-properties> <property name="exo.profiles" value="cluster"/>
<property name="gatein.jcr.config.type" value="cluster"/>
<property name="gatein.jcr.index.changefilterclass" value="org.exoplatform.services.jcr.impl.core.query.jbosscache.LocalIndexChangesFilter"/>
<property name="gatein.jcr.storage.enabled" value="false"/>
</system-properties>
- To the ha profile in domain.xml
<subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false">
<connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
<virtual-server name="default-host" enable-welcome-root="true">
<alias name="localhost"/>
<alias name="example.com"/>
<sso cache-container="web" cache-name="sso"/>
</virtual-server>
</subsystem>
I am having problems replicating the principal, I get a NPE when I try to obtain information from the user. This is a snippet of the logs.
########### log in @ server1 ########### 11:27:41,430 TRACE [org.jboss.as.web.sso] (ajp-/x.x.x.1:8009-4) Registering sso id 'qY0hc42eF1DFFXqtDHzJLse9' for user 'user@domain.com' with auth type 'FORM'
11:27:41,432 TRACE [org.jboss.as.clustering.web.sso.infinispan.SSOClusterManager] (ajp-/x.x.x.1:8009-4) Registering SSO qY0hc42eF1DFFXqtDHzJLse9 in clustered cache
########### shutdown @ server1 ########### 11:28:14,794 INFO [org.apache.coyote.http11] (MSC service thread 1-4) JBWEB003075: Coyote HTTP/1.1 pausing on: http-/x.x.x.1:8080
########### sso update @ server2 ###########
11:27:41,447 TRACE [org.jboss.as.clustering.web.sso.infinispan.SSOClusterManager] (OOB-18,shared=udp) received a credentials modified message for SSO qY0hc42eF1DFFXqtDHzJLse9
11:27:41,462 TRACE [org.jboss.as.clustering.web.sso.infinispan.SSOClusterManager] (OOB-18,shared=udp) received a session modified message for SSO qY0hc42eF1DFFXqtDHzJLse9
11:28:15,577 TRACE [org.jboss.as.clustering.web.sso.infinispan.SSOClusterManager] (OOB-20,shared=udp) received a session modified message for SSO qY0hc42eF1DFFXqtDHzJLse9
########### log in @ server2 ########### 11:28:15,578 TRACE [org.jboss.as.web.sso] (OOB-20,shared=udp) Notified that SSO qY0hc42eF1DFFXqtDHzJLse9 is empty
11:28:35,530 TRACE [org.jboss.as.web.sso] (ajp-/x.x.x.2:8009-4) Checking for cached principal for qY0hc42eF1DFFXqtDHzJLse9
11:28:35,532 TRACE [org.jboss.as.web.sso] (ajp-/x.x.x.2:8009-4) Found cached principal 'NULL' with auth type 'FORM'
Q1: Do I need to enable a default-cache-container in <subsystem xmlns="urn:jboss:domain:infinispan:1.4">?
Q2: Do I need to change the default-cache in <cache-container name="web" aliases="standard-session-cache" default-cache="repl" module="org.jboss.as.clustering.web.infinispan"> to default-cache="sso"?
The error when refreshing the page after fail over occurs:
11:28:44,054 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[customapp].[jsp]] (ajp-/x.x.x.2:8009-4) JBWEB000236: Servlet.service() for servlet jsp threw exception: java.lang.NullPointerException at org.apache.jsp.WEB_002dINF.jsp.banners.customappbanner_jsp._jspService(customappbanner_jsp.java:148)