1 Reply Latest reply on Aug 6, 2018 10:19 AM by galder.zamarreno

    WildFly 11 - JGroups initialization delay

    balu0503

      We have a web based application running on WildFly 11 (Migrated from WildFly 9 recently) and we are facing this weird issue when all the nodes in the cluster are started up.

       

      Here is how our application is designed to login and show the home page:

      1. Entering the URL of our application brings us the login page.
      2. Provide valid credentials and click on login.
      3. Backend servlet validates these creds and on successful login, browser sends a redirect request (HTTP302) with home page URL.

       

      So here is the problem -

      • For the very first user trying to login to the application (i.e steps 1 - 3 above) is redirected back to login page i.e. even though the user entered the valid credentials
      • In the back end - our home page servlet cannot find the session just created during login process and thus the user is redirected back to the login page.
      • Any login attempt after this is working fine.

       

      We tried the same steps (i.e steps 1 - 3 above) through VPN (which is a slower network) and we did not see this issue occurring there and we also did couple of other tests to conclude that giving it some more time during the redirect on the very first login works fine. so we concluded that it could be JGroups initialization issue as this is happening only for the very first login attempt.

       

      <channels default="ee">

                      <channel name="ee" stack="tcp" cluster="repl"/>

                  </channels>

      <stack name="tcp">

                          <transport type="TCP" socket-binding="jgroups-tcp"/>

                          <protocol type="TCPPING">

                              <property name="initial_hosts">

                                  10.0.99.11[7600],10.0.99.12[7600]

                              </property>

                              <property name="num_initial_members">

                                  2

                              </property>

                          </protocol>

                          <protocol type="MERGE3"/>

                          <protocol type="FD_SOCK"/>

                          <protocol type="FD_ALL"/>

                          <protocol type="VERIFY_SUSPECT"/>

                          <protocol type="pbcast.NAKACK2"/>

                          <protocol type="UNICAST3"/>

                          <protocol type="pbcast.STABLE"/>

                          <protocol type="pbcast.GMS"/>

                          <protocol type="MFC"/>

                          <protocol type="FRAG2"/>

      </stack>

      <interfaces>

              <interface name="management">

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

              </interface>

              <interface name="public">

                  <inet-address value="10.0.99.12"/>

              </interface>

              <interface name="private">

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

              </interface>

          </interfaces>

          <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">

              <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>

              <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9993}"/>

              <socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>

              <socket-binding name="http" port="${jboss.http.port:8080}"/>

              <socket-binding name="https" port="${jboss.https.port:8443}"/>

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

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

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

              <socket-binding name="modcluster" port="0" multicast-address="${jboss.modcluster.multicast.address:224.0.1.105}" multicast-port="23364"/>

              <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>

              <outbound-socket-binding name="10_0_99_11">

                  <remote-destination host="10.0.99.11" port="6666"/>

              </outbound-socket-binding>

              <outbound-socket-binding name="10_0_99_12">

                  <remote-destination host="10.0.99.12" port="6666"/>

              </outbound-socket-binding>

          </socket-binding-group>

       

       

      I have attached the settings file to the post.

       

      Please suggest me idea's on how we can fix this or enlighten me if I'm doing something wrong here.