You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Kristian Rink <kr...@zimmer428.net> on 2007/05/31 15:05:30 UTC
tomcat 6, clustering, FarmDeployer
Folks;
being knee-deep into building a test system to see whether our
clustered applications also will work in a tc 6.0 clustered environment
(currently they run atop 5.5), and the cluster configuration (having an
apache2+mod-jk in front) seems to work well having an application that
already runs within the tomcat setup.
However, the FarmDeployer doesn't seem to work here. Deploying a war
file to /opt/appsrv/tomcat/tmp/war-listen/ provides me with the
following messages in catalina.out ...
- ... on the machine the war file was deployed to:
31.05.2007 14:56:58 org.apache.catalina.ha.deploy.WarWatcher check
INFO: check cluster wars at /opt/appsrv/tomcat/tmp/war-listen
31.05.2007 14:56:59 org.apache.catalina.ha.deploy.FarmWarDeployer
fileModified INFO: Installing webapp[/pcdvisual]
from /opt/appsrv/tomcat/tmp/war-deploy/pcdvisual.war 31.05.2007
14:56:59 org.apache.catalina.ha.deploy.FarmWarDeployer remove INFO:
Cluster wide remove of web app /pcdvisual 31.05.2007 14:56:59
org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor
report INFO: ThroughputInterceptor Report[ Tx Msg:1 messages
Sent:0,00 MB (total)
Sent:0,00 MB (application)
Time:0,09 seconds
Tx Speed:0,01 MB/sec (total)
TxSpeed:0,01 MB/sec (application)
Error Msg:0
Rx Msg:1 messages
Rx Speed:0,00 MB/sec (since 1st msg)
Received:0,00 MB]
31.05.2007 14:57:27 org.apache.catalina.ha.deploy.WarWatcher check
INFO: check cluster wars at /opt/appsrv/tomcat/tmp/war-listen
- on the "other" node in the cluster:
31.05.2007 14:56:56 org.apache.catalina.ha.deploy.FarmWarDeployer
messageReceived SCHWERWIEGEND:
javax.management.RuntimeOperationsException: Exception occurred trying
to get an MBean 31.05.2007 14:57:05
org.apache.catalina.ha.deploy.FarmWarDeployer messageReceived
SCHWERWIEGEND: javax.management.RuntimeOperationsException: Exception
occurred trying to get an MBean
So far, I am using the example tc cluster configuration according to
[1]. Environment is Ubuntu 6.06.1 + JDK 1.6.0 on both hosts. Somehow I
suppose that this is just a simple misconfiguration but right now I
don't know where to lay my hands to get it resolved. Can anyone help me
outta here?
Thanks in advance and bye,
Kristian
[1] http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html
--
Kristian Rink * http://zimmer428.net * http://flickr.com/photos/z428/
jab: kawazu@jabber.ccc.de * icq: 48874445 * fon: ++49 176 2447 2771
"One dreaming alone, it will be only a dream; many dreaming together
is the beginning of a new reality." (Hundertwasser)
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: tomcat 6, clustering, FarmDeployer
Posted by Tim Lucia <ti...@yahoo.com>.
I've used ant to write a deploy task which is parameterized. Then I can
wrap an iteration task around it and undeploy + deploy on all n Tomcats.
It does depend on
http://ant-contrib.sourceforge.net/tasks/tasks/foreach.html
<!-- =================================================================
-->
<!-- TOMCAT / Deploy / Undeploy TARGETS
-->
<!-- =================================================================
-->
<!-- Deploy the htmout files to all defined application servers. Will
-->
<!-- restart the context after deployment is complete.
-->
<target
name="deploy"
depends="deploy-war-all"
description="Deploy war to all defined application servers (causes
restart)"/>
<!-- Don't deploy if no tomcat.instances defined -->
<condition property="tomcat-deploy-defined">
<and>
<isset property="tomcat.instances"/>
</and>
</condition>
<!-- Deploy to each defined context by iterating tomcat.instances and
-->
<!-- farming the real work out to deploy-war-one.
-->
<target name="deploy-war-all"
if="tomcat-deploy-defined"
description="Restart the context on the tomcat instance(s)">
<!-- NB: Parallel redeploy is very slow on Tomcat due to the
-->
<!-- of the cluster deployer. So, don't use it.
-->
<foreach
parallel="false"
list="${tomcat.instances}"
delimiter=" "
param="instance"
target="deploy-war-one"/>
</target>
<!-- Reload the requested context
-->
<target
name="deploy-war-one"
description="Restart a single context">
<propertycopy name="tomcat.username"
from="tomcat.${instance}.username" silent="true"/>
<propertycopy name="tomcat.password"
from="tomcat.${instance}.password" silent="true"/>
<propertycopy name="tomcat.server"
from="tomcat.${instance}.server" silent="true"/>
<propertycopy name="tomcat.port" from="tomcat.${instance}.port"
silent="true"/>
<property name="tomcatURL"
value="http://${tomcat.server}:${tomcat.port}${tomcat.manager}"/>
<fail unless="tomcat.username">Undefined: tomcat.username</fail>
<fail unless="tomcat.password">Undefined: tomcat.password</fail>
<fail unless="tomcat.manager" >Undefined: tomcat.manager</fail>
<fail unless="tomcat.server" >Undefined: tomcat.server</fail>
<fail unless="tomcat.port" >Undefined: tomcat.port</fail>
<antcall target="deploy-context" inheritall="true"/>
</target>
<!-- reload the specified context
-->
<target
name="deploy-context"
description="Reload the given context">
<fail unless="tomcat.username">Undefined: tomcat.username</fail>
<fail unless="tomcat.password">Undefined: tomcat.password</fail>
<fail unless="tomcatURL">Undefined: tomcatURL</fail>
<echo taskname="deploy-context">
Deploying ${basedir}/${project.war} to ${tomcatURL}
</echo>
<undeploy
failonerror="false"
taskname="deploy-context"
username="${tomcat.username}"
password="${tomcat.password}"
url ="${tomcatURL}"
path ="/"/>
<deploy
taskname="deploy-context"
username="${tomcat.username}"
password="${tomcat.password}"
url ="${tomcatURL}"
path ="/"
war ="file:${basedir}/${project.war}"/>
</target>
Tim
> -----Original Message-----
> From: Kristian Rink [mailto:kristian@zimmer428.net]
> Sent: Thursday, May 31, 2007 9:52 AM
> To: users@tomcat.apache.org
> Subject: Re: tomcat 6, clustering, FarmDeployer
>
>
> Filip;
>
> first off, thanks loads for your hint. So by now I can at least stop
> playing with the FarmWarDeveloper and focus on other things...
>
> [Filip Hanik - Dev Lists <de...@hanik.com> @ Thu, 31 May 2007
> 15:44:59 +0200]
>
> > hi Kristian, Farm deployer is currently broken, has been for a while
> > and needs to be completely revised.
>
> Is there another meaningful way of getting an application deployed to a
> tomcat cluster, then, without having to deploy it to each and every
> node? Though this wouldn't be much of a pain (given there just are two
> nodes right now... :) ), it at least reduced comfort and ease-of-use
> compared to the FWD solution...
>
> Thanks and bye,
> Kristian
>
> --
> Kristian Rink * http://zimmer428.net * http://flickr.com/photos/z428/
> jab: kawazu@jabber.ccc.de * icq: 48874445 * fon: ++49 176 2447 2771
> "One dreaming alone, it will be only a dream; many dreaming together
> is the beginning of a new reality." (Hundertwasser)
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: tomcat 6, clustering, FarmDeployer
Posted by Kristian Rink <kr...@zimmer428.net>.
Filip;
first off, thanks loads for your hint. So by now I can at least stop
playing with the FarmWarDeveloper and focus on other things...
[Filip Hanik - Dev Lists <de...@hanik.com> @ Thu, 31 May 2007
15:44:59 +0200]
> hi Kristian, Farm deployer is currently broken, has been for a while
> and needs to be completely revised.
Is there another meaningful way of getting an application deployed to a
tomcat cluster, then, without having to deploy it to each and every
node? Though this wouldn't be much of a pain (given there just are two
nodes right now... :) ), it at least reduced comfort and ease-of-use
compared to the FWD solution...
Thanks and bye,
Kristian
--
Kristian Rink * http://zimmer428.net * http://flickr.com/photos/z428/
jab: kawazu@jabber.ccc.de * icq: 48874445 * fon: ++49 176 2447 2771
"One dreaming alone, it will be only a dream; many dreaming together
is the beginning of a new reality." (Hundertwasser)
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: tomcat 6, clustering, FarmDeployer
Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
hi Kristian, Farm deployer is currently broken, has been for a while and
needs to be completely revised.
Filip
Kristian Rink wrote:
> Folks;
>
> being knee-deep into building a test system to see whether our
> clustered applications also will work in a tc 6.0 clustered environment
> (currently they run atop 5.5), and the cluster configuration (having an
> apache2+mod-jk in front) seems to work well having an application that
> already runs within the tomcat setup.
>
> However, the FarmDeployer doesn't seem to work here. Deploying a war
> file to /opt/appsrv/tomcat/tmp/war-listen/ provides me with the
> following messages in catalina.out ...
>
> - ... on the machine the war file was deployed to:
>
> 31.05.2007 14:56:58 org.apache.catalina.ha.deploy.WarWatcher check
> INFO: check cluster wars at /opt/appsrv/tomcat/tmp/war-listen
> 31.05.2007 14:56:59 org.apache.catalina.ha.deploy.FarmWarDeployer
> fileModified INFO: Installing webapp[/pcdvisual]
> from /opt/appsrv/tomcat/tmp/war-deploy/pcdvisual.war 31.05.2007
> 14:56:59 org.apache.catalina.ha.deploy.FarmWarDeployer remove INFO:
> Cluster wide remove of web app /pcdvisual 31.05.2007 14:56:59
> org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor
> report INFO: ThroughputInterceptor Report[ Tx Msg:1 messages
> Sent:0,00 MB (total)
> Sent:0,00 MB (application)
> Time:0,09 seconds
> Tx Speed:0,01 MB/sec (total)
> TxSpeed:0,01 MB/sec (application)
> Error Msg:0
> Rx Msg:1 messages
> Rx Speed:0,00 MB/sec (since 1st msg)
> Received:0,00 MB]
>
> 31.05.2007 14:57:27 org.apache.catalina.ha.deploy.WarWatcher check
> INFO: check cluster wars at /opt/appsrv/tomcat/tmp/war-listen
>
>
> - on the "other" node in the cluster:
>
> 31.05.2007 14:56:56 org.apache.catalina.ha.deploy.FarmWarDeployer
> messageReceived SCHWERWIEGEND:
> javax.management.RuntimeOperationsException: Exception occurred trying
> to get an MBean 31.05.2007 14:57:05
> org.apache.catalina.ha.deploy.FarmWarDeployer messageReceived
> SCHWERWIEGEND: javax.management.RuntimeOperationsException: Exception
> occurred trying to get an MBean
>
>
> So far, I am using the example tc cluster configuration according to
> [1]. Environment is Ubuntu 6.06.1 + JDK 1.6.0 on both hosts. Somehow I
> suppose that this is just a simple misconfiguration but right now I
> don't know where to lay my hands to get it resolved. Can anyone help me
> outta here?
>
> Thanks in advance and bye,
> Kristian
>
>
>
>
> [1] http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html
>
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org