1 Reply Latest reply on Oct 1, 2007 10:23 AM by mermaid

    clustering not working

    mermaid

      Hello,
      I have followed the steps given in the docs for clustering web applications .But failover doesnt work with 2 servers.
      The 2 servers are running on different machines.I have installed apache with mod_jk on both the machines.
      when I shut down my server with the other server running and try to access the web application by using localhost:port/samplewebapp , it gives page cannot be displayed error.
      I have changed theRMi port on the other server to 11099 whereas the RMI port in my machine is 1099.Is that a Pblm?
      I am sending the properties and config files.Please let me know if there are any errors in the configurations

      mod-jk.conf
      --------------------------------------------------------------------------------------
      # Load mod_jk module
      # Specify the filename of the mod_jk lib
      LoadModule jk_module modules/mod_jk.so

      # Where to find workers.properties
      JkWorkersFile conf/workers.properties

      # Where to put jk logs
      JkLogFile logs/mod_jk.log

      # Set the jk log level [debug/error/info]
      JkLogLevel info

      # Select the log format
      JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"

      # JkOptions indicates to send SSK KEY SIZE
      JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories

      # JkRequestLogFormat
      JkRequestLogFormat "%w %V %T"

      # Mount your applications
      JkMount /application/* loadbalancer

      # You can use external file for mount points.
      # It will be checked for updates each 60 seconds.
      # The format of the file is: /url=worker
      # /examples/*=loadbalancer
      JkMountFile conf/uriworkermap.properties

      # Add shared memory.
      # This directive is present with 1.2.10 and
      # later versions of mod_jk, and is needed for
      # for load balancing to work properly
      JkShmFile logs/jk.shm

      # Add jkstatus for managing runtime data
      <Location /jkstatus/>
      JkMount status
      Order deny,allow
      Deny from all
      Allow from 127.0.0.1


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

      # Define Node1
      # modify the host as your host IP or DNS name.
      worker.node1.port=8009
      worker.node1.host=10.18.18.119
      worker.node1.type=ajp13
      worker.node1.lbfactor=1

      # Define Node2
      # modify the host as your host IP or DNS name.
      worker.node2.port=8009
      worker.node2.host=10.18.18.16
      worker.node2.type=ajp13
      worker.node2.lbfactor=1

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

      # Status worker for managing load balancer
      worker.status.type=status
      --------------------------------------------------------------------------------------
      uriworkermap.properties
      --------------------------------------------------------------------------------------

      # Simple worker configuration file

      # Mount the Servlet context to the ajp13 worker
      /jmx-console=loadbalancer
      /jmx-console/*=loadbalancer
      /web-console=loadbalancer
      /web-console/*=loadbalancer
      --------------------------------------------------------------------------------------
      I have added the following lines in the httpd.conf file
      --------------------------------------------------------------------------------------
      # Include mod_jk's specific configuration file
      Include conf/mod-jk.conf
      ---------------------------------------------------------------------------------
      have added mod_jk.so file into the modules folder of apache
      Have installed apache_2.2.4-win32-x86-no_ssl.msi
      ---------------------------------------------------------------------------------
      Have done the following changes to the server.xml

      ... ...

      and in jboss-service.xml
      true
      -------------------------------------------------------------------------------------
      In web.xml ,I have added
      <web-app >

      ....
      and in jboss-web.xml

      -----------------------------------------------------------------------------------
      <replication-config>
      <replication-granularity>ATTRIBUTE</replication-granularity>
      <replication-trigger>SET_AND_NON_PRIMITIVE_GET</replication-trigger>
      </replication-config>
      <!-- EJB Local References -->
      </jboss-web>
      -----------------------------------------------------------------------------------
      I have deployed my application in the all/deploy folder without changing the server name.

      There are no errors in the mod_jk.log file.
      I am not able to figure out what is the pblm?
      please help?
      Thank you