This are my configuration steps for both node: Step #1: Download Apache2 Web Server version 2.0.58 and installed as default
Step #2: Download mod_jk-apache-2.0.55.so Step #3: Setup Apache Add this line at the very bottom in APACHE_HOME/conf/httpd.conf : | Include conf/mod-jk.conf | create a new mod-jk.conf like this: | # 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. /* means All application | JkMount /* 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 jkstatus | Order deny,allow | Deny from all | Allow from 127.0.0.1 | </Location> | Configure workers.properties using Sticky Session (i'm creating a cluster on the same machine) | # Define list of workers that will be used | # for mapping requests | worker.list=loadbalancer,status | # Define Cluster1 | worker.node1.port=8009 | worker.node1.host=127.0.0.1 | worker.node1.type=ajp13 | worker.node1.lbfactor=1 | #worker.node1.local_worker=1 (1) | worker.node1.cachesize=10 | | # Define Cluster2 | worker.node2.port=8309 | worker.node2.host=127.0.0.1 | worker.node2.type=ajp13 | worker.node2.lbfactor=1 | #worker.node2.local_worker=1 (1) | worker.node2.cachesize=10 | | # Load-balancing behaviour | worker.loadbalancer.type=lb | worker.loadbalancer.balanced_workers=node1, node2 | worker.loadbalancer.sticky_session=1 | worker.loadbalancer.local_worker_only=1 | worker.list=loadbalancer | | # Status worker for managing load balancer | worker.status.type=status | Step #4: Setup Tomcato inside JBoss in JBOSS_HOME\server\<my node>\deploy\jbossweb-tomcat55.sar\server.xml added jvmRoute to match workers (node1 and node2) | <Engine name="jboss.web" defaultHost="localhost" jvmRoute="node1"> | .... | </Engine> | and uncomment ClusteredSingleSignOn valve | ... | <!-- Uncomment to enable single sign-on across web apps | deployed to this host AND to all other hosts in the cluster. | | If this valve is used, do not use the standard Tomcat SingleSignOn | valve shown above. | | Valve uses a JBossCache instance to support SSO credential | caching and replication across the cluster. The JBossCache | instance must be configured separately. By default, the valve | shares a JBossCache with the service that supports HttpSession | replication. See the "tc5-cluster-service.xml" file in the | server/all/deploy directory for cache configuration details. | | Besides the attributes supported by the standard Tomcat | SingleSignOn valve (see the Tomcat docs), this version also | supports the following attributes: | | cookieDomain see above | | treeCacheName JMX ObjectName of the JBossCache MBean used to | support credential caching and replication across | the cluster. If not set, the default value is | "jboss.cache:service=TomcatClusteringCache", the | standard ObjectName of the JBossCache MBean used | to support session replication. | --> | <!-- --> | <Valve className="org.jboss.web.tomcat.tc5.sso.ClusteredSingleSignOn" debug="2" /> | .... | | Step #5: Setup Tomcato inside JBoss in JBOSS_HOME\server\<my node>\deploy\jbossweb-tomcat55.sar\META-INF\jboss-service.xml Finally, I need to tell Tomcat to add the jvmRoute value to its session cookies so that mod_jk can route incoming requests. So I change UseJK from false to true | ... | <attribute name="UseJK">true</attribute> | ... | Step #6: Set loopback to true for UDP problem on windows machine Step #7: in my web.xml | ... | <distributable></distributable> | ... | and on my jboss-web.xml | ... | <replication-config> | <replication-trigger>SET_AND_NON_PRIMITIVE_GET</replication-trigger> | <replication-granularity>SESSION</replication-granularity> | </replication-config> | ... | View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958524#3958524 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958524 _______________________________________________ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
