WSO2 Integrator 6.1.1 HTTP Session Replication : Non-serializable attribute CarbonAuthenticator

122 views Asked by At

I have 2 WSO2 Enterprise Integrator behind a load balancer.

I want to activate the tomcat http session replication, and followed the WSO2 documentation. It seems quite simple : Add

<Cluster className="org.wso2.carbon.core.session.CarbonTomcatSimpleTcpCluster"/>
and
<Valve className="org.wso2.carbon.webapp.mgt.session.CarbonTomcatSessionReplicationValve"/>
in catalina-server.xml, and make application distributable by adding <distributable/>

in web.xml.

Badly, it seems that WSO2 add some non serializable attributes to the session, making the replication fail. When I try to connect to the carbon application, I get the following exception :

ERROR - ApplicationDispatcher Servlet.service() for servlet bridgeservlet threw exception java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute CarbonAuthenticator
    at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1453)
    at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1413)
    at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:149)
    at org.eclipse.equinox.http.servlet.internal.HttpSessionAdaptor.setAttribute(HttpSessionAdaptor.java:96)
    at org.wso2.carbon.ui.tracker.AuthenticatorRegistry.getCarbonAuthenticator(AuthenticatorRegistry.java:82)
    at org.wso2.carbon.ui.CarbonUILoginUtil.getAuthenticator(CarbonUILoginUtil.java:69)
    at org.wso2.carbon.ui.CarbonSecuredHttpContext.handleSecurity(CarbonSecuredHttpContext.java:76)
    at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:60)
    at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
    at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68)

Precision : I tried with a fresh WSO2EI 6.1.1 installation, doing only the previously described modifications.

I also had to manually add tomcat-juli-7.0.75.jar and tomcat-trives-7.0.75.jar on wso2/lib/endorsed to avoid ClassNotFoundException.

I checked the WSO2 source code, and saw that the CarbonAuthenticator class is effectively non serializable.

Does anyone already configured the http session replication successfully ?

Thanks in advance,

Regards,

Laurent

0

There are 0 answers