0 Replies Latest reply on Jun 28, 2016 2:38 PM by A R

    mod_jk cluster in jboss eap 6.1 is not working for struts 1 application

    A R Newbie

      I have one struts application which is deployed on jboss eap 6.1 in tow different machine and I used mod_jk clustering for load balancing.

      I pointed the config file to standalone-full-ha.xml and enabled ajp and http connector as below:

       

      <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http" enabled="true" />
      <connector name="ajp" protocol="AJP/1.3" scheme="http" socket-binding="ajp" enabled="true"/>

      and in httpd.conf file

      Include conf/mod-jk.conf

      In mod-jk.conf file

      # AJP13 proxy
      <IfModule mod_proxy.c>
      <IfModule mod_proxy_ajp.c>
      Include "conf/extra/httpd-ajp.conf"
      </IfModule>
      </IfModule>

      LoadModule jk_module modules/mod_jk.so
      JkWorkersFile conf/workers.properties
      #JkShmFile logs/mod_jk.shm
      JkLogFile logs/mod_jk.log
      JkRequestLogFormat "%w %V %T"
      #JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
      JkLogLevel info
      JkLogStampFormat "[%a %b %d %H:%M:%s %Y]"
      JkMount /* loadbalancer
      JkMount /myapp/* loadbalancer

      <Location /jkstatus/>
      JkMount status
      Order deny,allow
      Deny from all
      Allow from 127.0.0.1
      </Location>

       

      in workers.properties


      # Define list of workers that will be used
      # for mapping requests
      worker.list=loadbalancer,node1,node2,status

      # Define Node1
      # modify the host as your host IP or DNS name.
      worker.node1.port=8009
      worker.node1.host=localhost
      worker.node1.type=ajp13
      #worker.node1.ping_mode=A
      worker.node1.lbfactor=100


      # Define Node2
      # modify the host as your host IP or DNS name.
      worker.node2.port=8010
      worker.node2.host=localhost
      worker.node2.type=ajp13
      #worker.node2.ping_mode=A
      worker.node2.lbfactor=100


      # Load-balancing behavior
      worker.loadbalancer.type=lb
      worker.loadbalancer.balance_workers=node1,node2
      worker.loadbalancer.sticky_session=1

      # Status worker for managing load balancer
      worker.status.type=status

       

      started both the jboss server and apache server as well

      I am able to browse the lending login page page( the first struts /logon.do is pointing to server1 )

      but while giving username and password the action is not getting executed for which I am not able to login.

      if I bring down one jboss server then it is working fine.

       

      Note: I noticed that for while hitting the login button it is going to LogonAction.java file but from there I have return mapping.findForward("success"); which should move to another action class /toDoListAction but it is not going to that class. And more ever the first logon action is hitting the first node1 and the todoList action is hitting second node node2(as per the server.log)

      Could you please help me?