1 Reply Latest reply on Oct 28, 2015 2:32 PM by Paul Ferraro

    JsessionidSSO returning null

    Leonardo Oporto Newbie

      Hello Everyone...

       

      In a project I am working with, we are using Wildfly 8.2 in cluster mode.

       

      The Issue we are having is with the communication between a web client and the servers (we are using two)

      - The web client comunicates (every certain period of time) with "server 1" and get a response with  some JSESSIONIDSSO.

      - If we start the "server 2" and stop "server 1", the client get a response with some JSESSIONIDSSO from  "server 2".

      - Then, if we start again "server 1" and then stop "server 2", the web client get a JSESSIONIDSSO with value null.

       

      I don't know if this is directly related with the undertow module used by wildfly8.2 or if it is something deeper.

       

      In my case is not possible (for now) to use a newer version of WildFly (as 9 or 10)...

       

      Any Idea ?

       

      Thanks...

      Leo.

       

      PS: here is the config I am using

      standalone-ha.xml

      <server name="default-server">

                      <ajp-listener name="ajp" socket-binding="ajp"/>

                      <http-listener name="default" socket-binding="http" max-header-size="1073741824" max-post-size="1073741824"/>

                      <host name="default-host" alias="localhost">

                          <location name="/" handler="welcome-content"/>

                          <filter-ref name="server-header"/>

                          <filter-ref name="x-powered-by-header"/>

                          <filter-ref name="request-dumper"/>

                          <single-sign-on domain="alh-vaw7-dt.alh.mentorg.com" path="/"/>

                      </host>

                  </server>

       

      <cache-container name="web" default-cache="web-dist" module="org.wildfly.clustering.web.infinispan" aliases="standard-session-cache">

                      <transport  lock-timeout="300000"/>

        <replicated-cache name="repl" batching="true" mode="SYNC" remote-timeout="300000">

                          <state-transfer timeout="300000"/>

                          <file-store/>

                      </replicated-cache>

                     

                      <distributed-cache start="EAGER" name="web-dist" batching="true" mode="SYNC" remote-timeout="300000" owners="2" l1-lifespan="0">

           <!--

           <locking striping="false" acquire-timeout="60000" concurrency-level="3000"/>

        <eviction strategy="LIRS" max-entries="1000"/> -->

                                  <state-transfer timeout="300000"/>

                              <!--<file-store shared="true" preload="true"/> -->

                          <file-store />

                      </distributed-cache>

                  </cache-container>

       

       

      jboss-web.xml

      <?xml version="1.0" encoding="UTF-8"?>

      <jboss-web>

        <security-domain>iS3Login</security-domain>

        <context-root>/xdm.portal</context-root>

       

          <replication-config>

              <replication-trigger>ACCESS</replication-trigger>

              <replication-granularity>SESSION</replication-granularity>            

          </replication-config>

       

       

      </jboss-web>

       

       

      web.xml

      <?xml version="1.0" encoding="UTF-8"?>

      <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"

        version="3.0">

        <distributable/>

        

        <session-config>

        <session-timeout>15</session-timeout>

        </session-config>

        

        <security-constraint>

        <display-name>iS3 Web</display-name>

        <web-resource-collection>

        <web-resource-name>Default access</web-resource-name>

        <url-pattern>/</url-pattern>

        <http-method>GET</http-method>

        <http-method>POST</http-method>

        <http-method>PUT</http-method>

        <http-method>DELETE</http-method>

        <http-method>HEAD</http-method>

        <http-method>OPTIONS</http-method>

        <http-method>TRACE</http-method>

        </web-resource-collection>

        <auth-constraint>

        <description>iS3 Web Auth</description>

        <role-name>User</role-name>

        </auth-constraint>

        </security-constraint>

        <security-constraint>

        <display-name>Not secured</display-name>

        <web-resource-collection>

        <web-resource-name>Free access</web-resource-name>

        <url-pattern>/idm_resources/*</url-pattern>

        <url-pattern>/resources/*</url-pattern>

        </web-resource-collection>

        </security-constraint>

        <login-config>

        <auth-method>FORM</auth-method>

        <realm-name>iS3Login</realm-name>

        <form-login-config>

        <form-login-page>/idm_resources/403.html</form-login-page>

        <form-error-page>/idm_resources/403.html</form-error-page>

        </form-login-config>

        </login-config>

        <security-role>

        <role-name>User</role-name>

        </security-role>

         

      </web-app>