Thanks,
Santosh.
"Don't talk about yourself; it will be done when you leave. "
-----Original Message-----
From: Dave Colasurdo [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 26, 2006 11:17 PM
To: [email protected]
Subject: Re: Clustering help..!
Comments below..
Santosh Koti wrote:
Hernan,
I got it working finally , both with the sticky session=0,1 , in
non-sticky session , some time it fails...!
Any idea..?
I'd recommend always running with sticky session enabled. This means
that all requests from a particular client (e.g. browser)will be routed
to the same cluster member if session data is used. This is the safest
and most efficient way to assure that session state is maintained across
http requests.
Requests will be rerouted to a different cluster member only when the
original cluster member fails or is unreachable.
(I have given my config details after my questions,ie, below..!)
*Some questions:*
*a) Note: Once I build my EAR file , I deploy it on both the machines,
so the Geronimo-web.xml is the same on both machines, I guess it has
to
be different w.r.t 'mcastBindAddress' - value for different
instances..! *
Yes, there are two spots in the deployment plan that needs to be updated
with the IP address for the specific server.
* *
* *
*b) One more question I need to ask is : gbean name="FarmWarDeployer"
,
needs to be specified in the deployment plan , or is it optional...?*
IIRC, FarmWarDeployer is commented out in the deployment plan as it was
never tested. It was suspected that there may be additional changes to
geronimo to fully support farming.
* *
* *
*c) By the way , what is farming , is it used for deploying **ur**
application on to the cluster members, if so , will it change the
deployment plan at run time..?*
Farming provides hot deployment of an application across a cluster.
Basically, an application (war) is deployed on one cluster member and is
automatically deployed to all of the other members in the cluster.
*(correct me if I am wrong..!)*
As asked, here are my details (that I added to the existing stuff):
-------------Part of Httpd.conf file ------
LoadModule jk_module modules\mod_jk.so
JkWorkersFile C:\Apache-HTTP\Apache2\conf\workers.properties
JkLogFile C:\Apache-HTTP\Apache2\logs\mod_jk.log
#JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkAutoAlias C:\Apache-HTTP\Apache2\config-store
#JkMount /console/* ajp13
#JkMount /setl/* ajp13
JkMount /setl* loadbalancer
-------------End of Httpd.conf file ------
--------------workers.properties----------------
worker.list=loadbalancer,status,node1,node2
worker.node1.port=8009
worker.node1.host=localhost
worker.node1.type=ajp13
worker.node1.lbfactor=100
worker.node2.port=8009
worker.node2.host=172.25.203.139
worker.node2.type=ajp13
worker.node2.lbfactor=100
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=node1,node2
#worker.loadbalancer.sticky_session=0
worker.loadbalancer.sticky_session=1
worker.status.type=status
/setl=loadbalancer
/setl/*=loadbalancer
--------------end of workers.properties----------------
-----------------geronimo-web.xml----------------
<?xml version="1.0" encoding="UTF-8"?>
<web-app
xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.0"
xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.0"
configId="MyConfigName"
parentId="SBank/Entities"
>
<container-config>
<tomcat
xmlns="http://geronimo.apache.org/xml/ns/web/tomcat/config-1.0">
<cluster>TomcatCluster</cluster>
<gbean name="TomcatCluster"
class="org.apache.geronimo.tomcat.cluster.CatalinaClusterGBean">
<attribute
name="className">org.apache.catalina.cluster.tcp.SimpleTcpCluster</attri
bute>
<attribute name="initParams">
managerClassName=org.apache.catalina.cluster.session.DeltaManager
expireSessionsOnShutdown=false
useDirtyFlag=false
notifyListenersOnReplication=true
</attribute>
<reference name="Membership">
<moduleType>J2EEModule</moduleType> <name>TomcatMembership</name>
</reference>
<reference name="Receiver">
<moduleType>J2EEModule</moduleType> <name>TomcatReceiver</name>
</reference>
<reference name="Sender">
<moduleType>J2EEModule</moduleType> <name>TomcatSender</name>
</reference>
<reference name="TomcatValveChain">
<moduleType>J2EEModule</moduleType> <name>ReplicationValve</name>
</reference>
<!--
<reference name="ClusterDeployer">
<moduleType>J2EEModule</moduleType> <name>FarmWarDeployer</name>
</reference>
-->
</gbean>
<gbean name="TomcatMembership"
class="org.apache.geronimo.tomcat.cluster.MembershipServiceGBean">
<attribute
name="className">org.apache.catalina.cluster.mcast.McastService</attribu
te>
<attribute name="initParams">
mcastAddr=228.0.0.4
mcastBindAddress= 172.21.34.97
mcastPort=45564
mcastFrequency=500
mcastDropTime=3000
</attribute>
</gbean>
<!-- Receiver -->
<gbean name="TomcatReceiver"
class="org.apache.geronimo.tomcat.cluster.ReceiverGBean">
<attribute
name="className">org.apache.catalina.cluster.tcp.ReplicationListener</at
tribute>
<attribute name="initParams">
tcpListenAddress= 172.21.34.97
tcpListenPort=4001
tcpSelectorTimeout=100
tcpThreadCount=6
</attribute>
</gbean>
<!-- Sender -->
<gbean name="TomcatSender"
class="org.apache.geronimo.tomcat.cluster.SenderGBean">
<attribute
name="className">org.apache.catalina.cluster.tcp.ReplicationTransmitter<
/attribute>
<attribute name="initParams">
replicationMode=pooled
ackTimeout=15000
</attribute>
</gbean>
<!-- Valves -->
<gbean name="ReplicationValve"
class="org.apache.geronimo.tomcat.ValveGBean">
<attribute
name="className">org.apache.catalina.cluster.tcp.ReplicationValve</attri
bute>
<attribute name="initParams">
filter=.*\.gif;.*\.js;.*\.css;.*\.png;.*\.jpeg;.*\.jpg;.*\.htm;.*\.html;
.*\.txt;
</attribute>
</gbean>
</tomcat>
</container-config>
</web-app>
----------------------end of Geronimo-web.xml---------------------
Thanks for ur time & effort..!
Smiles,
Santosh.
"Don't talk about yourself; it will be done when you leave. "
-----Original Message-----
From: Hernan Cunico [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 26, 2006 9:28 PM
To: [email protected]
Subject: Re: Clustering help..!
Hi Santosh,
can you provide more details (what, how, when)
Can you forward a request from one HTTP to one Geronimo?
Cheers!
Hernan
Santosh Koti wrote:
Hi Guys,
While doing clustering ,
I have the following setup:
Machine1: Geronimo1
Machine2: Geronimo2
Machine3: Apache 1
Machine4: Apache2
I had made the config, but my apache setup is fine , but I think ,
it is
not able to connect to my expected clustered machines..!
What is that , I am missing..?
Thanks,
Santosh.
"Don't talk about yourself; it will be done when you leave. "
**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION
intended
solely for the use of the addressee(s). If you are not the intended
recipient, please notify the sender by e-mail and delete the
original
message. Further, you are not to copy, disclose, or distribute this
e-mail or its contents to any other person and any such actions are
unlawful. This e-mail may contain viruses. Infosys has taken every
reasonable precaution to minimize this risk, but is not liable for
any
damage you may sustain as a result of any virus in this e-mail. You
should carry out your own virus checks before opening the e-mail or
attachment. Infosys reserves the right to monitor and review the
content
of all messages sent to or from this e-mail address. Messages sent
to or
from this e-mail address may be stored on the Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***