Re: Tomcat 9 cluster with FarmWarDeployer but without session replication

2021-01-28 Thread Kamal Wickramanayake
 Hi Mark,
Thank you very much. It works.
When the  element is not present in the web.xml, 
FarmWarDeployer still works but without sessions getting replicated. I tested 
using a sample web application and then verified by analyzing the network 
traffic. No session data could be found on the wire when  is 
not present.

Kamal

On Wednesday, January 27, 2021, 5:09:04 PM GMT+5:30, Mark Thomas 
 wrote:  
 
 Kamal,

This is off the top of my head without testing it or even looking at the
code but you could try configuring a cluster with the FarmWarDeployer
and then deploying a web application via the FarmWarDeployer that has
the distributable flag set to false in web.xml

Mark


On 27/01/2021 05:44, Kamal Wickramanayake wrote:
> Is it ever possible to configure a Tomcat 9 cluster with the FarmWarDeployer 
> enabled but without session replication? Any guidelines?
> TIAKamal
> 


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

  

Re: Tomcat 9 cluster with FarmWarDeployer but without session replication

2021-01-27 Thread Mark Thomas
Kamal,

This is off the top of my head without testing it or even looking at the
code but you could try configuring a cluster with the FarmWarDeployer
and then deploying a web application via the FarmWarDeployer that has
the distributable flag set to false in web.xml

Mark


On 27/01/2021 05:44, Kamal Wickramanayake wrote:
> Is it ever possible to configure a Tomcat 9 cluster with the FarmWarDeployer 
> enabled but without session replication? Any guidelines?
> TIAKamal
> 


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Tomcat 9 cluster with FarmWarDeployer but without session replication

2021-01-26 Thread Kamal Wickramanayake
Is it ever possible to configure a Tomcat 9 cluster with the FarmWarDeployer 
enabled but without session replication? Any guidelines?
TIAKamal


FarmWarDeployer configuration issues

2017-07-17 Thread niranjan kumar
Hi Team,

 I have used this configuration of FarmWarDeployer to configure two tomcat
nodes as part of Cluster.

1: tempDir="\temp-dir\"
deployDir="\webapps\"
watchDir="\watch-dir\"
watchEnabled="true"/>

2: tempDir="\temp-dir\"
deployDir="\webapps\"
watchDir="\watch-dir\"
watchEnabled="false"/>

Configuration folders are respective to two TOMCAT_BASE instances
1: C:\tomcat1
2: C:\tomcat2
My TOMCAT_HOME is C:\tomcat7.

The 1st tomcat is able to deploy the war correctly from watchDir folder as
evident from log below:

INFO: Starting Servlet Engine: Apache Tomcat/7.0.77
Jul 17, 2017 3:48:08 PM org.apache.catalina.ha.tcp.SimpleTcpCluster
startInternal
INFO: Cluster is about to start
Jul 17, 2017 3:48:08 PM org.apache.catalina.tribes.transport.ReceiverBase
bind
INFO: Receiver Server Socket bound to:/192.168.1.8:4000
Jul 17, 2017 3:48:08 PM
org.apache.catalina.tribes.membership.McastServiceImpl setupSocket
INFO: Setting cluster mcast soTimeout to 500
Jul 17, 2017 3:48:08 PM
org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
INFO: Sleeping for 1000 milliseconds to establish cluster membership, start
level:4
Jul 17, 2017 3:48:09 PM
org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
INFO: Done sleeping, membership established, start level:4
Jul 17, 2017 3:48:09 PM
org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
INFO: Sleeping for 1000 milliseconds to establish cluster membership, start
level:8
Jul 17, 2017 3:48:10 PM
org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
INFO: Done sleeping, membership established, start level:8
Jul 17, 2017 3:48:10 PM org.apache.catalina.ha.deploy.FarmWarDeployer start
INFO: Cluster deployment is watching [\watch-dir\] for changes.
Jul 17, 2017 3:48:10 PM org.apache.catalina.ha.deploy.FarmWarDeployer start
INFO: Cluster FarmWarDeployer started.
Jul 17, 2017 3:48:10 PM org.apache.catalina.ha.session.JvmRouteBinderValve
startInternal
INFO: JvmRouteBinderValve started
Jul 17, 2017 3:48:10 PM org.apache.catalina.startup.HostConfig
deployDescriptor
INFO: Deploying configuration descriptor
C:\tomcat1\conf\Catalina\localhost\manager.xml
Jul 17, 2017 3:48:10 PM org.apache.catalina.startup.TldConfig execute
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable
debug logging for this logger for a complete list of JARs that were scanned
but no TLDs were found in them. Skipping unneeded JARs during scanning can
improve startup time and JSP compilation time.
Jul 17, 2017 3:48:11 PM org.apache.catalina.startup.HostConfig
deployDescriptor
INFO: Deployment of configuration descriptor
C:\tomcat1\conf\Catalina\localhost\manager.xml has finished in 785 ms
Jul 17, 2017 3:48:11 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8081"]
Jul 17, 2017 3:48:11 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Jul 17, 2017 3:48:11 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3077 ms
Jul 17, 2017 3:48:31 PM org.apache.catalina.ha.deploy.FarmWarDeployer
fileModified
INFO: Installing webapp [/catalogue] from [C:\tomcat1\webapps\catalogue.war]
Jul 17, 2017 3:48:31 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive C:\tomcat1\webapps\catalogue.war
Jul 17, 2017 3:48:31 PM org.apache.catalina.loader.WebappClassLoaderBase
validateJarFile
INFO:
validateJarFile(C:\tomcat1\webapps\catalogue\WEB-INF\lib\servlet-api-2.5.jar)
- jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class:
javax/servlet/Servlet.class
Jul 17, 2017 3:48:31 PM org.apache.catalina.startup.TldConfig execute
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable
debug logging for this logger for a complete list of JARs that were scanned
but no TLDs were found in them. Skipping unneeded JARs during scanning can
improve startup time and JSP compilation time.
Jul 17, 2017 3:48:31 PM org.apache.catalina.ha.session.DeltaManager
startInternal
INFO: Register manager /catalogue to cluster element Host with name
localhost
Jul 17, 2017 3:48:31 PM org.apache.catalina.ha.session.DeltaManager
startInternal
INFO: Starting clustering manager at /catalogue
Jul 17, 2017 3:48:31 PM org.apache.catalina.ha.session.DeltaManager
getAllClusterSessions
INFO: Manager [/catalogue]: skipping state transfer. No members active in
cluster group.
Jul 17, 2017 3:48:31 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deployment of web application archive
C:\tomcat1\webapps\catalogue.war has finished in 359 ms

My Question is :
1: why automatic deployment is not happening in second node.
2: MoreOver, How the second node will know about the deployed war if
*watchEnabled
*is *FALSE.*


Tomcat: 7.0.79
Apache: httpd-2.4.26-Win64-VC15
with mod_jk, thanks in advance.

Thanks


Re: FarmWarDeployer in a dynamically changing cluster

2015-10-12 Thread Gintautas Sulskus
Hi Théo,

thanks. That's what I have suspected.

Cheers,
Gin

Best Wishes,
Gintautas Sulskus

On Sat, Oct 10, 2015 at 9:18 AM, Théo Chamley <theo...@mley.fr> wrote:

> Hello,
>
> I can’t seem to find it in the documentation, but no, this is not the
> behaviour of the FarmWarDeployer.
> This component is triggered only by adding or removing an app, not by
> adding or removing a node in the cluster. It will not sync automatically
> the apps to your new node.
> Two solutions:
> * Make sure that your new node comes up with the apps already deployed.
> * Once your new node has joined the cluster, redeploy the apps (a touch on
> the war file should do it) cluster-wide.
>
> //Théo
>
> > On 10 Oct 2015, at 01:48, Gintautas Sulskus <gintautas.suls...@gmail.com>
> wrote:
> >
> > Hi,
> >
> > suppose I have a Tomcat 8 cluster coordinated via multicast.
> > If I understand it right, any newly started server will be picked up
> > automatically and any down servers will eventually be dropped out from
> the
> > cluster.
> >
> > I was wondering, how does FarmWarDeployer cope with this dynamics?
> > Say I have two Tomcat 8 servers T1 and T2 running some apps. Then, a
> third
> > server T3 joins the cluster. Does T3 get synced in terms of applications
> or
> > do I have to deploy these apps myself?
> >
> > I believe I have read somewhere in Tomcat documentation that this is the
> > case. It was very laconic though.
> >
> > Thanks!
> >
> > Best Wishes,
> > Gin
>
>


Re: FarmWarDeployer in a dynamically changing cluster

2015-10-10 Thread Théo Chamley
Hello,

I can’t seem to find it in the documentation, but no, this is not the behaviour 
of the FarmWarDeployer.
This component is triggered only by adding or removing an app, not by adding or 
removing a node in the cluster. It will not sync automatically the apps to your 
new node.
Two solutions:
* Make sure that your new node comes up with the apps already deployed.
* Once your new node has joined the cluster, redeploy the apps (a touch on the 
war file should do it) cluster-wide.

//Théo

> On 10 Oct 2015, at 01:48, Gintautas Sulskus <gintautas.suls...@gmail.com> 
> wrote:
> 
> Hi,
> 
> suppose I have a Tomcat 8 cluster coordinated via multicast.
> If I understand it right, any newly started server will be picked up
> automatically and any down servers will eventually be dropped out from the
> cluster.
> 
> I was wondering, how does FarmWarDeployer cope with this dynamics?
> Say I have two Tomcat 8 servers T1 and T2 running some apps. Then, a third
> server T3 joins the cluster. Does T3 get synced in terms of applications or
> do I have to deploy these apps myself?
> 
> I believe I have read somewhere in Tomcat documentation that this is the
> case. It was very laconic though.
> 
> Thanks!
> 
> Best Wishes,
> Gin



signature.asc
Description: Message signed with OpenPGP using GPGMail


FarmWarDeployer in a dynamically changing cluster

2015-10-09 Thread Gintautas Sulskus
Hi,

suppose I have a Tomcat 8 cluster coordinated via multicast.
If I understand it right, any newly started server will be picked up
automatically and any down servers will eventually be dropped out from the
cluster.

I was wondering, how does FarmWarDeployer cope with this dynamics?
Say I have two Tomcat 8 servers T1 and T2 running some apps. Then, a third
server T3 joins the cluster. Does T3 get synced in terms of applications or
do I have to deploy these apps myself?

I believe I have read somewhere in Tomcat documentation that this is the
case. It was very laconic though.

Thanks!

Best Wishes,
Gin


Re: FarmWarDeployer via tomcat web manager

2015-04-14 Thread Kimmo . Sundgren
Keiichi Fujino kfuj...@apache.org wrote on 14.04.2015 09:33:21:

 From: Keiichi Fujino kfuj...@apache.org
 To: Tomcat Users List users@tomcat.apache.org
 Date: 14.04.2015 09:33
 Subject: Re: FarmWarDeployer via tomcat web manager
 
 2015-04-14 14:22 GMT+09:00 kimmo.sundg...@heeros.com:
 
  Caldarale, Charles R chuck.caldar...@unisys.com wrote on 
14.04.2015
  06:06:37:
 
   From: Caldarale, Charles R chuck.caldar...@unisys.com
   To: Tomcat Users List users@tomcat.apache.org
   Date: 14.04.2015 06:07
   Subject: RE: FarmWarDeployer via tomcat web manager
  
From: Keiichi Fujino [mailto:kfuj...@apache.org]
Subject: Re: FarmWarDeployer via tomcat web manager
  
 I changed war-listen path to webapps, and everything works fine
  untils I
 restart my Tomcat 1 (master node).
 After restarting tomcat my war file goes empty in webapps 
folder. (
  file
 size 0). I saw that farmwardeployer run some kind of cleaning ( 
or
  clear)
 function.
  
Please show how to reproduce this in more detail.
And attach your configuration(server.xml).
  
   Don't attach server.xml, since the list strips almost all
   attachments.  Post it inline in the e-mail, with any sensitive
   information obfuscated and preferably with comments removed.
  
- Chuck
  
  Hi
  this is my server.xml from tomcat 1.
 
  ?xml version='1.0' encoding='utf-8'?
 
  Server port=8005 shutdown=SHUTDOWN
Listener 
className=org.apache.catalina.startup.VersionLoggerListener
  /
Listener className=org.apache.catalina.core.AprLifecycleListener
  SSLEngine=on /
 
Listener
  className=org.apache.catalina.core.JreMemoryLeakPreventionListener 
/
Listener
  
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener /
Listener
  className=org.apache.catalina.core.ThreadLocalLeakPreventionListener 
/
 
 
GlobalNamingResources
 
  Resource name=UserDatabase auth=Container
type=org.apache.catalina.UserDatabase
description=User database that can be updated and 
saved
   factory=org.apache.catalina.users.MemoryUserDatabaseFactory
pathname=conf/tomcat-users.xml /
/GlobalNamingResources
 
  Service name=Catalina
 
 
  Connector port=8081 protocol=HTTP/1.1
 connectionTimeout=2
 redirectPort=8443 /
 
  Connector port=8009 protocol=AJP/1.3 redirectPort=8443 /
 
 
   Engine name=Catalina defaultHost=localhost jvmRoute=tomcat1
 
 
   Host name=localhost  appBase=webapps
  unpackWARs=true autoDeploy=false
 
  Cluster 
className=org.apache.catalina.ha.tcp.SimpleTcpCluster
  channelSendOptions=6
   Manager
  className=org.apache.catalina.ha.session.DeltaManager
 expireSessionsOnShutdown=false
 notifyListenersOnReplication=true/
 
 
Channel
  className=org.apache.catalina.tribes.group.GroupChannel
  Membership
  className=org.apache.catalina.tribes.membership.McastService
  address=228.0.0.4
  port=45564
  frequency=500
  dropTime=1/
  Receiver
  className=org.apache.catalina.tribes.transport.nio.NioReceiver
address=auto
port=5000
selectorTimeout=100
maxThreads=6/
 
  Sender
  
className=org.apache.catalina.tribes.transport.ReplicationTransmitter
Transport
  
className=org.apache.catalina.tribes.transport.nio.PooledParallelSender/
  /Sender
  Interceptor
 
  
 
className=org.apache.catalina.tribes.group.interceptors.TcpFailureDetector/
  Interceptor
 
  
 
className=org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor/
  Interceptor
 
  
 
className=org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor/
/Channel
Valve className=org.apache.catalina.ha.tcp.ReplicationValve
 
 
  filter=.*\.gif|.*\.js|.*\.jpeg|.*\.jpg|.*\.png|.*\.htm|.*
 \.html|.*\.css|.*\.txt/
 
Deployer
  className=org.apache.catalina.ha.deploy.FarmWarDeployer
   tempDir=/opt/tomcat/apache-tomcat-8.0.18/temp/war-temp/
 
 
 I think
 The following configuration is not correct.
 
 
  deployDir=/opt/tomcat/apache-tomcat-8.0.18/webapps/
  watchDir=/opt/tomcat/apache-tomcat-8.0.18/webapps/
 
 
 
 When deployDir and watchDir are set to the same value, FarmWarDeployer 
does
 not work work properly.
 (see FarmWarDeployer.copy).
 
 
 -- 
  Keiichi.Fujino
 

Ok. I try same directory because I try to get work this farmwardeployer 
via manager. Web Manager used webapps so I can't found any other 
solutions.

Summary:
We can't use Farmwardeployer via web manager. I hope someone of you code 
this feature for tomcat some day=)
Thank you for all the replies!
-Kimmo



Re: FarmWarDeployer via tomcat web manager

2015-04-14 Thread Keiichi Fujino
2015-04-14 14:22 GMT+09:00 kimmo.sundg...@heeros.com:

 Caldarale, Charles R chuck.caldar...@unisys.com wrote on 14.04.2015
 06:06:37:

  From: Caldarale, Charles R chuck.caldar...@unisys.com
  To: Tomcat Users List users@tomcat.apache.org
  Date: 14.04.2015 06:07
  Subject: RE: FarmWarDeployer via tomcat web manager
 
   From: Keiichi Fujino [mailto:kfuj...@apache.org]
   Subject: Re: FarmWarDeployer via tomcat web manager
 
I changed war-listen path to webapps, and everything works fine
 untils I
restart my Tomcat 1 (master node).
After restarting tomcat my war file goes empty in webapps folder. (
 file
size 0). I saw that farmwardeployer run some kind of cleaning ( or
 clear)
function.
 
   Please show how to reproduce this in more detail.
   And attach your configuration(server.xml).
 
  Don't attach server.xml, since the list strips almost all
  attachments.  Post it inline in the e-mail, with any sensitive
  information obfuscated and preferably with comments removed.
 
   - Chuck
 
 Hi
 this is my server.xml from tomcat 1.

 ?xml version='1.0' encoding='utf-8'?

 Server port=8005 shutdown=SHUTDOWN
   Listener className=org.apache.catalina.startup.VersionLoggerListener
 /
   Listener className=org.apache.catalina.core.AprLifecycleListener
 SSLEngine=on /

   Listener
 className=org.apache.catalina.core.JreMemoryLeakPreventionListener /
   Listener
 className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener /
   Listener
 className=org.apache.catalina.core.ThreadLocalLeakPreventionListener /


   GlobalNamingResources

 Resource name=UserDatabase auth=Container
   type=org.apache.catalina.UserDatabase
   description=User database that can be updated and saved
  factory=org.apache.catalina.users.MemoryUserDatabaseFactory
   pathname=conf/tomcat-users.xml /
   /GlobalNamingResources

 Service name=Catalina


 Connector port=8081 protocol=HTTP/1.1
connectionTimeout=2
redirectPort=8443 /

 Connector port=8009 protocol=AJP/1.3 redirectPort=8443 /


  Engine name=Catalina defaultHost=localhost jvmRoute=tomcat1


  Host name=localhost  appBase=webapps
 unpackWARs=true autoDeploy=false

 Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster
 channelSendOptions=6
  Manager
 className=org.apache.catalina.ha.session.DeltaManager
expireSessionsOnShutdown=false
notifyListenersOnReplication=true/


   Channel
 className=org.apache.catalina.tribes.group.GroupChannel
 Membership
 className=org.apache.catalina.tribes.membership.McastService
 address=228.0.0.4
 port=45564
 frequency=500
 dropTime=1/
 Receiver
 className=org.apache.catalina.tribes.transport.nio.NioReceiver
   address=auto
   port=5000
   selectorTimeout=100
   maxThreads=6/

 Sender
 className=org.apache.catalina.tribes.transport.ReplicationTransmitter
   Transport
 className=org.apache.catalina.tribes.transport.nio.PooledParallelSender/
 /Sender
 Interceptor

 className=org.apache.catalina.tribes.group.interceptors.TcpFailureDetector/
 Interceptor

 className=org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor/
 Interceptor

 className=org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor/
   /Channel
   Valve className=org.apache.catalina.ha.tcp.ReplicationValve


 filter=.*\.gif|.*\.js|.*\.jpeg|.*\.jpg|.*\.png|.*\.htm|.*\.html|.*\.css|.*\.txt/

   Deployer
 className=org.apache.catalina.ha.deploy.FarmWarDeployer
  tempDir=/opt/tomcat/apache-tomcat-8.0.18/temp/war-temp/


I think
The following configuration is not correct.


 deployDir=/opt/tomcat/apache-tomcat-8.0.18/webapps/
watchDir=/opt/tomcat/apache-tomcat-8.0.18/webapps/



When deployDir and watchDir are set to the same value, FarmWarDeployer does
not work work properly.
(see FarmWarDeployer.copy).


-- 
 Keiichi.Fujino



Re: FarmWarDeployer via tomcat web manager

2015-04-14 Thread Keiichi Fujino
2015-04-14 15:58 GMT+09:00 kimmo.sundg...@heeros.com:

 Keiichi Fujino kfuj...@apache.org wrote on 14.04.2015 09:33:21:

  From: Keiichi Fujino kfuj...@apache.org
  To: Tomcat Users List users@tomcat.apache.org
  Date: 14.04.2015 09:33
  Subject: Re: FarmWarDeployer via tomcat web manager
 
  2015-04-14 14:22 GMT+09:00 kimmo.sundg...@heeros.com:
 
   Caldarale, Charles R chuck.caldar...@unisys.com wrote on
 14.04.2015
   06:06:37:
  
From: Caldarale, Charles R chuck.caldar...@unisys.com
To: Tomcat Users List users@tomcat.apache.org
Date: 14.04.2015 06:07
Subject: RE: FarmWarDeployer via tomcat web manager
   
 From: Keiichi Fujino [mailto:kfuj...@apache.org]
 Subject: Re: FarmWarDeployer via tomcat web manager
   
  I changed war-listen path to webapps, and everything works fine
   untils I
  restart my Tomcat 1 (master node).
  After restarting tomcat my war file goes empty in webapps
 folder. (
   file
  size 0). I saw that farmwardeployer run some kind of cleaning (
 or
   clear)
  function.
   
 Please show how to reproduce this in more detail.
 And attach your configuration(server.xml).
   
Don't attach server.xml, since the list strips almost all
attachments.  Post it inline in the e-mail, with any sensitive
information obfuscated and preferably with comments removed.
   
 - Chuck
   
   Hi
   this is my server.xml from tomcat 1.
  
   ?xml version='1.0' encoding='utf-8'?
  
   Server port=8005 shutdown=SHUTDOWN
 Listener
 className=org.apache.catalina.startup.VersionLoggerListener
   /
 Listener className=org.apache.catalina.core.AprLifecycleListener
   SSLEngine=on /
  
 Listener
   className=org.apache.catalina.core.JreMemoryLeakPreventionListener
 /
 Listener
  
 className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener /
 Listener
   className=org.apache.catalina.core.ThreadLocalLeakPreventionListener
 /
  
  
 GlobalNamingResources
  
   Resource name=UserDatabase auth=Container
 type=org.apache.catalina.UserDatabase
 description=User database that can be updated and
 saved
factory=org.apache.catalina.users.MemoryUserDatabaseFactory
 pathname=conf/tomcat-users.xml /
 /GlobalNamingResources
  
   Service name=Catalina
  
  
   Connector port=8081 protocol=HTTP/1.1
  connectionTimeout=2
  redirectPort=8443 /
  
   Connector port=8009 protocol=AJP/1.3 redirectPort=8443 /
  
  
Engine name=Catalina defaultHost=localhost jvmRoute=tomcat1
  
  
Host name=localhost  appBase=webapps
   unpackWARs=true autoDeploy=false
  
   Cluster
 className=org.apache.catalina.ha.tcp.SimpleTcpCluster
   channelSendOptions=6
Manager
   className=org.apache.catalina.ha.session.DeltaManager
  expireSessionsOnShutdown=false
  notifyListenersOnReplication=true/
  
  
 Channel
   className=org.apache.catalina.tribes.group.GroupChannel
   Membership
   className=org.apache.catalina.tribes.membership.McastService
   address=228.0.0.4
   port=45564
   frequency=500
   dropTime=1/
   Receiver
   className=org.apache.catalina.tribes.transport.nio.NioReceiver
 address=auto
 port=5000
 selectorTimeout=100
 maxThreads=6/
  
   Sender
  
 className=org.apache.catalina.tribes.transport.ReplicationTransmitter
 Transport
  
 className=org.apache.catalina.tribes.transport.nio.PooledParallelSender/
   /Sender
   Interceptor
  
  
 

 className=org.apache.catalina.tribes.group.interceptors.TcpFailureDetector/
   Interceptor
  
  
 

 className=org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor/
   Interceptor
  
  
 

 className=org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor/
 /Channel
 Valve className=org.apache.catalina.ha.tcp.ReplicationValve
  
  
   filter=.*\.gif|.*\.js|.*\.jpeg|.*\.jpg|.*\.png|.*\.htm|.*
  \.html|.*\.css|.*\.txt/
  
 Deployer
   className=org.apache.catalina.ha.deploy.FarmWarDeployer
tempDir=/opt/tomcat/apache-tomcat-8.0.18/temp/war-temp/
  
 
  I think
  The following configuration is not correct.
 
 
   deployDir=/opt/tomcat/apache-tomcat-8.0.18/webapps/
   watchDir=/opt/tomcat/apache-tomcat-8.0.18/webapps/
  
 
 
  When deployDir and watchDir are set to the same value, FarmWarDeployer
 does
  not work work properly.
  (see FarmWarDeployer.copy).
 
 
  --
   Keiichi.Fujino
  

 Ok. I try same directory because I try to get work this farmwardeployer
 via manager. Web Manager used webapps so I can't found any other
 solutions.

 Summary:
 We

Re: FarmWarDeployer via tomcat web manager

2015-04-13 Thread Keiichi Fujino
2015-04-13 18:42 GMT+09:00 kimmo.sundg...@heeros.com:

 Hi

 I newbie on the Tomcat. I have HA architecture including Cisco ACE
 Loadbalancer, 3 servers with RHEL 7 + httpd 2.4 + mod_proxy AJP+ Tomcat
 8.0.18.
  I have problem with FarmWarDeployer. I would like to use FarmWarDeployer
 via Tomcat Web Manager. Is this possible?


No.
There is no such feature.


 I changed war-listen path to webapps, and everything works fine untils I
 restart my Tomcat 1 (master node).
 After restarting tomcat my war file goes empty in webapps folder. ( file
 size 0). I saw that farmwardeployer run some kind of cleaning ( or clear)
 function.


Please show how to reproduce this in more detail.
And attach your configuration(server.xml).




 Is it possible to stop clearing because everything else works fine and I
 like hot deployment via web manager.

 I'm trying to seek answer on web using google but nothing found.

 Thanx,
 Kimmo

 --
 Keiichi.Fujino



RE: FarmWarDeployer via tomcat web manager

2015-04-13 Thread Caldarale, Charles R
 From: Keiichi Fujino [mailto:kfuj...@apache.org] 
 Subject: Re: FarmWarDeployer via tomcat web manager

  I changed war-listen path to webapps, and everything works fine untils I
  restart my Tomcat 1 (master node).
  After restarting tomcat my war file goes empty in webapps folder. ( file
  size 0). I saw that farmwardeployer run some kind of cleaning ( or clear)
  function.

 Please show how to reproduce this in more detail.
 And attach your configuration(server.xml).

Don't attach server.xml, since the list strips almost all attachments.  Post it 
inline in the e-mail, with any sensitive information obfuscated and preferably 
with comments removed.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: FarmWarDeployer via tomcat web manager

2015-04-13 Thread Kimmo . Sundgren
Caldarale, Charles R chuck.caldar...@unisys.com wrote on 14.04.2015 
06:06:37:

 From: Caldarale, Charles R chuck.caldar...@unisys.com
 To: Tomcat Users List users@tomcat.apache.org
 Date: 14.04.2015 06:07
 Subject: RE: FarmWarDeployer via tomcat web manager
 
  From: Keiichi Fujino [mailto:kfuj...@apache.org] 
  Subject: Re: FarmWarDeployer via tomcat web manager
 
   I changed war-listen path to webapps, and everything works fine 
untils I
   restart my Tomcat 1 (master node).
   After restarting tomcat my war file goes empty in webapps folder. ( 
file
   size 0). I saw that farmwardeployer run some kind of cleaning ( or 
clear)
   function.
 
  Please show how to reproduce this in more detail.
  And attach your configuration(server.xml).
 
 Don't attach server.xml, since the list strips almost all 
 attachments.  Post it inline in the e-mail, with any sensitive 
 information obfuscated and preferably with comments removed.
 
  - Chuck
 
Hi
this is my server.xml from tomcat 1. 

?xml version='1.0' encoding='utf-8'?

Server port=8005 shutdown=SHUTDOWN
  Listener className=org.apache.catalina.startup.VersionLoggerListener 
/
  Listener className=org.apache.catalina.core.AprLifecycleListener 
SSLEngine=on /

  Listener 
className=org.apache.catalina.core.JreMemoryLeakPreventionListener /
  Listener 
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener /
  Listener 
className=org.apache.catalina.core.ThreadLocalLeakPreventionListener /


  GlobalNamingResources

Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
  description=User database that can be updated and saved
 factory=org.apache.catalina.users.MemoryUserDatabaseFactory
  pathname=conf/tomcat-users.xml /
  /GlobalNamingResources

Service name=Catalina


Connector port=8081 protocol=HTTP/1.1
   connectionTimeout=2
   redirectPort=8443 /

Connector port=8009 protocol=AJP/1.3 redirectPort=8443 /


 Engine name=Catalina defaultHost=localhost jvmRoute=tomcat1


 Host name=localhost  appBase=webapps
unpackWARs=true autoDeploy=false

Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster 
channelSendOptions=6
 Manager 
className=org.apache.catalina.ha.session.DeltaManager
   expireSessionsOnShutdown=false
   notifyListenersOnReplication=true/

 
  Channel 
className=org.apache.catalina.tribes.group.GroupChannel
Membership 
className=org.apache.catalina.tribes.membership.McastService
address=228.0.0.4
port=45564
frequency=500
dropTime=1/
Receiver 
className=org.apache.catalina.tribes.transport.nio.NioReceiver
  address=auto
  port=5000
  selectorTimeout=100
  maxThreads=6/

Sender 
className=org.apache.catalina.tribes.transport.ReplicationTransmitter
  Transport 
className=org.apache.catalina.tribes.transport.nio.PooledParallelSender/
/Sender
Interceptor 
className=org.apache.catalina.tribes.group.interceptors.TcpFailureDetector/
Interceptor 
className=org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor/
Interceptor 
className=org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor/
  /Channel
  Valve className=org.apache.catalina.ha.tcp.ReplicationValve
 
filter=.*\.gif|.*\.js|.*\.jpeg|.*\.jpg|.*\.png|.*\.htm|.*\.html|.*\.css|.*\.txt/

  Deployer 
className=org.apache.catalina.ha.deploy.FarmWarDeployer
 tempDir=/opt/tomcat/apache-tomcat-8.0.18/temp/war-temp/
deployDir=/opt/tomcat/apache-tomcat-8.0.18/webapps/
   watchDir=/opt/tomcat/apache-tomcat-8.0.18/webapps/
   processDeployFrequency=10
   watchEnabled=true/
  ClusterListener 
className=org.apache.catalina.ha.session.ClusterSessionListener/

/Cluster

  Realm className=org.apache.catalina.realm.LockOutRealm
Realm className=org.apache.catalina.realm.UserDatabaseRealm
   resourceName=UserDatabase/
  /Realm
Valve className=org.apache.catalina.authenticator.SingleSignOn 
/
Valve className=org.apache.catalina.valves.AccessLogValve 
directory=logs
   prefix=localhost_access_log suffix=.txt
   pattern=%h %l %u %t quot;%rquot; %s %b /

  /Host
/Engine
  /Service
/Server

-Kimmo

FarmWarDeployer via tomcat web manager

2015-04-13 Thread Kimmo . Sundgren
Hi 

I newbie on the Tomcat. I have HA architecture including Cisco ACE 
Loadbalancer, 3 servers with RHEL 7 + httpd 2.4 + mod_proxy AJP+ Tomcat 
8.0.18.   
 I have problem with FarmWarDeployer. I would like to use FarmWarDeployer 
via Tomcat Web Manager. Is this possible? 

I changed war-listen path to webapps, and everything works fine untils I 
restart my Tomcat 1 (master node). 
After restarting tomcat my war file goes empty in webapps folder. ( file 
size 0). I saw that farmwardeployer run some kind of cleaning ( or clear) 
function. 


Is it possible to stop clearing because everything else works fine and I 
like hot deployment via web manager. 

I'm trying to seek answer on web using google but nothing found. 

Thanx, 
Kimmo

Re: FarmWarDeployer not checking watchDir

2015-01-21 Thread Théo Chamley

On 2015-01-21 00:15, Christopher Schultz wrote:


Can you build with an updated patch[1], re-break your directory
permissions and re-run Tomcat? Let me know if the log output you get
would have led you to a solution more quickly.

- -chris


I did. Here is the warning I obtained:

21-Jan-2015 12:48:26.160 WARNING 
[ContainerBackgroundProcessor[StandardEngine[Catalina]]] 
org.apache.catalina.ha.deploy.WarWatcher.check /my/watch/dir/ROOT.war 
was detected in /my/watch/dir but does not exist. Check directory 
permissions on /my/watch/dir?


I probably would have found the problem faster with this message, yes.
I'll open


Can you log a Bugzilla enhancement for this? I'll add some checking to
WarWatcher as well as improved logging.


I will open it right now.


Théo

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: FarmWarDeployer not checking watchDir

2015-01-20 Thread Konstantin Kolinko
2015-01-13 21:38 GMT+03:00 Théo Chamley theo...@mley.fr:
 Hello,

 I have setup a Tomcat cluster and I am now trying to get the FarmWarDeployer
 to work.
 However, it seems that the Deployer never checks my watchDir and therefore
 never finds my new wars to deploy.

 When starting Tomcat, the logs indicate that the Deployer is started:
 13-Jan-2015 19:21:43.942 INFO [Catalina-startStop-1]
 org.apache.catalina.ha.deploy.FarmWarDeployer.start Cluster deployment is
 watching [/my/watch/dir/] for changes.
 13-Jan-2015 19:21:43.942 INFO [Catalina-startStop-1]
 org.apache.catalina.ha.deploy.FarmWarDeployer.start Cluster FarmWarDeployer
 started.

 But nothing more, even for extended periods of time after putting my
 ROOT.war inside my watchDir.

 I checked the source code
 (https://github.com/apache/tomcat80/blob/trunk/java/org/apache/catalina/ha/deploy/FarmWarDeployer.java),
 and it seems that the check must be done once every two backgroundProcess
 calls, but I don't understand when this function is supposed to be called or
 if there is a way to force the check.

 I feel like I am missing something obvious...


 Here is my config:
 Oracle JDK 1.8.0_25
 Tomcat 8.0.15
 server.xml:
 Host name=www.exemple.com appBase=/my/app/base
 unpackWARs=true
 autoDeploy=true
 
 Cluster
 className=org.apache.catalina.ha.tcp.SimpleTcpCluster
 channelSendOptions=6
 Manager
 className=org.apache.catalina.ha.session.BackupManager
 expireSessionsOnShutdown=false
 notifyListenersOnReplication=true
 mapSendOptions=6/
 Channel
 className=org.apache.catalina.tribes.group.GroupChannel
 Membership
 className=org.apache.catalina.tribes.membership.McastService
 address=228.0.0.4
 port=45564
 frequency=500
 dropTime=3000
 bind=10.0.0.1/
 Receiver
 className=org.apache.catalina.tribes.transport.nio.NioReceiver
 address=10.0.0.1
 port=5000
 selectorTimeout=100
 maxThreads=6/
 Sender
 className=org.apache.catalina.tribes.transport.ReplicationTransmitter
 Transport
 className=org.apache.catalina.tribes.transport.nio.PooledParallelSender/
 /Sender
 Interceptor
 className=org.apache.catalina.tribes.group.interceptors.TcpFailureDetector/
 Interceptor
 className=org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor/
 Interceptor
 className=org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor/
 /Channel
 Valve
 className=org.apache.catalina.ha.tcp.ReplicationValve

 filter=.*.gif|.*.js|.*.jpeg|.*.jpg|.*.png|.*.css|.*.txt/

Note . before file name extension has to be escaped to mean a
literal '.' instead of any-character pattern,
.*\.gif etc.


 Deployer
 className=org.apache.catalina.ha.deploy.FarmWarDeployer
 tempDir=/my/temp/dir/
 deployDir=/my/app/base/
 watchDir=/my/listen/dir/
 watchEnabled=true/

I wonder why there are two getter methods for watchEnabled property in
FarmWarDeployer,

[[[
public boolean isWatchEnabled() {
return watchEnabled;
}

public boolean getWatchEnabled() {
return watchEnabled;
}

public void setWatchEnabled(boolean watchEnabled) {
this.watchEnabled = watchEnabled;
}
]]]


 ClusterListener
 className=org.apache.catalina.ha.session.ClusterSessionListener/
 /Cluster
 /Host


 The logs now show that the listen dir is checked, but nothing more, even if I 
 repeatedly touch the ROOT.war file. And  from the source code, I won't 
 have more information from the logs…
 Could the mount options of the file system influence the result? My partition 
 is mounted with
 rw,nosuid,nodev,noexec,noatime,nodiratime,data=ordered.

 19-Jan-2015 12:04:27.956 FINE [ContainerBackgroundProcessor[
StandardEngine[Catalina]]]
org.apache.catalina.ha.deploy.WarWatcher.check check cluster wars at
/my/watch/dir


Note that message says /my/watch/dir,  but the configuration above
uses /my/listen/dir/.

What are access permissions for the directory and for the file.  Is
there search permission on the directory, is the file readable?

E.g. if the directory is not readable File.listFiles() returns null,
but the code interprets it as an empty list, silently proceeding
further.

Best regards,
Konstantin Kolinko

Re: FarmWarDeployer not checking watchDir

2015-01-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Théo,

On 1/19/15 3:59 PM, Théo Chamley wrote:
 
 On 19 Jan 2015, at 20:16, Christopher Schultz 
 ch...@christopherschultz.net
 mailto:ch...@christopherschultz.net wrote:
 
 Signed PGP part Théo,
 
 On 1/19/15 6:11 AM, Théo Chamley wrote:
 On 2015-01-16 19:33, Christopher Schultz wrote: Théo,
 
 On 1/13/15 1:38 PM, Théo Chamley wrote:
 I have setup a Tomcat cluster and I am now trying to get
 the FarmWarDeployer to work. However, it seems that the
 Deployer never checks my watchDir and therefore never
 finds my new wars to deploy.
 
 When starting Tomcat, the logs indicate that the Deployer
 is started: 13-Jan-2015 19:21:43.942 INFO 
 [Catalina-startStop-1] 
 org.apache.catalina.ha.deploy.FarmWarDeployer.start
 Cluster deployment is watching [/my/watch/dir/] for
 changes. 13-Jan-2015 19:21:43.942 INFO
 [Catalina-startStop-1] 
 org.apache.catalina.ha.deploy.FarmWarDeployer.start
 Cluster FarmWarDeployer started.
 
 But nothing more, even for extended periods of time
 after putting my ROOT.war inside my watchDir.
 
 I checked the source code
 
 (https://github.com/apache/tomcat80/blob/trunk/java/org/apache/catalina/ha/deploy/FarmWarDeployer.java),

 
 
 
 
 
 
 and it seems that the check must be done once every two
 backgroundProcess calls, but I don't understand when
 this function is supposed to be called or if there is a
 way to force the check.
 
 Can you enable DEBUG logging for 
 org.apache.catalina.ha.deploy.WarWatcher?
 
 The backgroundProcess method will be called by the background 
 thread that is launched for the server. It's not something you
 will generally have to manage yourself.
 
 -chris
 
 -

 
 
 
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org 
 mailto:users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail:
 users-h...@tomcat.apache.org
 mailto:users-h...@tomcat.apache.org
 
 Hello,
 
 Thank you for your answer. The logs now show that the listen
 dir is checked, but nothing more, even if I repeatedly touch
 the ROOT.war file. And from the source code, I won't have more 
 information from the logs… Could the mount options of the file 
 system influence the result? My partition is mounted with 
 rw,nosuid,nodev,noexec,noatime,nodiratime,data=ordered.
 
 19-Jan-2015 12:04:27.956 FINE 
 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] 
 org.apache.catalina.ha.deploy.WarWatcher.check check cluster
 wars at /my/watch/dir 19-Jan-2015 12:04:47.962 FINE 
 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] 
 org.apache.catalina.ha.deploy.WarWatcher.check check cluster
 wars at /my/watch/dir 19-Jan-2015 12:05:07.967 FINE 
 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] 
 org.apache.catalina.ha.deploy.WarWatcher.check check cluster
 wars at /my/watch/dir
 
 It looks like WarWatcher looks for WAR files that end in .war 
 specifically: it must be all lower-case.
 
 Would you be willing to build your own Tomcat from source if I
 send you a source patch? I could add some logging and you can get
 more information.
 
 -chris
 
 
 
 -

 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 mailto:users-unsubscr...@tomcat.apache.org For additional
 commands, e-mail: users-h...@tomcat.apache.org 
 mailto:users-h...@tomcat.apache.org
 
 
 Hello,
 
 Yes, absolutely. Also, I just verified: the name of my file is
 exactly “ROOT.war”, with this case.

http://people.apache.org/~schultz/patches/WarWatcher.log.patch

Kick-up the log level for the WarWatcher class to TRACE and re-try.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUvnVLAAoJEBzwKT+lPKRYSEkP/jXmu1J8CEpnSNtDvdZjsKvc
eUvNlEO8ul6cAbEH2FnEpN26CmXLwGNdCmN17THElUI+O/j2nH/HMqEtD3wSRsdj
bp9Vy4bKAhAu9rsOwNIlW8aY3mcDTQp+sKF55RzpXqxP4aO7UyxXgHwlZavJvNB6
ockn7NV/qPafhJRTBiahdB9pHAB6yXAToaUn1GlITDtTLHYY4BG3a3084mh6I406
70vOMYOM4E9vDRcEreI7gANg6Zbc299UrHPG/9Q+YnHtogw1hd7YheraMF7iyzFj
WYcmEZjjZfOWRT8MtRokBaj3WgugHHIJZ6rYW4Snb6O9Lp6Gox4LBoro41++RJsm
oRLnyYe8fW81OjivEgjiyxHD49yFrPcEhOnAVguCBD/wVeBUafcbvGgnCHbY44ma
rPtkrKF25JuELmb2jcYO0Q1/C2edG/G7SzCYTAUquNlFrepCwjfecyXqA7iJncte
8hBMO0D3ukJOZsXtlwGS4O2v+ulXH3e/7KUIN45XDy0RTzDPlnEndC6/1D0Oxcgc
muPiFg/EzI6jNi2hSFOJSluJ5RaK6brifOHki8NK7obBMcj4CWs1Rs03Av9oA6BD
wtldS6S6ZesQCyY73d4gHqdJHYMv0j+jvG0sn3eKDULrdnXgYqDjkVmYDWSlkpqB
v4reNZCAQ7K6157+eVIr
=FGW0
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: FarmWarDeployer not checking watchDir

2015-01-20 Thread Théo Chamley

On 2015-01-20 16:33, Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Théo,

On 1/19/15 3:59 PM, Théo Chamley wrote:



On 19 Jan 2015, at 20:16, Christopher Schultz
ch...@christopherschultz.net
mailto:ch...@christopherschultz.net wrote:

Signed PGP part Théo,

On 1/19/15 6:11 AM, Théo Chamley wrote:

On 2015-01-16 19:33, Christopher Schultz wrote: Théo,

On 1/13/15 1:38 PM, Théo Chamley wrote:

I have setup a Tomcat cluster and I am now trying to get
the FarmWarDeployer to work. However, it seems that the
Deployer never checks my watchDir and therefore never
finds my new wars to deploy.

When starting Tomcat, the logs indicate that the Deployer
is started: 13-Jan-2015 19:21:43.942 INFO
[Catalina-startStop-1]
org.apache.catalina.ha.deploy.FarmWarDeployer.start
Cluster deployment is watching [/my/watch/dir/] for
changes. 13-Jan-2015 19:21:43.942 INFO
[Catalina-startStop-1]
org.apache.catalina.ha.deploy.FarmWarDeployer.start
Cluster FarmWarDeployer started.

But nothing more, even for extended periods of time
after putting my ROOT.war inside my watchDir.

I checked the source code


(https://github.com/apache/tomcat80/blob/trunk/java/org/apache/catalina/ha/deploy/FarmWarDeployer.java),












and it seems that the check must be done once every two

backgroundProcess calls, but I don't understand when
this function is supposed to be called or if there is a
way to force the check.


Can you enable DEBUG logging for
org.apache.catalina.ha.deploy.WarWatcher?

The backgroundProcess method will be called by the background
thread that is launched for the server. It's not something you
will generally have to manage yourself.

-chris


-









To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
mailto:users-unsubscr...@tomcat.apache.org

For additional commands, e-mail:
users-h...@tomcat.apache.org

mailto:users-h...@tomcat.apache.org


Hello,

Thank you for your answer. The logs now show that the listen
dir is checked, but nothing more, even if I repeatedly touch
the ROOT.war file. And from the source code, I won't have more
information from the logs… Could the mount options of the file
system influence the result? My partition is mounted with
rw,nosuid,nodev,noexec,noatime,nodiratime,data=ordered.

19-Jan-2015 12:04:27.956 FINE
[ContainerBackgroundProcessor[StandardEngine[Catalina]]]
org.apache.catalina.ha.deploy.WarWatcher.check check cluster
wars at /my/watch/dir 19-Jan-2015 12:04:47.962 FINE
[ContainerBackgroundProcessor[StandardEngine[Catalina]]]
org.apache.catalina.ha.deploy.WarWatcher.check check cluster
wars at /my/watch/dir 19-Jan-2015 12:05:07.967 FINE
[ContainerBackgroundProcessor[StandardEngine[Catalina]]]
org.apache.catalina.ha.deploy.WarWatcher.check check cluster
wars at /my/watch/dir


It looks like WarWatcher looks for WAR files that end in .war
specifically: it must be all lower-case.

Would you be willing to build your own Tomcat from source if I
send you a source patch? I could add some logging and you can get
more information.

-chris



-



To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org

mailto:users-unsubscr...@tomcat.apache.org For additional
commands, e-mail: users-h...@tomcat.apache.org
mailto:users-h...@tomcat.apache.org



Hello,

Yes, absolutely. Also, I just verified: the name of my file is
exactly “ROOT.war”, with this case.


http://people.apache.org/~schultz/patches/WarWatcher.log.patch

Kick-up the log level for the WarWatcher class to TRACE and re-try.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUvnVLAAoJEBzwKT+lPKRYSEkP/jXmu1J8CEpnSNtDvdZjsKvc
eUvNlEO8ul6cAbEH2FnEpN26CmXLwGNdCmN17THElUI+O/j2nH/HMqEtD3wSRsdj
bp9Vy4bKAhAu9rsOwNIlW8aY3mcDTQp+sKF55RzpXqxP4aO7UyxXgHwlZavJvNB6
ockn7NV/qPafhJRTBiahdB9pHAB6yXAToaUn1GlITDtTLHYY4BG3a3084mh6I406
70vOMYOM4E9vDRcEreI7gANg6Zbc299UrHPG/9Q+YnHtogw1hd7YheraMF7iyzFj
WYcmEZjjZfOWRT8MtRokBaj3WgugHHIJZ6rYW4Snb6O9Lp6Gox4LBoro41++RJsm
oRLnyYe8fW81OjivEgjiyxHD49yFrPcEhOnAVguCBD/wVeBUafcbvGgnCHbY44ma
rPtkrKF25JuELmb2jcYO0Q1/C2edG/G7SzCYTAUquNlFrepCwjfecyXqA7iJncte
8hBMO0D3ukJOZsXtlwGS4O2v+ulXH3e/7KUIN45XDy0RTzDPlnEndC6/1D0Oxcgc
muPiFg/EzI6jNi2hSFOJSluJ5RaK6brifOHki8NK7obBMcj4CWs1Rs03Av9oA6BD
wtldS6S6ZesQCyY73d4gHqdJHYMv0j+jvG0sn3eKDULrdnXgYqDjkVmYDWSlkpqB
v4reNZCAQ7K6157+eVIr
=FGW0
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


Thanks, found my problem by adding even more debugging than you.
So, it came down to my watchDir being in 644 and not 755.

Because of this, the war.exists() in the modified() function of the 
WarInfo class returned false.
What was misleading is that the watchDir.listFiles(new WarFilter

RE: FarmWarDeployer not checking watchDir

2015-01-20 Thread Caldarale, Charles R
 From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
 Subject: Re: FarmWarDeployer not checking watchDir

 So you can get a list of names, but you can't get any other
 information about the files, like anything returned by stat().

Correct; stat() retrieves metadata that's stored in the inode, so you must have 
access to the inode, not just the directory entry.

 everything gave me either an error (e.g. ls) or en empty listing (vi)
 of that directory.

Expected; there are no standard tools I'm aware of that _only_ read and display 
directory entries; pretty much everything wants to go deeper to the target of 
the directory entry (the inode).

 I think the JRE uses honest-to-goodness execute permissions for
 certain things on modern (read: NT) filesystems, but I think there are
 some files that have implicit execute permission (like anything ending
 in .com, .exe, .pif, .bat, .cmd, or maybe others as well).

There actually is an explicit execute permission in Windows (separate from 
read) for files; for directories, there's a list-folder-contents permission 
akin to POSIX execute.  Any file in Windows can be marked as executable; the 
extension list is just the set of extensions Windows checks for when a command 
is given without an extension.

  Seems a bit odd that a .jar or .war file would need execute
  access, though.

? Not looking for execute privs on the WAR... only the containing
 directory.

Ahh - I misunderstood.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: FarmWarDeployer not checking watchDir

2015-01-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Konstantin,

On 1/20/15 12:06 PM, Konstantin Kolinko wrote:
 2015-01-13 21:38 GMT+03:00 Théo Chamley theo...@mley.fr:
 Hello,
 
 I have setup a Tomcat cluster and I am now trying to get the
 FarmWarDeployer to work. However, it seems that the Deployer
 never checks my watchDir and therefore never finds my new wars to
 deploy.
 
 When starting Tomcat, the logs indicate that the Deployer is
 started: 13-Jan-2015 19:21:43.942 INFO [Catalina-startStop-1] 
 org.apache.catalina.ha.deploy.FarmWarDeployer.start Cluster
 deployment is watching [/my/watch/dir/] for changes. 13-Jan-2015
 19:21:43.942 INFO [Catalina-startStop-1] 
 org.apache.catalina.ha.deploy.FarmWarDeployer.start Cluster
 FarmWarDeployer started.
 
 But nothing more, even for extended periods of time after putting
 my ROOT.war inside my watchDir.
 
 I checked the source code 
 (https://github.com/apache/tomcat80/blob/trunk/java/org/apache/catalina/ha/deploy/FarmWarDeployer.java),

 
and it seems that the check must be done once every two backgroundProcess
 calls, but I don't understand when this function is supposed to
 be called or if there is a way to force the check.
 
 I feel like I am missing something obvious...
 
 
 Here is my config: Oracle JDK 1.8.0_25 Tomcat 8.0.15 server.xml: 
 Host name=www.exemple.com appBase=/my/app/base 
 unpackWARs=true autoDeploy=true
 
 Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster 
 channelSendOptions=6 Manager 
 className=org.apache.catalina.ha.session.BackupManager 
 expireSessionsOnShutdown=false 
 notifyListenersOnReplication=true mapSendOptions=6/ 
 Channel 
 className=org.apache.catalina.tribes.group.GroupChannel 
 Membership 
 className=org.apache.catalina.tribes.membership.McastService 
 address=228.0.0.4 port=45564 frequency=500 dropTime=3000 
 bind=10.0.0.1/ Receiver 
 className=org.apache.catalina.tribes.transport.nio.NioReceiver 
 address=10.0.0.1 port=5000 selectorTimeout=100 
 maxThreads=6/ Sender 
 className=org.apache.catalina.tribes.transport.ReplicationTransmitter

 
Transport
 className=org.apache.catalina.tribes.transport.nio.PooledParallelSender/

 
/Sender
 Interceptor 
 className=org.apache.catalina.tribes.group.interceptors.TcpFailureDetector/

 
Interceptor
 className=org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor/

 
Interceptor
 className=org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor/

 
/Channel
 Valve className=org.apache.catalina.ha.tcp.ReplicationValve
 
 filter=.*.gif|.*.js|.*.jpeg|.*.jpg|.*.png|.*.css|.*.txt/
 
 Note . before file name extension has to be escaped to mean a 
 literal '.' instead of any-character pattern, .*\.gif etc.


Fortunately, regex . any-character also includes .. So this
configuration is merely misleading, not incorrect.

 Deployer 
 className=org.apache.catalina.ha.deploy.FarmWarDeployer 
 tempDir=/my/temp/dir/ deployDir=/my/app/base/ 
 watchDir=/my/listen/dir/ watchEnabled=true/
 
 I wonder why there are two getter methods for watchEnabled property
 in FarmWarDeployer,
 
 [[[ public boolean isWatchEnabled() { return watchEnabled; }
 
 public boolean getWatchEnabled() { return watchEnabled; }
 
 public void setWatchEnabled(boolean watchEnabled) { 
 this.watchEnabled = watchEnabled; } ]]]

Because humans often want getBooleanProperty, but Java Beans usually
have isBooleanProperty.

 ClusterListener 
 className=org.apache.catalina.ha.session.ClusterSessionListener/

 
/Cluster
 /Host
 
 
 The logs now show that the listen dir is checked, but nothing
 more, even if I repeatedly touch the ROOT.war file. And  from
 the source code, I won't have more information from the logs… 
 Could the mount options of the file system influence the result?
 My partition is mounted with 
 rw,nosuid,nodev,noexec,noatime,nodiratime,data=ordered.
 
 19-Jan-2015 12:04:27.956 FINE [ContainerBackgroundProcessor[
 StandardEngine[Catalina]]] 
 org.apache.catalina.ha.deploy.WarWatcher.check check cluster wars
 at /my/watch/dir
 
 
 Note that message says /my/watch/dir,  but the configuration
 above uses /my/listen/dir/.

Good catch. Something isn't right, here.

 What are access permissions for the directory and for the file.
 Is there search permission on the directory, is the file readable?
 
 E.g. if the directory is not readable File.listFiles() returns
 null, but the code interprets it as an empty list, silently
 proceeding further.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUvswUAAoJEBzwKT+lPKRYfSIP/A9+QxLtLnh30eDXGTk586ci
yCOVBo/EzLZADItNzIVhaHWj9lwq8rQHlsjNHEumqlEPK/9esxbbaJ4SMRfCiCty
K3/rwWJC3DgHJmv6sA8GWqlUIM8Cie4mBKV00Tv5aekNLfa8stzzCNjTkQ4bSg8y
iQgYu1K4JoYkEcp9WmrZpk/95SA57UQLs1D5s1ftYsu6Y8lFTMq30IMrnvCu8aLy
dJS4SmGc3NbvPt7dVdEo41+WvM0o/m+H+QScrE8kgXVGGbsNPb2kwG943xD29vxu
L1LG1hYwh6pT0hson9B6fd7ZAwjL9rbSZJ28g3TeVpahYH9I6kOPRadt6T186ndn
zLhkkU2xDvqh8ePzgfqAJCkyc0W7eVnlA5Ju7JIPeh/oAq6Yf

Re: FarmWarDeployer not checking watchDir

2015-01-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Théo,

On 1/20/15 12:42 PM, Théo Chamley wrote:
 Thanks, found my problem by adding even more debugging than you. 
 So, it came down to my watchDir being in 644 and not 755.

So, missing the execute bit?

 Because of this, the war.exists() in the modified() function of
 the WarInfo class returned false. What was misleading is that the
 watchDir.listFiles(new WarFilter()) function (line 71 of
 WarWatcher.java) was able to list the content of the directory…

I'll check out that behavior: WarWatcher can certainly use some
polishing as I've seen by looking at a bit of that code.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUvtnIAAoJEBzwKT+lPKRYT5oP/3iPBQEFI0ApXwGnHC7C1dBW
uE/k1AvPCCO9kr7JtGe3f8sDsVgeMOLTbolmZyE9b78Hom/TFQfzKbnhQhwDtiuc
99P/kE5dr+5eAv3FaUSvOMYUl4SG67MrfO3H4BR/odVP+/Fqqr4xX+spwxYqeLr7
eSijQpmXHFvBQIjKDG1opBaKAG3+EIiwXTw4WdH+lXrU4XtzWzpAkBca7RL/1Id5
i/WJ0jqcc3btNlI4iodei9iog7A1Cy/8QDfDVYEoNBqqVy994y7+L6mzVFf/GUV3
fIYBNU5aXmPorsrDvGvO0vGINOQWpR74gK0m0b2wXKRxCyIk60nxs62zQT7hDVhw
NjFp3oBpiNPYpIq+wWMtfJYZBI/OhJOmf/aDyYWJbs476tDqVrgieDjTVsl0hxoC
L3ofZ74vOcVJWqVymITuoU67WL9u7IPlnVrASA6dHsxuywH+6aN8Gzf/RGqkcqB5
3z8NKPeCkUmqFGp5ucWDSxGmFp5nv0ZoquvRHUbGdAVmIibypYAvCkKXkHLEg6J2
sLjhV2l9BwEhbvGMuUahriYbyLirnAGphKu1YQXJFPBPoxYD1Q4U4akA/0Yl8EDB
SsTlKDac1eReaqGAnozgBNkX+t0tb2mUa03rcLFBRJ07zNUVR94af22TDdweWIxg
Yum/aS6FljVOJlZ7KUjA
=COo+
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: FarmWarDeployer not checking watchDir

2015-01-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Théo,

On 1/20/15 5:53 PM, Théo Chamley wrote:
 Yes, that’s it. A chmod +x on my watchDir fixed the problem (I knew
 I was missing something silly…). As for Konstantin’s remark on the
 path, I changed it before posting and made a mistake at this
 moment. The real path, which is the same everywhere, contains the
 name of my client.

Can you build with an updated patch[1], re-break your directory
permissions and re-run Tomcat? Let me know if the log output you get
would have led you to a solution more quickly.

- -chris

[1] http://people.apache.org/~schultz/patches/WarWatcher.log.patch.2
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUvuGlAAoJEBzwKT+lPKRYyd8P/18WH3l5MzLI47Wf/8lQZlu6
XN7tAie5SDfyXQs8HSbUEem7czf7wX6f2rgK29p0Ai1VAWb1RjKPYHMymgJQa25+
+qTxRzEw+Mvs16OuyqL92iH+260IYcbbIAWwz7GyjHNm0iAkG9EIx3QBriNOiZPR
6udYM+46FyKx79ptD0aRd15J08p3SXxdKjqoAtU1kaX0/+fkmAdmdn4jyTbkTpkg
3MgF+qF0Cj+VN/8HJZX1ywWGHXmMwR8XNfgp8nxS+A3cmdbfGXs5JOnMOrXpFzdJ
nXgKnuzuixPKqqeZlMTHptxvCQkY0fooOWeJwIOwa2CGGLC9PnjIzP+NzDk637yy
viQ3W4rZmKuzMa1+evBIJTCGme6vi38gbZ491bWB39xTW4OBngc5J2PBcqfPW+as
SOMv7IMUSXqB0pKWG7g7V5qW4eYjcNOcYi1ntVQHVkUQzdd3mCG3jBYFEL3aj07Y
P8X69lDTndO5pMseuJq0I7VmDZZx4mV5rxjgWqLtr+quJKLTgHK0DazsXgeoeQdk
Qjh7JxQxcqX+fqUbURuPqcgB9WlAI4yfxIyxTzibjbtyGJkgrwMjepZ9uz8wWdXw
1/mrSxSGYFO+FPsPZSw3/D8+Y7oFkFLN9UiPJj8y967TFcsfq450HDboewxnhZ9U
62BZonqvKo8mz7TFFkNp
=bXkY
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: FarmWarDeployer not checking watchDir

2015-01-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Chuck,

On 1/20/15 6:10 PM, Caldarale, Charles R wrote:
 From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
 Subject: Re: FarmWarDeployer not checking watchDir
 
 I'm actually really surprised that File.list() returns a list of
 files for the directory that does not have execute permissions.
 
 That's per the POSIX standard: you only need read access on the 
 directory to see directory entries (which pretty much consist only
 of names and inode numbers), but you need execute access on the
 directory to actually reach the inodes those directory entries
 point to.

So you can get a list of names, but you can't get any other
information about the files, like anything returned by stat().

I tried every other tool I could think of (stat, ls, vi, less, etc.)
short of writing the program in C myself to see what I could see, and
everything gave me either an error (e.g. ls) or en empty listing (vi)
of that directory.

 And, of course, Windows knows nothing about this... (meaning the
 JRE has to fake it a bit).

I think the JRE uses honest-to-goodness execute permissions for
certain things on modern (read: NT) filesystems, but I think there are
some files that have implicit execute permission (like anything ending
in .com, .exe, .pif, .bat, .cmd, or maybe others as well).

 Seems a bit odd that a .jar or .war file would need execute
 access, though.

? Not looking for execute privs on the WAR... only the containing
directory.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUvuKIAAoJEBzwKT+lPKRY/+AP/RmAdEas/AiQT7cvgaJcUbIA
QRrbm05u7S9rVC0fSVLKikJplyxIcITBGkAwDL2QbmdbeykvWY1mMnyw0vQONBG0
Zv4zdxGlQ35PuLQCB/zYrTyuAH3GX5xtp7cHWoyxbOjFjP8psC4jUaHAEftqcNhY
kXvxn1FjwnGKJ89Ijwf6iNMVxS7suUV5fcYsI6RBhwYElmg1Mwub8iW3eO1n2FIp
VoIOLOYzUasfThfpBFczjh/PmbvO1s5F58zSS+4Hq5wFUVn7cBvJjXTOE33oYoYH
GP9KHOaKFiCKbxOLxmN40TG27zoJjM3lb0ptwzBZlyUKEnZ1Dd33y8v/wa3T29ah
JGHWaqHFCt/uGNGf9C3HRzJdomqsmTT9yNgnDpTf4lNUkd67N/Iea6UE4eKqfFFC
jlh5ZOnPftSaZNV4feNwYqpZyd2aqhHvbZvH/Bs17YOrSDUlE6MtqStVU4aBIKH4
iPXw7liHS1u0f/9UTpYbrWGrOFpwb1c/AD+SOd7s0cEqlFEtoB9G/Soj6jLLyzFe
/DdlUMHhKUsQyiexBBYTOUBJu9MBiyhN1uJbGV7jSj014MkExnkh8BsXQgbomQ2n
6PyG/aWlBeeY+VaSqfAxiP5r5HGO9aUPMd7fPE9O7geIw4WCFSDZyua7DXLIIlR+
Xz70XfscxWP8tT5NNakC
=/69Q
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: FarmWarDeployer not checking watchDir

2015-01-20 Thread Caldarale, Charles R
 From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
 Subject: Re: FarmWarDeployer not checking watchDir

 I'm actually really surprised that File.list() returns a list of files
 for the directory that does not have execute permissions.

That's per the POSIX standard: you only need read access on the directory to 
see directory entries (which pretty much consist only of names and inode 
numbers), but you need execute access on the directory to actually reach the 
inodes those directory entries point to.

And, of course, Windows knows nothing about this... (meaning the JRE has to 
fake it a bit).

Seems a bit odd that a .jar or .war file would need execute access, though.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: FarmWarDeployer not checking watchDir

2015-01-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Théo,

On 1/20/15 5:42 PM, Christopher Schultz wrote:
 Théo,
 
 On 1/20/15 12:42 PM, Théo Chamley wrote:
 Thanks, found my problem by adding even more debugging than you. 
 So, it came down to my watchDir being in 644 and not 755.
 
 So, missing the execute bit?
 
 Because of this, the war.exists() in the modified() function
 of the WarInfo class returned false. What was misleading is that
 the watchDir.listFiles(new WarFilter()) function (line 71 of 
 WarWatcher.java) was able to list the content of the directory…
 
 I'll check out that behavior: WarWatcher can certainly use some 
 polishing as I've seen by looking at a bit of that code.

I have confirmed that Java can evidently list files in a directory
without execute permissions, but then the files don't exist as far
as File.exists is concerned:

$ java PermissionsTest 644 755 644/a_file 755/a_file
== File: 644
   exists: true
   canread: true
   canwrite: true
   canexecute: true
   children: [a_file]
== File: 755
   exists: true
   canread: true
   canwrite: true
   canexecute: true
   children: [a_file]
== File: 644/a_file
   exists: false
   canread: false
   canwrite: false
   canexecute: false
   children: null
== File: 755/a_file
   exists: true
   canread: true
   canwrite: true
   canexecute: true
   children: null

I'm actually really surprised that File.list() returns a list of files
for the directory that does not have execute permissions.

The problem with checking for execute permission is that it's a *NIX
implementation detail: on Windows, it would fail.

However, we *can* check to see that File.list() returns a list of
files that do exist. If the deployment directory is empty at startup,
there's no way to test this.

We could check in WarWatcher.check() to see if watchDir.listFiles
returns a list of non-existent files. There are some race-conditions
there but we could issue a WARN log message that something funny might
be going on.

Unfortunately, anything that's going to be perfect is going to be a
huge mess of platform-specific checks.

Can you log a Bugzilla enhancement for this? I'll add some checking to
WarWatcher as well as improved logging.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUvt12AAoJEBzwKT+lPKRY9Y8P/1J7Txcg7BBvSF8v0lgDVOs8
uu//+/vzQBbCV8qk0cTXtwHet5165rQjsRA7Vf5uFPrj9EL1KJ/vAoMiS7QmeFoS
gl2DGMtk1hXUNikxE0lRRuUlaKWoDOB7uowH2BHL5zKJEYZDASdXsXoNJ9pPGCTV
EnnjtBmMvC6Br41UCXSfCEdFySR9StMblWGZply9VsRIRDNoc1Wz7BatBN0840NK
Gukri2vlkNuiagno2I6NFBNZpU/uQ0a2r6xR0c5PS4ufzDy/n3VRljBNxHJy8I/r
4SmB7CwZXVE2cF2tg0+1xvta67qyyqvLe+CWURwTJvNu2DurVcVk3jO2JMFfXrHY
C3xZyhyeV8q3RZshrpRw62dkpNUIN/dHnsEG0GtHSYHTuXDbSbbm0b5XdRQP0wGy
umlHNkTwO2qfQT2dVCigNd7YNvMMwU9Z0S2k+vnx2+0NkuxMEHbzCuvD5Gv0XUHT
XG01+JMz9m6j6QGJjDa8lpjubDPDpAvnJgVe/FHABQeZcJkMrXgT5Ew60Oa0PrFJ
c/JgZTGR+8oeqDbmeMMRIBBQP7cQFaJHUIRWWAUwTMUaWeUT1afV91MR0oCNGZ50
oTTWrogipwewwWyUpZCTX7X3zJXs4z9yoEobm1XDB6in2jbq42Pru8QR+00s1FtZ
SRNEoGN/aGY4MyxEh9Ve
=nlfK
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: FarmWarDeployer not checking watchDir

2015-01-20 Thread Théo Chamley

 On 20 Jan 2015, at 23:42, Christopher Schultz ch...@christopherschultz.net 
 wrote:
 
 Signed PGP part
 Théo,
 
 On 1/20/15 12:42 PM, Théo Chamley wrote:
  Thanks, found my problem by adding even more debugging than you.
  So, it came down to my watchDir being in 644 and not 755.
 
 So, missing the execute bit?
 
  Because of this, the war.exists() in the modified() function of
  the WarInfo class returned false. What was misleading is that the
  watchDir.listFiles(new WarFilter()) function (line 71 of
  WarWatcher.java) was able to list the content of the directory…
 
 I'll check out that behavior: WarWatcher can certainly use some
 polishing as I've seen by looking at a bit of that code.
 
 -chris
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 

Yes, that’s it. A chmod +x on my watchDir fixed the problem (I knew I was 
missing something silly…).
As for Konstantin’s remark on the path, I changed it before posting and made a 
mistake at this moment. The real path, which is the same everywhere, contains 
the name of my client.

Théo


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: FarmWarDeployer not checking watchDir

2015-01-19 Thread Théo Chamley

On 2015-01-16 19:33, Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Théo,

On 1/13/15 1:38 PM, Théo Chamley wrote:

I have setup a Tomcat cluster and I am now trying to get the
FarmWarDeployer to work. However, it seems that the Deployer never
checks my watchDir and therefore never finds my new wars to
deploy.

When starting Tomcat, the logs indicate that the Deployer is
started: 13-Jan-2015 19:21:43.942 INFO [Catalina-startStop-1]
org.apache.catalina.ha.deploy.FarmWarDeployer.start Cluster
deployment is watching [/my/watch/dir/] for changes. 13-Jan-2015
19:21:43.942 INFO [Catalina-startStop-1]
org.apache.catalina.ha.deploy.FarmWarDeployer.start Cluster
FarmWarDeployer started.

But nothing more, even for extended periods of time after putting
my ROOT.war inside my watchDir.

I checked the source code
(https://github.com/apache/tomcat80/blob/trunk/java/org/apache/catalina/ha/deploy/FarmWarDeployer.java),



and it seems that the check must be done once every two

backgroundProcess calls, but I don't understand when this
function is supposed to be called or if there is a way to force the
check.


Can you enable DEBUG logging for 
org.apache.catalina.ha.deploy.WarWatcher?


The backgroundProcess method will be called by the background thread
that is launched for the server. It's not something you will generally
have to manage yourself.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUuVl6AAoJEBzwKT+lPKRYhIoQAJMzLhRpFFU5uERc4ssyxaVY
DE8GPVm2QNW38cqrJevYA6MlOExCAbWZDRnp1sCaMG28mFNTg5aIvz4/R1dKOZ6+
sSYc8TZgnJTDELry0n6TgHfJsaU0iFY4dtajOL9vuOjcqrn0i0uNQaVo+8ziffm6
5/RKk7HmbqX+XMyvTqWeoNXLfcF6t4WN4TQ47GSlyAgcRiyo46aWvwcEBaiWLXp/
dK4WZKzbhhsfm1b6kAg8WGwCIuwW1hEIGTyQPgyR+yxny9imIfsCYdTOmOX744Ll
VE+aaK2naSEqZcgN1D/C/479PJeorRNIgM46vzS8d36Cr6fB/jDUd8oOIGMpY5Rs
NmiB/YJwb7pjrzgRggwy/73EEL5WsyIO4D/RYKa5SZcChSMjqmAR7Z+nQau6nBks
jWC10kVJmUqAkVprzq7+0xnWHvk8BCxH16RTUmET3yDim/3F8/em2hLLpJLHROMd
e9B0mP4rlLeSnB6bbBAmQU9bYuZlqplDJlEpSEPX6L9Xmcdy1jKA8eQ5vgm1AVN6
CTemn/+R+o+p7bWu3TyoSnkr0pK9AWIAr/BIXf7AztnHOU0Cwwsa9dlDP6c922fU
Kb7fNZ1W6jJZcMRgR8otQf+HA9ypAsh+AmYZFgsLeaRUVXMmJcitMbELG3t95gEh
La5UcqT2xHt6zQjRYfRU
=I3ia
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


Hello,

Thank you for your answer.
The logs now show that the listen dir is checked, but nothing more, even 
if I repeatedly touch the ROOT.war file. And from the source code, I 
won't have more information from the logs…
Could the mount options of the file system influence the result? My 
partition is mounted with 
rw,nosuid,nodev,noexec,noatime,nodiratime,data=ordered.


19-Jan-2015 12:04:27.956 FINE 
[ContainerBackgroundProcessor[StandardEngine[Catalina]]] 
org.apache.catalina.ha.deploy.WarWatcher.check check cluster wars at 
/my/watch/dir
19-Jan-2015 12:04:47.962 FINE 
[ContainerBackgroundProcessor[StandardEngine[Catalina]]] 
org.apache.catalina.ha.deploy.WarWatcher.check check cluster wars at 
/my/watch/dir
19-Jan-2015 12:05:07.967 FINE 
[ContainerBackgroundProcessor[StandardEngine[Catalina]]] 
org.apache.catalina.ha.deploy.WarWatcher.check check cluster wars at 
/my/watch/dir


Thanks,

Théo


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: FarmWarDeployer not checking watchDir

2015-01-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Théo,

On 1/19/15 6:11 AM, Théo Chamley wrote:
 On 2015-01-16 19:33, Christopher Schultz wrote: Théo,
 
 On 1/13/15 1:38 PM, Théo Chamley wrote:
 I have setup a Tomcat cluster and I am now trying to get the 
 FarmWarDeployer to work. However, it seems that the Deployer
 never checks my watchDir and therefore never finds my new
 wars to deploy.
 
 When starting Tomcat, the logs indicate that the Deployer is 
 started: 13-Jan-2015 19:21:43.942 INFO
 [Catalina-startStop-1] 
 org.apache.catalina.ha.deploy.FarmWarDeployer.start Cluster 
 deployment is watching [/my/watch/dir/] for changes.
 13-Jan-2015 19:21:43.942 INFO [Catalina-startStop-1] 
 org.apache.catalina.ha.deploy.FarmWarDeployer.start Cluster 
 FarmWarDeployer started.
 
 But nothing more, even for extended periods of time after
 putting my ROOT.war inside my watchDir.
 
 I checked the source code 
 (https://github.com/apache/tomcat80/blob/trunk/java/org/apache/catalina/ha/deploy/FarmWarDeployer.java),




 
and it seems that the check must be done once every two
 backgroundProcess calls, but I don't understand when this 
 function is supposed to be called or if there is a way to
 force the check.
 
 Can you enable DEBUG logging for 
 org.apache.catalina.ha.deploy.WarWatcher?
 
 The backgroundProcess method will be called by the background
 thread that is launched for the server. It's not something you will
 generally have to manage yourself.
 
 -chris
 
 -

 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 Hello,
 
 Thank you for your answer. The logs now show that the listen dir is
 checked, but nothing more, even if I repeatedly touch the
 ROOT.war file. And from the source code, I won't have more
 information from the logs… Could the mount options of the file
 system influence the result? My partition is mounted with 
 rw,nosuid,nodev,noexec,noatime,nodiratime,data=ordered.
 
 19-Jan-2015 12:04:27.956 FINE 
 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] 
 org.apache.catalina.ha.deploy.WarWatcher.check check cluster wars
 at /my/watch/dir 19-Jan-2015 12:04:47.962 FINE 
 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] 
 org.apache.catalina.ha.deploy.WarWatcher.check check cluster wars
 at /my/watch/dir 19-Jan-2015 12:05:07.967 FINE 
 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] 
 org.apache.catalina.ha.deploy.WarWatcher.check check cluster wars
 at /my/watch/dir

It looks like WarWatcher looks for WAR files that end in .war
specifically: it must be all lower-case.

Would you be willing to build your own Tomcat from source if I send
you a source patch? I could add some logging and you can get more
information.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUvVgeAAoJEBzwKT+lPKRYn9YQAKk3yBdD0QE2I5R1OB/sl/5+
qb93Kj2mINoYn26HRF6mNpu/C02rcvX1A+pedcnz4FYhtaXhd5bPOI69GP8LBL6p
akswioN3ziw++bWL8aCALK3TrfXh3Iylnikm7HH7YJWLAe6lEemafGP1Dfj3UrIO
pmMgg+dWhFsknVTAL8FQJ3rrzFzRT4MJtndU2pIj0CsHAzVKRyr+4jEeQJPz0pnv
Qb6sziVr83SuIL73lPMPeEu+lKznUEuJPVi1Svlhr7xnJ4Nbka5EFjD4aS7SRW7/
ipppRwMdh9jGV1I8dQG6GUH5oT488j+BWsJQ2WJ7sa+rpZg/kRUor41FYpB+YD1T
kdIZ/xoBV5labbiTGYBpakgIcLyrAiZzvzlpUZOXWCPlDZmiwSzZNTBksHvTkALO
qxjdxxvt9FvqneEoWKpI3qc7vSMk9+6ZNBMvGP3Jfj9YWn4NxesocKGiWirVXtbb
xfoTL/OC4gKPjgLpDdHog8n3WkBJuPcaV9dwoFj18vM3evyH/n2J8b+ujMHLvwq4
Ks7NOyUCpQTGhz8+Hbn8OK/8zVQDj1W61LO/K0zV8QOqg0rla4mEGtoPkOE1DuMc
dI5Q7b5fbiCdH4ORb7vmdY1LwygfMy2fD4pSmK6hcLatwKOETWI8sSBQmAdMjxWv
1R2OrJsb03ezEiDYVedW
=nhqn
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: FarmWarDeployer not checking watchDir

2015-01-19 Thread Théo Chamley

 On 19 Jan 2015, at 20:16, Christopher Schultz ch...@christopherschultz.net 
 wrote:
 
 Signed PGP part
 Théo,
 
 On 1/19/15 6:11 AM, Théo Chamley wrote:
  On 2015-01-16 19:33, Christopher Schultz wrote: Théo,
 
  On 1/13/15 1:38 PM, Théo Chamley wrote:
  I have setup a Tomcat cluster and I am now trying to get the
  FarmWarDeployer to work. However, it seems that the Deployer
  never checks my watchDir and therefore never finds my new
  wars to deploy.
 
  When starting Tomcat, the logs indicate that the Deployer is
  started: 13-Jan-2015 19:21:43.942 INFO
  [Catalina-startStop-1]
  org.apache.catalina.ha.deploy.FarmWarDeployer.start Cluster
  deployment is watching [/my/watch/dir/] for changes.
  13-Jan-2015 19:21:43.942 INFO [Catalina-startStop-1]
  org.apache.catalina.ha.deploy.FarmWarDeployer.start Cluster
  FarmWarDeployer started.
 
  But nothing more, even for extended periods of time after
  putting my ROOT.war inside my watchDir.
 
  I checked the source code
  (https://github.com/apache/tomcat80/blob/trunk/java/org/apache/catalina/ha/deploy/FarmWarDeployer.java),
 
 
 
 
 
 and it seems that the check must be done once every two
  backgroundProcess calls, but I don't understand when this
  function is supposed to be called or if there is a way to
  force the check.
 
  Can you enable DEBUG logging for
  org.apache.catalina.ha.deploy.WarWatcher?
 
  The backgroundProcess method will be called by the background
  thread that is launched for the server. It's not something you will
  generally have to manage yourself.
 
  -chris
 
  -
 
 
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 
  Hello,
 
  Thank you for your answer. The logs now show that the listen dir is
  checked, but nothing more, even if I repeatedly touch the
  ROOT.war file. And from the source code, I won't have more
  information from the logs… Could the mount options of the file
  system influence the result? My partition is mounted with
  rw,nosuid,nodev,noexec,noatime,nodiratime,data=ordered.
 
  19-Jan-2015 12:04:27.956 FINE
  [ContainerBackgroundProcessor[StandardEngine[Catalina]]]
  org.apache.catalina.ha.deploy.WarWatcher.check check cluster wars
  at /my/watch/dir 19-Jan-2015 12:04:47.962 FINE
  [ContainerBackgroundProcessor[StandardEngine[Catalina]]]
  org.apache.catalina.ha.deploy.WarWatcher.check check cluster wars
  at /my/watch/dir 19-Jan-2015 12:05:07.967 FINE
  [ContainerBackgroundProcessor[StandardEngine[Catalina]]]
  org.apache.catalina.ha.deploy.WarWatcher.check check cluster wars
  at /my/watch/dir
 
 It looks like WarWatcher looks for WAR files that end in .war
 specifically: it must be all lower-case.
 
 Would you be willing to build your own Tomcat from source if I send
 you a source patch? I could add some logging and you can get more
 information.
 
 -chris
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 

Hello,

Yes, absolutely.
Also, I just verified: the name of my file is exactly “ROOT.war”, with this 
case.

Best,

Théo



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: FarmWarDeployer not checking watchDir

2015-01-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Théo,

On 1/13/15 1:38 PM, Théo Chamley wrote:
 I have setup a Tomcat cluster and I am now trying to get the 
 FarmWarDeployer to work. However, it seems that the Deployer never
 checks my watchDir and therefore never finds my new wars to
 deploy.
 
 When starting Tomcat, the logs indicate that the Deployer is
 started: 13-Jan-2015 19:21:43.942 INFO [Catalina-startStop-1] 
 org.apache.catalina.ha.deploy.FarmWarDeployer.start Cluster
 deployment is watching [/my/watch/dir/] for changes. 13-Jan-2015
 19:21:43.942 INFO [Catalina-startStop-1] 
 org.apache.catalina.ha.deploy.FarmWarDeployer.start Cluster 
 FarmWarDeployer started.
 
 But nothing more, even for extended periods of time after putting
 my ROOT.war inside my watchDir.
 
 I checked the source code 
 (https://github.com/apache/tomcat80/blob/trunk/java/org/apache/catalina/ha/deploy/FarmWarDeployer.java),

 
and it seems that the check must be done once every two
 backgroundProcess calls, but I don't understand when this
 function is supposed to be called or if there is a way to force the
 check.

Can you enable DEBUG logging for org.apache.catalina.ha.deploy.WarWatcher?

The backgroundProcess method will be called by the background thread
that is launched for the server. It's not something you will generally
have to manage yourself.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUuVl6AAoJEBzwKT+lPKRYhIoQAJMzLhRpFFU5uERc4ssyxaVY
DE8GPVm2QNW38cqrJevYA6MlOExCAbWZDRnp1sCaMG28mFNTg5aIvz4/R1dKOZ6+
sSYc8TZgnJTDELry0n6TgHfJsaU0iFY4dtajOL9vuOjcqrn0i0uNQaVo+8ziffm6
5/RKk7HmbqX+XMyvTqWeoNXLfcF6t4WN4TQ47GSlyAgcRiyo46aWvwcEBaiWLXp/
dK4WZKzbhhsfm1b6kAg8WGwCIuwW1hEIGTyQPgyR+yxny9imIfsCYdTOmOX744Ll
VE+aaK2naSEqZcgN1D/C/479PJeorRNIgM46vzS8d36Cr6fB/jDUd8oOIGMpY5Rs
NmiB/YJwb7pjrzgRggwy/73EEL5WsyIO4D/RYKa5SZcChSMjqmAR7Z+nQau6nBks
jWC10kVJmUqAkVprzq7+0xnWHvk8BCxH16RTUmET3yDim/3F8/em2hLLpJLHROMd
e9B0mP4rlLeSnB6bbBAmQU9bYuZlqplDJlEpSEPX6L9Xmcdy1jKA8eQ5vgm1AVN6
CTemn/+R+o+p7bWu3TyoSnkr0pK9AWIAr/BIXf7AztnHOU0Cwwsa9dlDP6c922fU
Kb7fNZ1W6jJZcMRgR8otQf+HA9ypAsh+AmYZFgsLeaRUVXMmJcitMbELG3t95gEh
La5UcqT2xHt6zQjRYfRU
=I3ia
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



FarmWarDeployer not checking watchDir

2015-01-13 Thread Théo Chamley

Hello,

I have setup a Tomcat cluster and I am now trying to get the 
FarmWarDeployer to work.
However, it seems that the Deployer never checks my watchDir and 
therefore never finds my new wars to deploy.


When starting Tomcat, the logs indicate that the Deployer is started:
13-Jan-2015 19:21:43.942 INFO [Catalina-startStop-1] 
org.apache.catalina.ha.deploy.FarmWarDeployer.start Cluster deployment 
is watching [/my/watch/dir/] for changes.
13-Jan-2015 19:21:43.942 INFO [Catalina-startStop-1] 
org.apache.catalina.ha.deploy.FarmWarDeployer.start Cluster 
FarmWarDeployer started.


But nothing more, even for extended periods of time after putting my 
ROOT.war inside my watchDir.


I checked the source code 
(https://github.com/apache/tomcat80/blob/trunk/java/org/apache/catalina/ha/deploy/FarmWarDeployer.java), 
and it seems that the check must be done once every two 
backgroundProcess calls, but I don't understand when this function is 
supposed to be called or if there is a way to force the check.


I feel like I am missing something obvious...


Here is my config:
Oracle JDK 1.8.0_25
Tomcat 8.0.15
server.xml:
Host name=www.exemple.com appBase=/my/app/base
unpackWARs=true
autoDeploy=true

Cluster 
className=org.apache.catalina.ha.tcp.SimpleTcpCluster

channelSendOptions=6
Manager 
className=org.apache.catalina.ha.session.BackupManager

expireSessionsOnShutdown=false
notifyListenersOnReplication=true
mapSendOptions=6/
Channel 
className=org.apache.catalina.tribes.group.GroupChannel
Membership 
className=org.apache.catalina.tribes.membership.McastService

address=228.0.0.4
port=45564
frequency=500
dropTime=3000
bind=10.0.0.1/
Receiver 
className=org.apache.catalina.tribes.transport.nio.NioReceiver

address=10.0.0.1
port=5000
selectorTimeout=100
maxThreads=6/
Sender 
className=org.apache.catalina.tribes.transport.ReplicationTransmitter
Transport 
className=org.apache.catalina.tribes.transport.nio.PooledParallelSender/

/Sender
Interceptor 
className=org.apache.catalina.tribes.group.interceptors.TcpFailureDetector/
Interceptor 
className=org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor/
Interceptor 
className=org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor/

/Channel
Valve 
className=org.apache.catalina.ha.tcp.ReplicationValve

filter=.*.gif|.*.js|.*.jpeg|.*.jpg|.*.png|.*.css|.*.txt/
Deployer 
className=org.apache.catalina.ha.deploy.FarmWarDeployer

tempDir=/my/temp/dir/
deployDir=/my/app/base/
watchDir=/my/listen/dir/
watchEnabled=true/
ClusterListener 
className=org.apache.catalina.ha.session.ClusterSessionListener/

/Cluster
/Host

Thank you in advance,

Théo

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



FarmWarDeployer ocassionally fails with Application is being serviced

2014-01-22 Thread Michael Gloegl
We are trying to use FarmWarDeployer at the moment, however it fails 
ocassionally on the slave nodes with the following log message:

Jan 22, 2014 11:00:23 AM org.apache.catalina.ha.deploy.FarmWarDeployer 
messageReceived
SEVERE: Application [/xxx] is being serviced. Touch war file [xxx.war] again!

It occurs sporadically and after touching the war the deployment usually works 
in a second try. However it is pretty annoying because we always have to check 
if deployment might have failed or not on individual nodes.

FarmWarDeployer does call mBeanServer.invoke(oname, isServiced ... to 
determine if an application is being considered serviced, its documented with 
Invoke the check method on the deployer.

However I can find no information on what the isServiced MBean method 
actually does and how we can prevent this deployment error other than try 
again. All the information I can find is that this method checks if an 
application is being serviced by another component.

Can somebody shed any light here on what the serviced status means and how we 
can avoid this FarmWarDeployer Failure?

Thanks in advance for any help,
Michael




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: FarmWarDeployer ocassionally fails with Application is being serviced

2014-01-22 Thread Mark Thomas
On 22/01/2014 10:24, Michael Gloegl wrote:

 Can somebody shed any light here on what the serviced status means and how 
 we can avoid this FarmWarDeployer Failure?

It usually means that the manager application or the auto deployment
code is doing something (starting, stopping, deploying, undeploying etc)
the web application.

The Javadoc looks like it could do with some fixes.

Looking at the docs and the code, the problem is that the
FarmWarDeployer writes the WAR to the appBase and then marks it is
serviced. This means that the auto deployment code may get there first
which confuses the FarmWarDeployer.

I'd say this is a bug in the FarmWarDeployer. Please open a Bugzilla entry.

As a work-around, you should be able to disable automatic deployment
(untested).

Thanks,

Mark


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



AW: FarmWarDeployer ocassionally fails with Application is being serviced

2014-01-22 Thread Michael Gloegl
I opened a Bug at https://issues.apache.org/bugzilla/show_bug.cgi?id=56051

I will give disabling automatic deployment a try and comment on the bug if that 
changes things.

We are experimenting as well with just skipping the whole 
Cluster/FarmWarDeployer thing completely and just deploying through 
manager/curl on all nodes, as the application is stateless anyways.

Thanks for your help!

-Ursprüngliche Nachricht-
Von: Mark Thomas [mailto:ma...@apache.org] 
Gesendet: Mittwoch, 22. Januar 2014 13:12
An: Tomcat Users List
Betreff: Re: FarmWarDeployer ocassionally fails with Application is being 
serviced

On 22/01/2014 10:24, Michael Gloegl wrote:

 Can somebody shed any light here on what the serviced status means and how 
 we can avoid this FarmWarDeployer Failure?

It usually means that the manager application or the auto deployment code is 
doing something (starting, stopping, deploying, undeploying etc) the web 
application.

The Javadoc looks like it could do with some fixes.

Looking at the docs and the code, the problem is that the FarmWarDeployer 
writes the WAR to the appBase and then marks it is serviced. This means that 
the auto deployment code may get there first which confuses the FarmWarDeployer.

I'd say this is a bug in the FarmWarDeployer. Please open a Bugzilla entry.

As a work-around, you should be able to disable automatic deployment (untested).

Thanks,

Mark


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



FarmWarDeployer doesn't deploy updated war

2011-11-24 Thread Kirys
Hi all
I've configured the FarmWarDeployer for a test cluster into my company
infrastructure (all nodes are windows server 2003), the
FarmWarDeployer seems to properly deploy new wars and it able to
undeploy removed wars, but doesn't seems to properly update war files
on replace.

Is this a normal behaviour?
Thank You
K.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: FarmWarDeployer undeploy on slave node when tomcat restart

2011-10-21 Thread Marco Betti
Tried also on Tomcat 7.0.22

Same behaviour: when i restart node1, FarmWarDeployer undeploy my war both
from node1 and node2, but re-deploy it only on node1.
If I touch my war in my watchDir on node1, tomcat redeploys it correctly on
both nodes...

Is tomcat clustering used?

If so, does anybody use FarmWarDeployer  ?

Many thanks,
Marco



On Thu, Oct 20, 2011 at 6:21 PM, Marco Betti m.be...@gmail.com wrote:

 Hi all,
 I'm new to the list.
 I'm trying to configure tomcat 6.0.33 clustering.
 Session replication is ok.
 I've a problem with FarmWarDeployer.
 I found that:

 1. You have to place the Cluster node under the Host element.

 Tomcat 6.0.x complains that the element Cluster/Deployer element is not
 understood at the Engine level.

 2. One node needs to have watchEnabled=true, all other nodes
 watchEnabled=false

 3. deployDir is the same as appBase


 and after I found this post that confirmed these points to me:

 http://www.mail-archive.com/users@tomcat.apache.org/msg80374.html

 The problem is the following:
 let node1 be the master (watchEnabled=true) and node2 the slave
 (watchEnabled=false)
 This is my configuration:
 Deployer className=org.apache.catalina.ha.deploy.FarmWarDeployer

 tempDir=/appserv/tomcat/tomcat60/apache-tomcat-6.0.33/server/clu001node01/temp/

 deployDir=/appserv/tomcat/tomcat60/apache-tomcat-6.0.33/server/clu001node01/webapps/

 watchDir=/appserv/tomcat/tomcat60/apache-tomcat-6.0.33/server/clu001node01/farm/
 watchEnabled=true/


 If I copy a war to watchDir of node1 evertything works fine and cluster
 deploy is achieved.

 When i restart node1, FarmWarDeployer undeploy my war both from node1 and
 node2, but re-deploy it only on node1.

 node1 log:

 INFO: Cluster wide remove of web app /example
 Oct 20, 2011 5:50:46 PM org.apache.catalina.startup.HostConfig
 checkResources
 INFO: Undeploying context [/example]
 Oct 20, 2011 5:50:46 PM org.apache.catalina.startup.HostConfig deployWAR
 INFO: Deploying web application archive example.war


 node2 log:

 INFO: Undeploying context [/example]
 Oct 20, 2011 5:50:47 PM org.apache.catalina.ha.deploy.FarmWarDeployer
 messageReceived
 SEVERE: Application /example in used. touch war file example.war again!


 Obviously, if I touch my war in my watchDir on node1, tomcat redeploys it
 correctly on both nodes... but this cannot be the solution...


 Is it a known problem?

 Could anyone help me?

 Many thanks,
 Marco



Re: FarmWarDeployer undeploy on slave node when tomcat restart

2011-10-21 Thread Keiichi Fujino
I checked FarmWarDeployer's code.
When WAR is updated, FarmWarDeployer sends UndeployMessage and sends
FileMessage after that.
The node which received UndeployMessage undeploys war.
The node which received FileMessage deploys war.

If FileMessage is received while processing UndeployMessage, the
following error messages will be outputted.
SEVERE: Application /example in used. touch war file example.war again!

In the case of asynchronous replication (default), FileMessage may be
received while processing UndeployMessage.

I think that it may be better to process updated war by one message.
Although I consider correction of a code, there is one work around.

Workaround is change in synchronous mode.

Please try the following.
Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster
channelSendOptions=6


2011/10/21 Marco Betti m.be...@gmail.com:
 Tried also on Tomcat 7.0.22

 Same behaviour: when i restart node1, FarmWarDeployer undeploy my war both
 from node1 and node2, but re-deploy it only on node1.
 If I touch my war in my watchDir on node1, tomcat redeploys it correctly on
 both nodes...

 Is tomcat clustering used?

 If so, does anybody use FarmWarDeployer  ?

 Many thanks,
 Marco



 On Thu, Oct 20, 2011 at 6:21 PM, Marco Betti m.be...@gmail.com wrote:

 Hi all,
 I'm new to the list.
 I'm trying to configure tomcat 6.0.33 clustering.
 Session replication is ok.
 I've a problem with FarmWarDeployer.
 I found that:

 1. You have to place the Cluster node under the Host element.

 Tomcat 6.0.x complains that the element Cluster/Deployer element is not
 understood at the Engine level.

 2. One node needs to have watchEnabled=true, all other nodes
 watchEnabled=false

 3. deployDir is the same as appBase


 and after I found this post that confirmed these points to me:

 http://www.mail-archive.com/users@tomcat.apache.org/msg80374.html

 The problem is the following:
 let node1 be the master (watchEnabled=true) and node2 the slave
 (watchEnabled=false)
 This is my configuration:
 Deployer className=org.apache.catalina.ha.deploy.FarmWarDeployer

 tempDir=/appserv/tomcat/tomcat60/apache-tomcat-6.0.33/server/clu001node01/temp/

 deployDir=/appserv/tomcat/tomcat60/apache-tomcat-6.0.33/server/clu001node01/webapps/

 watchDir=/appserv/tomcat/tomcat60/apache-tomcat-6.0.33/server/clu001node01/farm/
                     watchEnabled=true/


 If I copy a war to watchDir of node1 evertything works fine and cluster
 deploy is achieved.

 When i restart node1, FarmWarDeployer undeploy my war both from node1 and
 node2, but re-deploy it only on node1.

 node1 log:

 INFO: Cluster wide remove of web app /example
 Oct 20, 2011 5:50:46 PM org.apache.catalina.startup.HostConfig
 checkResources
 INFO: Undeploying context [/example]
 Oct 20, 2011 5:50:46 PM org.apache.catalina.startup.HostConfig deployWAR
 INFO: Deploying web application archive example.war


 node2 log:

 INFO: Undeploying context [/example]
 Oct 20, 2011 5:50:47 PM org.apache.catalina.ha.deploy.FarmWarDeployer
 messageReceived
 SEVERE: Application /example in used. touch war file example.war again!


 Obviously, if I touch my war in my watchDir on node1, tomcat redeploys it
 correctly on both nodes... but this cannot be the solution...


 Is it a known problem?

 Could anyone help me?

 Many thanks,
 Marco





-- 
Keiichi.Fujino

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: FarmWarDeployer undeploy on slave node when tomcat restart

2011-10-21 Thread Marco Betti
Hi Keiichi,
many thanks for your suggestion.
By setting synchronous replication everything works.
Unless processing updated war by one message, I think that async replication
shouldn't be used (personal opinion).
By the way I wander If asnyc replication couldn't lead to some other
unexpected behavior.

Many thanks,
Marco




On Fri, Oct 21, 2011 at 12:10 PM, Keiichi Fujino kfuj...@apache.org wrote:

 I checked FarmWarDeployer's code.
 When WAR is updated, FarmWarDeployer sends UndeployMessage and sends
 FileMessage after that.
 The node which received UndeployMessage undeploys war.
 The node which received FileMessage deploys war.

 If FileMessage is received while processing UndeployMessage, the
 following error messages will be outputted.
 SEVERE: Application /example in used. touch war file example.war again!

 In the case of asynchronous replication (default), FileMessage may be
 received while processing UndeployMessage.

 I think that it may be better to process updated war by one message.
 Although I consider correction of a code, there is one work around.

 Workaround is change in synchronous mode.

 Please try the following.
 Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster
 channelSendOptions=6


 2011/10/21 Marco Betti m.be...@gmail.com:
  Tried also on Tomcat 7.0.22
 
  Same behaviour: when i restart node1, FarmWarDeployer undeploy my war
 both
  from node1 and node2, but re-deploy it only on node1.
  If I touch my war in my watchDir on node1, tomcat redeploys it correctly
 on
  both nodes...
 
  Is tomcat clustering used?
 
  If so, does anybody use FarmWarDeployer  ?
 
  Many thanks,
  Marco
 
 
 
  On Thu, Oct 20, 2011 at 6:21 PM, Marco Betti m.be...@gmail.com wrote:
 
  Hi all,
  I'm new to the list.
  I'm trying to configure tomcat 6.0.33 clustering.
  Session replication is ok.
  I've a problem with FarmWarDeployer.
  I found that:
 
  1. You have to place the Cluster node under the Host element.
 
  Tomcat 6.0.x complains that the element Cluster/Deployer element is not
  understood at the Engine level.
 
  2. One node needs to have watchEnabled=true, all other nodes
  watchEnabled=false
 
  3. deployDir is the same as appBase
 
 
  and after I found this post that confirmed these points to me:
 
  http://www.mail-archive.com/users@tomcat.apache.org/msg80374.html
 
  The problem is the following:
  let node1 be the master (watchEnabled=true) and node2 the slave
  (watchEnabled=false)
  This is my configuration:
  Deployer className=org.apache.catalina.ha.deploy.FarmWarDeployer
 
 
 tempDir=/appserv/tomcat/tomcat60/apache-tomcat-6.0.33/server/clu001node01/temp/
 
 
 deployDir=/appserv/tomcat/tomcat60/apache-tomcat-6.0.33/server/clu001node01/webapps/
 
 
 watchDir=/appserv/tomcat/tomcat60/apache-tomcat-6.0.33/server/clu001node01/farm/
  watchEnabled=true/
 
 
  If I copy a war to watchDir of node1 evertything works fine and cluster
  deploy is achieved.
 
  When i restart node1, FarmWarDeployer undeploy my war both from node1
 and
  node2, but re-deploy it only on node1.
 
  node1 log:
 
  INFO: Cluster wide remove of web app /example
  Oct 20, 2011 5:50:46 PM org.apache.catalina.startup.HostConfig
  checkResources
  INFO: Undeploying context [/example]
  Oct 20, 2011 5:50:46 PM org.apache.catalina.startup.HostConfig deployWAR
  INFO: Deploying web application archive example.war
 
 
  node2 log:
 
  INFO: Undeploying context [/example]
  Oct 20, 2011 5:50:47 PM org.apache.catalina.ha.deploy.FarmWarDeployer
  messageReceived
  SEVERE: Application /example in used. touch war file example.war again!
 
 
  Obviously, if I touch my war in my watchDir on node1, tomcat redeploys
 it
  correctly on both nodes... but this cannot be the solution...
 
 
  Is it a known problem?
 
  Could anyone help me?
 
  Many thanks,
  Marco
 
 



 --
 Keiichi.Fujino

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




-- 
Ing. Marco Betti
RHCE RHEL4 id 804006512121056


Re: FarmWarDeployer undeploy on slave node when tomcat restart

2011-10-21 Thread Mark Eggers
- Original Message -

 From: Marco Betti m.be...@gmail.com
 To: Tomcat Users List users@tomcat.apache.org
 Cc: 
 Sent: Friday, October 21, 2011 7:18 AM
 Subject: Re: FarmWarDeployer undeploy on slave node when tomcat restart
 
 Hi Keiichi,
 many thanks for your suggestion.
 By setting synchronous replication everything works.
 Unless processing updated war by one message, I think that async replication
 shouldn't be used (personal opinion).
 By the way I wander If asnyc replication couldn't lead to some other
 unexpected behavior.
 
 Many thanks,
 Marco
 
 
 
 
 On Fri, Oct 21, 2011 at 12:10 PM, Keiichi Fujino kfuj...@apache.org 
 wrote:
 
  I checked FarmWarDeployer's code.
  When WAR is updated, FarmWarDeployer sends UndeployMessage and sends
  FileMessage after that.
  The node which received UndeployMessage undeploys war.
  The node which received FileMessage deploys war.
 
  If FileMessage is received while processing UndeployMessage, the
  following error messages will be outputted.
  SEVERE: Application /example in used. touch war file example.war 
 again!
 
  In the case of asynchronous replication (default), FileMessage may be
  received while processing UndeployMessage.
 
  I think that it may be better to process updated war by one message.
  Although I consider correction of a code, there is one work around.
 
  Workaround is change in synchronous mode.
 
  Please try the following.
  Cluster 
 className=org.apache.catalina.ha.tcp.SimpleTcpCluster
  channelSendOptions=6
 
 
  2011/10/21 Marco Betti m.be...@gmail.com:
   Tried also on Tomcat 7.0.22
  
   Same behaviour: when i restart node1, FarmWarDeployer undeploy my war
  both
   from node1 and node2, but re-deploy it only on node1.
   If I touch my war in my watchDir on node1, tomcat redeploys it 
 correctly
  on
   both nodes...
  
   Is tomcat clustering used?
  
   If so, does anybody use FarmWarDeployer  ?
  
   Many thanks,
   Marco
  
  
  
   On Thu, Oct 20, 2011 at 6:21 PM, Marco Betti m.be...@gmail.com 
 wrote:
  
   Hi all,
   I'm new to the list.
   I'm trying to configure tomcat 6.0.33 clustering.
   Session replication is ok.
   I've a problem with FarmWarDeployer.
   I found that:
  
   1. You have to place the Cluster node under the 
 Host element.
  
   Tomcat 6.0.x complains that the element Cluster/Deployer element 
 is not
   understood at the Engine level.
  
   2. One node needs to have watchEnabled=true, all other 
 nodes
   watchEnabled=false
  
   3. deployDir is the same as appBase
  
  
   and after I found this post that confirmed these points to me:
  
   http://www.mail-archive.com/users@tomcat.apache.org/msg80374.html
  
   The problem is the following:
   let node1 be the master (watchEnabled=true) and node2 
 the slave
   (watchEnabled=false)
   This is my configuration:
   Deployer 
 className=org.apache.catalina.ha.deploy.FarmWarDeployer
  
  
 
 tempDir=/appserv/tomcat/tomcat60/apache-tomcat-6.0.33/server/clu001node01/temp/
  
  
 
 deployDir=/appserv/tomcat/tomcat60/apache-tomcat-6.0.33/server/clu001node01/webapps/
  
  
 
 watchDir=/appserv/tomcat/tomcat60/apache-tomcat-6.0.33/server/clu001node01/farm/
                       watchEnabled=true/
  
  
   If I copy a war to watchDir of node1 evertything works fine and 
 cluster
   deploy is achieved.
  
   When i restart node1, FarmWarDeployer undeploy my war both from 
 node1
  and
   node2, but re-deploy it only on node1.
  
   node1 log:
  
   INFO: Cluster wide remove of web app /example
   Oct 20, 2011 5:50:46 PM org.apache.catalina.startup.HostConfig
   checkResources
   INFO: Undeploying context [/example]
   Oct 20, 2011 5:50:46 PM org.apache.catalina.startup.HostConfig 
 deployWAR
   INFO: Deploying web application archive example.war
  
  
   node2 log:
  
   INFO: Undeploying context [/example]
   Oct 20, 2011 5:50:47 PM 
 org.apache.catalina.ha.deploy.FarmWarDeployer
   messageReceived
   SEVERE: Application /example in used. touch war file example.war 
 again!
  
  
   Obviously, if I touch my war in my watchDir on node1, tomcat 
 redeploys
  it
   correctly on both nodes... but this cannot be the solution...
  
  
   Is it a known problem?
  
   Could anyone help me?
  
   Many thanks,
   Marco
  



I've noticed this as well with FarmWarDeployer. However, I've always used 
synchronous as the channel option so it's not been a problem.

As to the placement of the cluster, yes you have to place it at the Host 
element in order for FarmWarDeployer to work. That note is buried in the 
documentation somewhere.

Another thing on my to-do list is to write up a basic clustering HOW-TO. 
Unfortunately right now I have no spare cycles.

One of the issues I have with FarmWarDeployer is that upon Tomcat restart the 
application is undeployed and redeployed cluster-wide. This can have several 
unintended consequences.

1. Makes the application unavailable cluster-wide (ouch)
2. Slows down restart
3. Could trigger permgen issues for troublesome

FarmWarDeployer undeploy on slave node when tomcat restart

2011-10-20 Thread Marco Betti
Hi all,
I'm new to the list.
I'm trying to configure tomcat 6.0.33 clustering.
Session replication is ok.
I've a problem with FarmWarDeployer.
I found that:

1. You have to place the Cluster node under the Host element.

Tomcat 6.0.x complains that the element Cluster/Deployer element is not
understood at the Engine level.

2. One node needs to have watchEnabled=true, all other nodes
watchEnabled=false

3. deployDir is the same as appBase


and after I found this post that confirmed these points to me:

http://www.mail-archive.com/users@tomcat.apache.org/msg80374.html

The problem is the following:
let node1 be the master (watchEnabled=true) and node2 the slave
(watchEnabled=false)
This is my configuration:
Deployer className=org.apache.catalina.ha.deploy.FarmWarDeployer

tempDir=/appserv/tomcat/tomcat60/apache-tomcat-6.0.33/server/clu001node01/temp/

deployDir=/appserv/tomcat/tomcat60/apache-tomcat-6.0.33/server/clu001node01/webapps/

watchDir=/appserv/tomcat/tomcat60/apache-tomcat-6.0.33/server/clu001node01/farm/
watchEnabled=true/


If I copy a war to watchDir of node1 evertything works fine and cluster
deploy is achieved.

When i restart node1, FarmWarDeployer undeploy my war both from node1 and
node2, but re-deploy it only on node1.

node1 log:

INFO: Cluster wide remove of web app /example
Oct 20, 2011 5:50:46 PM org.apache.catalina.startup.HostConfig
checkResources
INFO: Undeploying context [/example]
Oct 20, 2011 5:50:46 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive example.war


node2 log:

INFO: Undeploying context [/example]
Oct 20, 2011 5:50:47 PM org.apache.catalina.ha.deploy.FarmWarDeployer
messageReceived
SEVERE: Application /example in used. touch war file example.war again!


Obviously, if I touch my war in my watchDir on node1, tomcat redeploys it
correctly on both nodes... but this cannot be the solution...


Is it a known problem?

Could anyone help me?

Many thanks,
Marco


FarmWarDeployer Tomcat 7.0.12 Clustering Help

2011-04-29 Thread Seth Lenzi


I'm trying to use org.apache.catalina.ha.deploy.FarmWarDeployer with 
Tomcat 7.0.12 to deploy my war files to a Tomcat cluster (two Tomcat's 
both version 7.0.12.)


They war file is successfully deployed to both Tomcats but then the war 
is immediately un-deployed from one of them.


The following error is logged (ClusterTest is the application name.)

SEVERE: Application [/ClusterTest] is being serviced. Touch war file 
[ClusterTest.war] again!


-S


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: FarmWarDeployer Tomcat 7.0.12 Clustering Help

2011-04-29 Thread Mark Thomas
On 29/04/2011 15:29, Seth Lenzi wrote:
 
 I'm trying to use org.apache.catalina.ha.deploy.FarmWarDeployer with
 Tomcat 7.0.12 to deploy my war files to a Tomcat cluster (two Tomcat's
 both version 7.0.12.)
 
 They war file is successfully deployed to both Tomcats but then the war
 is immediately un-deployed from one of them.
 
 The following error is logged (ClusterTest is the application name.)
 
 SEVERE: Application [/ClusterTest] is being serviced. Touch war file
 [ClusterTest.war] again!

There isn't actually a question here...

When we know what question you are asking, we'll also need to know the
configuration you are using for the FarmWarDeployer.

Mark



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: FarmWarDeployer Tomcat 7.0.12 Clustering Help

2011-04-29 Thread Seth Lenzi


Sorry, I thought the question was obvious. It deploys but then undeploys 
with the severe error I mentioned below. I don't want the error I 
want the FarmWarDeployer to deploy the war to both Tomcats and 
remain deployed...


C:/Tomcats/apache-tomcat-7.0.12_node1
C:/Tomcats/apache-tomcat-7.0.12_node2

This is from node1 server.xml.  It's virtually the same in node2 
server.xml except the jvmRoute value is worker2 and the deployDir points 
to node2 /webapps.


Engine name=Catalina defaultHost=localhost jvmRoute=worker1
   Realm className=org.apache.catalina.realm.LockOutRealm
   Realm className=org.apache.catalina.realm.UserDatabaseRealm
  resourceName=UserDatabase/
   /Realm
   Host name=localhost  appBase=webapps unpackWARs=true 
autoDeploy=true

  Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster
 Deployer 
className=org.apache.catalina.ha.deploy.FarmWarDeployer

 tempDir=C:/Tomcats/tomcat_deploy_temp/
 deployDir=C:/Tomcats/apache-tomcat-7.0.12_node1/webapps/
 watchDir=C:/Tomcats/tomcat_deploy_listen/
 watchEnabled=false/
 /Cluster   
Valve className=org.apache.catalina.valves.AccessLogValve 
directory=logs

  prefix=localhost_access_log. suffix=.txt
  pattern=%h %l %u %t quot;%rquot; %s %b resolveHosts=false/
   /Host
/Engine


On 4/29/2011 10:36 AM, Mark Thomas wrote:

On 29/04/2011 15:29, Seth Lenzi wrote:


I'm trying to use org.apache.catalina.ha.deploy.FarmWarDeployer with
Tomcat 7.0.12 to deploy my war files to a Tomcat cluster (two Tomcat's
both version 7.0.12.)

They war file is successfully deployed to both Tomcats but then the war
is immediately un-deployed from one of them.

The following error is logged (ClusterTest is the application name.)

SEVERE: Application [/ClusterTest] is being serviced. Touch war file
[ClusterTest.war] again!


There isn't actually a question here...

When we know what question you are asking, we'll also need to know the
configuration you are using for the FarmWarDeployer.

Mark



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Engine Cluster definition and FarmWarDeployer

2010-08-27 Thread Brett Delle Grazie
Hi,

Tomcat: 6.0.29, binary distribution downloaded from apache.org
JVM: 1.6.0_21 (Sun, 64-bit).
OS: Linux RHEL 5.5, fully patched.

I understand that FarmWarDeployer can only be used cluster context defined in a 
Host, this is fine.
I have a cluster fully defined in the Engine context.

My question is:

1. Can I can use an empty cluster definition in
the host to include the FarmWarDeployer?
2. Should the FarmWarDeployer be included in Host without the surrounding 
Cluster context in this case?
3. Will the config below create two clusters (one in the Engine context, one in 
the Host context)?

?xml version='1.0' encoding='utf-8'?
Server port=${fmp.tomcat.shutdown.port} shutdown=SHUTDOWN
 ... standard setup ...

Service name=Catalina
   ... standard setup ...
Engine name=Catalina defaultHost=localhost 
jvmRoute=jvm${tomcat.clusterid}

Cluster 
className=org.apache.catalina.ha.tcp.SimpleTcpCluster
channelSendOptions=6

Manager 
className=org.apache.catalina.ha.session.BackupManager
expireSessionsOnShutdown=false 
notifyListenersOnReplication=true
mapSendOptions=6 /
Channel 
className=org.apache.catalina.tribes.group.GroupChannel
Membership 
className=org.apache.catalina.tribes.membership.McastService
address=228.0.0.4 
port=45564 frequency=500 dropTime=3000 /
Receiver 
className=org.apache.catalina.tribes.transport.nio.NioReceiver
address=auto port=5000 
selectorTimeout=100 maxThreads=6 /

Sender

className=org.apache.catalina.tribes.transport.ReplicationTransmitter
Transport

className=org.apache.catalina.tribes.transport.nio.PooledParallelSender /
/Sender
Interceptor

className=org.apache.catalina.tribes.group.interceptors.TcpFailureDetector /
Interceptor

className=org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor
 /
Interceptor

className=org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor 
/
/Channel

Valve 
className=org.apache.catalina.ha.tcp.ReplicationValve

filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;
statistics=true /

Valve 
className=org.apache.catalina.ha.session.JvmRouteBinderValve /

ClusterListener

className=org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener /
ClusterListener

className=org.apache.catalina.ha.session.ClusterSessionListener /
/Cluster

Realm 
className=org.apache.catalina.realm.UserDatabaseRealm
resourceName=UserDatabase /

Host name=localhost appBase=webapps 
unpackWARs=false
autoDeploy=false xmlValidation=false 
xmlNamespaceAware=false

Cluster
Deployer 
className=org.apache.catalina.ha.deploy.FarmWarDeployer
tempDir=${catalina.base}/temp/war-tmp/

deployDir=${catalina.base}/farm/deploy/

watchDir=${catalina.base}/farm/listen/ watchEnabled=true/
/Cluster
/Host
/Engine
/Service
/Server

Thanks,

Best Regards,

Brett Delle Grazie

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

Re: Engine Cluster definition and FarmWarDeployer

2010-08-27 Thread Pid
On 27/08/2010 09:41, Brett Delle Grazie wrote:
 Hi,
 
 Tomcat: 6.0.29, binary distribution downloaded from apache.org
 JVM: 1.6.0_21 (Sun, 64-bit).
 OS: Linux RHEL 5.5, fully patched.
 
 I understand that FarmWarDeployer can only be used cluster context defined in 
 a Host, this is fine.
 I have a cluster fully defined in the Engine context.

If you only have one Host, this is a non-issue, right?  Just move the
cluster definition from the Engine to the Host.


p


 Brett Delle Grazie
 
 __
 This email has been scanned by the MessageLabs Email Security System.
 For more information please visit http://www.messagelabs.com/email 
 __



0x62590808.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


Re: Engine Cluster definition and FarmWarDeployer

2010-08-27 Thread Brett Delle Grazie
On Fri, 2010-08-27 at 10:18 +0100, Pid wrote:
 On 27/08/2010 09:41, Brett Delle Grazie wrote:
  Hi,
  
  Tomcat: 6.0.29, binary distribution downloaded from apache.org
  JVM: 1.6.0_21 (Sun, 64-bit).
  OS: Linux RHEL 5.5, fully patched.
  
  I understand that FarmWarDeployer can only be used cluster context defined 
  in a Host, this is fine.
  I have a cluster fully defined in the Engine context.
 
 If you only have one Host, this is a non-issue, right?  Just move the
 cluster definition from the Engine to the Host.

Alas I have two hosts (I realise my example didn't show that).

What is the best solution when you have two hosts?

Thanks,

 
 
 p
 
 
  Brett Delle Grazie
  
  __
  This email has been scanned by the MessageLabs Email Security System.
  For more information please visit http://www.messagelabs.com/email 
  __
 

-- 
Best Regards,

Brett Delle Grazie

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Engine Cluster definition and FarmWarDeployer

2010-08-27 Thread Pid
On 27/08/2010 11:40, Brett Delle Grazie wrote:
 On Fri, 2010-08-27 at 10:18 +0100, Pid wrote:
 On 27/08/2010 09:41, Brett Delle Grazie wrote:
 Hi,

 Tomcat: 6.0.29, binary distribution downloaded from apache.org
 JVM: 1.6.0_21 (Sun, 64-bit).
 OS: Linux RHEL 5.5, fully patched.

 I understand that FarmWarDeployer can only be used cluster context defined 
 in a Host, this is fine.
 I have a cluster fully defined in the Engine context.

 If you only have one Host, this is a non-issue, right?  Just move the
 cluster definition from the Engine to the Host.
 
 Alas I have two hosts (I realise my example didn't show that).
 
 What is the best solution when you have two hosts?

If you want to use the FarmWarDeployer, you need two Clusters AFAICT.


p

 Thanks,
 


 p


 Brett Delle Grazie

 __
 This email has been scanned by the MessageLabs Email Security System.
 For more information please visit http://www.messagelabs.com/email 
 __

 



0x62590808.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


RE: Engine Cluster definition and FarmWarDeployer

2010-08-27 Thread Brett Delle Grazie
Hi Pid,

That's what I suspected.

Thanks for your help.

Regards,

Brett


-Original Message-
From: Pid [mailto:p...@pidster.com]
Sent: Fri 27/08/2010 15:13
To: Tomcat Users List
Subject: Re: Engine Cluster definition and FarmWarDeployer
 
On 27/08/2010 11:40, Brett Delle Grazie wrote:
 On Fri, 2010-08-27 at 10:18 +0100, Pid wrote:
 On 27/08/2010 09:41, Brett Delle Grazie wrote:
 Hi,

 Tomcat: 6.0.29, binary distribution downloaded from apache.org
 JVM: 1.6.0_21 (Sun, 64-bit).
 OS: Linux RHEL 5.5, fully patched.

 I understand that FarmWarDeployer can only be used cluster context defined 
 in a Host, this is fine.
 I have a cluster fully defined in the Engine context.

 If you only have one Host, this is a non-issue, right?  Just move the
 cluster definition from the Engine to the Host.
 
 Alas I have two hosts (I realise my example didn't show that).
 
 What is the best solution when you have two hosts?

If you want to use the FarmWarDeployer, you need two Clusters AFAICT.


p

 Thanks,
 


 p


 Brett Delle Grazie

 __
 This email has been scanned by the MessageLabs Email Security System.
 For more information please visit http://www.messagelabs.com/email 
 __

 



__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

Is FarmWarDeployer is working?

2010-08-06 Thread sha...@arosys.com
Hi, This is my first mail and If is not the correct palce then do inform me.
I am using Tomcat7.0.0 and working on Linux/Debian machine.
I am configuring the Tomcat for the Session object persistance.
I have created two instances of tomcat7 in the same machine.
First time I am using FarmWarDeployer. I only knows that using this we can
deploy our application in one node in the tomcat cluster rather than
diploying in all the nodes.
Then after some reading what I did is :
I created /tmp/war-deploy , /tmp/war-app , /tmp/war-listen and /war-temp
directories.

I started the tomcat. Here is the portion of the catalina.out file.

6 Aug, 2010 12:46:37 PM org.apache.catalina.ha.deploy.FarmWarDeployer start
INFO: Cluster deployment is watching /tmp/war-listen/ for changes.
6 Aug, 2010 12:46:37 PM org.apache.catalina.ha.deploy.FarmWarDeployer start
INFO: Cluster FarmWarDeployer started.
I understood that FarmWarDeployer started to work.

Now the following message is in the catalina.out in every 20 sec.

INFO: check cluster wars at /tmp/war-listen
6 Aug, 2010 12:53:23 PM org.apache.catalina.ha.deploy.WarWatcher check
INFO: check cluster wars at /tmp/war-listen
6 Aug, 2010 12:53:43 PM org.apache.catalina.ha.deploy.WarWatcher check
INFO: check cluster wars at /tmp/war-listen
6 Aug, 2010 12:54:03 PM org.apache.catalina.ha.deploy.WarWatcher check


Now when I copy my webapplication in the /war-deploy , /tmp/war-app , then
there is no changes in the catalina.out log file. But when I copy my
application in /tmp/war-listen/ directory following message appears in the
log file :

6 Aug, 2010 1:01:56 PM org.apache.catalina.ha.deploy.WarWatcher check
INFO: check cluster wars at /tmp/war-listen
6 Aug, 2010 1:01:56 PM org.apache.catalina.ha.deploy.FarmWarDeployer
fileModified
INFO: Installing webapp[/sessionReplication2] from
/tmp/war-deploy/sessionReplication2.war
6 Aug, 2010 1:01:56 PM org.apache.catalina.ha.deploy.FarmWarDeployer remove
INFO: Cluster wide remove of web app /sessionReplication2
6 Aug, 2010 1:02:16 PM org.apache.catalina.ha.deploy.WarWatcher check
INFO: check cluster wars at /tmp/war-listen

What is happening and what I am lacking to work FarmWarDeployer.
Thanks


mail2web - Check your email from the web at
http://link.mail2web.com/mail2web



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Is FarmWarDeployer is working?

2010-08-06 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Shammi,

On 8/6/2010 5:28 AM, sha...@arosys.com wrote:
 I have created two instances of tomcat7 in the same machine. First
 time I am using FarmWarDeployer. I only knows that using this we can 
 deploy our application in one node in the tomcat cluster rather than 
 deploying in all the nodes.

Unfortunately, there isn't much documentation on the FarmWarDeployer.
Here's what I've been able to find:

http://tomcat.apache.org/tomcat-7.0-doc/cluster-howto.html

...which gives a configuration example:

  Deployer
className=org.apache.catalina.ha.deploy.FarmWarDeployer
tempDir=/tmp/war-temp/
deployDir=/tmp/war-deploy/
watchDir=/tmp/war-listen/
watchEnabled=false/

It also says:


The default tomcat cluster supports farmed deployment, ie, the cluster
can deploy and undeploy applications on the other nodes. The state of
this component is currently in flux but will be addressed soon. There
was a change in the deployment algorithm between Tomcat 5.0 and 5.5 and
at that point, the logic of this component changed to where the deploy
dir has to match the webapps directory.
For more info, Please visit the reference documentation


I suspect the phrase the cluster in the first sentence really means
one particular node in the cluster.

The reference documentation mention at the end is currently blank :(

There is also, of course, the javadoc:

http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/ha/deploy/FarmWarDeployer.html

The documentation seems all messed-up: The javadoc says deployDir - the
directory where we watch for changes and applicationDir - the
directory where we install applications but it's clear that the former
is where the apps are installed, the latter is fictional, and the real
watch directory is called watchDir.

 Then after some reading what I did is :
 I created /tmp/war-deploy , /tmp/war-app , /tmp/war-listen and /war-temp
 directories.

Good. What is /tmp/war-app for? What does your Deployer element look
like? I suspect something like this:

  Deployer
className=org.apache.catalina.ha.deploy.FarmWarDeployer
tempDir=/tmp/war-temp/
deployDir=/tmp/war-deploy/
watchDir=/tmp/war-listen/
watchEnabled=false/

 I started the tomcat. Here is the portion of the catalina.out file.
 
 6 Aug, 2010 12:46:37 PM org.apache.catalina.ha.deploy.FarmWarDeployer start
 INFO: Cluster deployment is watching /tmp/war-listen/ for changes.
 6 Aug, 2010 12:46:37 PM org.apache.catalina.ha.deploy.FarmWarDeployer start
 INFO: Cluster FarmWarDeployer started.
 I understood that FarmWarDeployer started to work.

Looks good.

 Now the following message is in the catalina.out in every 20 sec.
 
 INFO: check cluster wars at /tmp/war-listen
 6 Aug, 2010 12:53:23 PM org.apache.catalina.ha.deploy.WarWatcher check

Sounds like it's polling that directory, which would appear to be normal
operation (though that IMO should probably be a DEBUG message, and not
INFO).

 Now when I copy my webapplication in the /war-deploy , /tmp/war-app , then
 there is no changes in the catalina.out log file.

Don't do that: the only place you should put your file is in
/tmp/war-listen.

 But when I copy my
 application in /tmp/war-listen/ directory following message appears in the
 log file :
 
 6 Aug, 2010 1:01:56 PM org.apache.catalina.ha.deploy.WarWatcher check
 INFO: check cluster wars at /tmp/war-listen
 6 Aug, 2010 1:01:56 PM org.apache.catalina.ha.deploy.FarmWarDeployer
 fileModified
 INFO: Installing webapp[/sessionReplication2] from
 /tmp/war-deploy/sessionReplication2.war
 6 Aug, 2010 1:01:56 PM org.apache.catalina.ha.deploy.FarmWarDeployer remove
 INFO: Cluster wide remove of web app /sessionReplication2

This is probably because it's undeploying the webapp you deployed
improperly by copying it into the /tmp/war-deploy directory.

 6 Aug, 2010 1:02:16 PM org.apache.catalina.ha.deploy.WarWatcher check
 INFO: check cluster wars at /tmp/war-listen

Try stopping all instances of Tomcat, removing all files from
/tmp/war-*, deleting all of Tomcat's work directories, and then
starting all Tomcat instances.

Then, copy your WAR file into /tmp/war-listen and see what happens.

It's unclear to me whether the configuration on all of the nodes in the
cluster should be the same. For instance, if you have two Tomcat
instances on the same server with watchDir=/tmp/war-listen, then both
instances will be watching the same directory and trying to deploy to
the cluster. They are likely to interfere with each other.

Consider using /tmp/war-listen_1 and /tmp/war_listen_2, and
/tmp/war-deploy_1 and /tmp/war_deploy_2, etc.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxcH8UACgkQ9CaO5/Lv0PCJXQCePplQfy3bdJy5uhJ7PzKPcdOa

Re: Is FarmWarDeployer is working?

2010-08-06 Thread Mark Eggers


Shammi,

I have something working for 3 Tomcat 6.0.29 nodes on Fedora 13 using Sun 
JRE/JDK 1.6.0_21. I've not tried undeploying a web application yet.

Here's what I've found so far on Tomcat 6.0.29.

1. You have to place the Cluster node under the Host element.

Tomcat 6.0.29 complains that the element Cluster/Deployer element is not 
understood at the Engine level.

2. One node needs to have watchEnabled=true, all other nodes 
watchEnabled=false

3. deployDir is the same as appBase

This last is a guess, but it seemed logical (and works). Based on my reading of 
the scant documentation, the war file gets deployed there for Tomcat to run 
(hence the deployDir name). There is some noise in the documentation about 
deploying ROOT in this fashion, but I've not experimented with that yet.

I've not read the javadoc (yet) nor looked through the source code (on my list 
of things to do).

So basically, here's my Deployer configuration for a three node cluster running 
on one machine (fronted by Apache and load balanced via mod_jk).

Deployment node:
a. Change the [name] to fit your implementation or leave out the Alias 
elements.
b. Change $CATALINA_BASE/name to be your absolute path to the directory 

Host name=localhost appBase=webapps
  unpackWARs=true autoDeploy=true
  xmlValidation=false xmlNamespaceAware=false
  Alias[a-host-name]/Alias
  Alias[another-host-name]/Alias
  !-- cluster must go here in order to use farm deployment --
  Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster
Deployer className=org.apache.catalina.ha.deploy.FarmWarDeployer
  tempDir=$CATALINA_BASE/temp-dir/
  deployDir=$CATALINA_BASE/webapps/
  watchDir=$CATALINA_BASE/watch-dir/
  watchEnabled=true/
  /Cluster
/Host

Other nodes:
a. Same notes apply - change [name] to suit your implementation or leave out 
Alias
b. Replace $CATALINA_BASE with the absolute path to the directory

Host name=localhost  appBase=webapps
  unpackWARs=true autoDeploy=true
  xmlValidation=false xmlNamespaceAware=false
  Alias[a-host-name]/Alias
  Alias[another-host-name]/Alias
  !-- cluster at host level for farm deployment --
  Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster
Deployer className=org.apache.catalina.ha.deploy.FarmWarDeployer
tempDir=$CATALINA_BASE/temp-dir/
deployDir=$CATALINA_BASE/webapps/
watchDir=$CATALINA_BASE/watch-dir/
watchEnabled=false/
  /Cluster
/Host


I haven't tried this on the subversion trunk, and I've seen some recent commits 
to the clustering components.

Hopefully this will get you started.

. . . . just my two cents

/mde/

- Original Message 
From: Christopher Schultz ch...@christopherschultz.net
To: Tomcat Users List users@tomcat.apache.org
Sent: Fri, August 6, 2010 7:44:21 AM
Subject: Re: Is FarmWarDeployer is working?

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Shammi,

On 8/6/2010 5:28 AM, sha...@arosys.com wrote:
 I have created two instances of tomcat7 in the same machine. First
 time I am using FarmWarDeployer. I only knows that using this we can 
 deploy our application in one node in the tomcat cluster rather than 
 deploying in all the nodes.

Unfortunately, there isn't much documentation on the FarmWarDeployer.
Here's what I've been able to find:

http://tomcat.apache.org/tomcat-7.0-doc/cluster-howto.html

...which gives a configuration example:

  Deployer
className=org.apache.catalina.ha.deploy.FarmWarDeployer
tempDir=/tmp/war-temp/
deployDir=/tmp/war-deploy/
watchDir=/tmp/war-listen/
watchEnabled=false/

It also says:


The default tomcat cluster supports farmed deployment, ie, the cluster
can deploy and undeploy applications on the other nodes. The state of
this component is currently in flux but will be addressed soon. There
was a change in the deployment algorithm between Tomcat 5.0 and 5.5 and
at that point, the logic of this component changed to where the deploy
dir has to match the webapps directory.
For more info, Please visit the reference documentation


I suspect the phrase the cluster in the first sentence really means
one particular node in the cluster.

The reference documentation mention at the end is currently blank :(

There is also, of course, the javadoc:

http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/ha/deploy/FarmWarDeployer.html


The documentation seems all messed-up: The javadoc says deployDir - the
directory where we watch for changes and applicationDir - the
directory where we install applications but it's clear that the former
is where the apps are installed, the latter is fictional, and the real
watch directory is called watchDir.

 Then after some reading what I did is :
 I created /tmp/war-deploy , /tmp/war-app , /tmp/war-listen and /war-temp
 directories.

Good. What is /tmp/war-app for? What does your Deployer element look
like? I suspect something

Re: Regarding Error FarmWarDeployer on Tomcat 6.0.20

2010-01-28 Thread Dilip Krishna K

 Hi,

 I am trying to configure Cluster of Tomcat with two nodes and use
 FarmWarDeployer to deploy between both the nodes. I have almost got
 everything to work but now all of a sudden i am getting Application XYZ in
 used. Touch war file XYZ.war again ! error at which point the application
 is only deployed on one server but not both unless I delete the existing
 file from the war-listen directory and then copy back. Also wanted to know
 if the FarmWarDeployer would work through Tomcat manager deployment ? Any
 help would really be appreciated.

 Regards
 Dilip K Kothamasu



Re: FarmWarDeployer Tomcat 6.0.18 on REL

2009-11-30 Thread samk
See Thread at: http://www.techienuggets.com/Detail?tx=83985 Posted on behalf of 
a User

I have the same issue, seems there is something wrong with this object, and you 
do have an error message in your logs, it's SEVERE: FarmWarDeployer can only 
work as host cluster subelement!.

According to Apache, they have an issue ...

http://tomcat.apache.org/tomcat-6.0-doc/config/cluster-deployer.html

-David

In Response To: 

I've clustered 2 seperate servers together, and i've enabled the 
FarmWarDeployer on each. I can see that the servers are talking to each other 
in the logs, but I cannot get apps deployed to the farm to propagate across the 
cluster. I'm not seeing any error messages in the logs. Any help/suggestions 
would be greatly appreciated.

Here is the output from catalina.out

May 6, 2009 2:02:10 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Realm} Setting property 
'debug' to '99' did not find a matching property.
May 6, 2009 2:02:10 PM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.16.
May 6, 2009 2:02:10 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], 
random [true].
May 6, 2009 2:02:11 PM org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-10.49.64.68-8080
May 6, 2009 2:02:11 PM org.apache.coyote.ajp.AjpAprProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-10.49.64.68-8009
May 6, 2009 2:02:11 PM org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-10.49.64.68-8443
May 6, 2009 2:02:11 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 917 ms
May 6, 2009 2:02:11 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
May 6, 2009 2:02:11 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
May 6, 2009 2:02:11 PM org.apache.catalina.ha.tcp.SimpleTcpCluster start
INFO: Cluster is about to start
May 6, 2009 2:02:11 PM org.apache.catalina.tribes.transport.ReceiverBase bind
INFO: Receiver Server Socket bound to:/10.49.64.68:5000
May 6, 2009 2:02:11 PM org.apache.catalina.tribes.membership.McastServiceImpl 
setupSocket
INFO: Setting cluster mcast soTimeout to 500
May 6, 2009 2:02:11 PM org.apache.catalina.tribes.membership.McastServiceImpl 
waitForMembers
INFO: Sleeping for 1000 milliseconds to establish cluster membership, start 
level:4
May 6, 2009 2:02:11 PM org.apache.catalina.ha.tcp.SimpleTcpCluster memberAdded
INFO: Replication member 
added:org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, 49, 64, 
77}:5000,{10, 49, 64, 77},5000, alive=13087,id={-3 -128 -85 -120 118 -106 77 -4 
-74 -119 108 -114 77 -1 -24 -113 }, payload={}, command={}, domain={}, ]
May 6, 2009 2:02:12 PM org.apache.catalina.tribes.membership.McastServiceImpl 
waitForMembers
INFO: Done sleeping, membership established, start level:4
May 6, 2009 2:02:12 PM org.apache.catalina.tribes.membership.McastServiceImpl 
waitForMembers
INFO: Sleeping for 1000 milliseconds to establish cluster membership, start 
level:8
May 6, 2009 2:02:12 PM org.apache.catalina.tribes.io.BufferPool getBufferPool
INFO: Created a buffer pool with max size:104857600 bytes of 
type:org.apache.catalina.tribes.io.BufferPool15Impl
May 6, 2009 2:02:13 PM org.apache.catalina.tribes.membership.McastServiceImpl 
waitForMembers
INFO: Done sleeping, membership established, start level:8
May 6, 2009 2:02:13 PM org.apache.catalina.ha.deploy.FarmWarDeployer start
SEVERE: FarmWarDeployer can only work as host cluster subelement!
May 6, 2009 2:02:13 PM org.apache.coyote.http11.Http11AprProtocol start
INFO: Starting Coyote HTTP/1.1 on http-10.49.64.68-8080
May 6, 2009 2:02:13 PM org.apache.coyote.ajp.AjpAprProtocol start
INFO: Starting Coyote AJP/1.3 on ajp-10.49.64.68-8009
May 6, 2009 2:02:14 PM org.apache.coyote.http11.Http11AprProtocol start
INFO: Starting Coyote HTTP/1.1 on http-10.49.64.68-8443
May 6, 2009 2:02:14 PM org.apache.catalina.startup.Catalina start


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: FarmWarDeployer

2008-07-25 Thread adibak

Hi Ben 
I have a similar issues but i couldn't get it working. I have two servers A
 B
My deployer tag is as below for A. 
 Deployer className=org.apache.catalina.cluster.deploy.FarmWarDeployer
  tempDir=/temp/
  deployDir=/webapps/
  watchDir=/webapps/
  watchEnabled=true/  !-- This is set to false on
Server B--

I assume that the dir i mentioned in the above tag will be relative to
CATILINA_HOME. 

Suggestion please how u resolved. it. 

thanks 
- Aditya




benshort wrote:
 
 Ok I got it all working.
 
 The server.xml supplied with tomcat 5.5 is slightly misleading IMO.
 
 Deployer className=org.apache.catalina.cluster.deploy.FarmWarDeployer
   tempDir=/tmp/war-temp/
   deployDir=/tmp/war-deploy/
   watchDir=/tmp/war-listen/
   watchEnabled=false/
 
 I assumed that the deployDir could be anywhere as long as it was
 accessible to the tomcat user. But after searching nabble I tried
 setting it to the webapps dir and it all sprung into life.
 
 On 5/30/07, ben short [EMAIL PROTECTED] wrote:
 Hi,

 After reviewing the cluster-howto [1] I have noticed a few bits I have
 forgotten to configure.

 Namely

 # Make sure your web.xml has the distributable/ element or set at
 your Context distributable=true /
 # Make sure that jvmRoute attribute is set at your Engine Engine
 name=Catalina jvmRoute=node01 

 [1] http://tomcat.apache.org/tomcat-5.5-doc/cluster-howto.html

 On 5/30/07, ben short [EMAIL PROTECTED] wrote:
  Hi,
 
  I'm trying to setup a cluster of two tomcats and use the
 
  Tomcat 1 server.conf
 
Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster
 
  managerClassName=org.apache.catalina.cluster.session.DeltaManager
   expireSessionsOnShutdown=false
   useDirtyFlag=true
   notifyListenersOnReplication=true
 
  Membership
 
 className=org.apache.catalina.cluster.mcast.McastService
  mcastAddr=228.0.0.4
  mcastPort=45564
  mcastFrequency=500
  mcastDropTime=3000/
 
  Receiver
 
 className=org.apache.catalina.cluster.tcp.ReplicationListener
  tcpListenAddress=192.168.6.175
  tcpListenPort=4001
  tcpSelectorTimeout=100
  tcpThreadCount=6/
 
  Sender
 
  className=org.apache.catalina.cluster.tcp.ReplicationTransmitter
  replicationMode=pooled
  ackTimeout=15000
  waitForAck=true/
 
  Valve
 className=org.apache.catalina.cluster.tcp.ReplicationValve
 
 
 filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;/
 
  Deployer
  className=org.apache.catalina.cluster.deploy.FarmWarDeployer
tempDir=/home/tomcat/war-temp/
deployDir=/home/tomcat/war-deploy/
watchDir=/home/tomcat/war-listen/
watchEnabled=false/
 
  ClusterListener
 
 className=org.apache.catalina.cluster.session.ClusterSessionListener/
  /Cluster
 
 
  Tomcat 2 server.conf
 
Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster
 
  managerClassName=org.apache.catalina.cluster.session.DeltaManager
   expireSessionsOnShutdown=false
   useDirtyFlag=true
   notifyListenersOnReplication=true
 
  Membership
 
 className=org.apache.catalina.cluster.mcast.McastService
  mcastAddr=228.0.0.4
  mcastPort=45564
  mcastFrequency=500
  mcastDropTime=3000/
 
  Receiver
 
 className=org.apache.catalina.cluster.tcp.ReplicationListener
  tcpListenAddress=192.168.6.103
  tcpListenPort=4001
  tcpSelectorTimeout=100
  tcpThreadCount=6/
 
  Sender
 
  className=org.apache.catalina.cluster.tcp.ReplicationTransmitter
  replicationMode=pooled
  ackTimeout=15000
  waitForAck=true/
 
  Valve
 className=org.apache.catalina.cluster.tcp.ReplicationValve
 
 
 filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;/
 
  Deployer
  className=org.apache.catalina.cluster.deploy.FarmWarDeployer
tempDir=/home/tomcat/war-temp/
deployDir=/home/tomcat/war-deploy/
watchDir=/home/tomcat/war-listen/
watchEnabled=false/
 
  ClusterListener
 
 className=org.apache.catalina.cluster.session.ClusterSessionListener/
  /Cluster
 
 
  I configured it so that only tomcat 1 can deploy new webapps via the
  FarmWarDeployer

Problem with FarmWarDeployer

2008-06-09 Thread Vicente Tarín Font

Hi guys!

I have a little problem with the FarmWarDeployer. Im using Tomcat 6.0.16
(win32), and I have 2 instances on the same machine. All is working ok
except when I try to deploy a war file.=20

I have this cluster config(this is for node 2, node 1 only changes ports =
and
dirs):

Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster

Manager className=org.apache.catalina.ha.session.BackupManager
expireSessionsOnShutdown=false
notifyListenersOnReplication=true
mapSendOptions=8/

Deployer className=org.apache.catalina.ha.deploy.FarmWarDeployer
tempDir=C:/Archivos de programa/Apache Software
Foundation/Cluster/N2/temp/war-temp/
deployDir=C:/Archivos de programa/Apache Software
Foundation/Cluster/N2/webapps/
watchDir=C:/Archivos de programa/Apache Software
Foundation/Cluster/N2/temp/war-listen/
watchEnabled=true/


Channel className=org.apache.catalina.tribes.group.GroupChannel
Sender
className=org.apache.catalina.tribes.transport.ReplicationTransmitter=

Transport
className=org.apache.catalina.tribes.transport.nio.PooledParallelSende=
r
timeout=15000/   /Sender
/Channel
/Cluster

I drop the war on node 1 dir:
C:/Archivos de programa/Apache Software
Foundation/Cluster/N2/temp/war-listen

The FarmDeployer listener detects the change and deploys the war ok on =
node 1, but I fails deploying on node 2, I get this message:

09-jun-2008 8:38:07 org.apache.catalina.ha.deploy.FarmWarDeployer
messageReceived
GRAVE: Unable to read farm deploy file message.
java.io.IOException: Write error
at java.io.FileOutputStream.writeBytes(Native Method)
at java.io.FileOutputStream.write(FileOutputStream.java:260)
at
org.apache.catalina.ha.deploy.FileMessageFactory.writeMessage(FileMessage=
Fac
tory.java:209)
at
org.apache.catalina.ha.deploy.FarmWarDeployer.messageReceived(FarmWarDepl=
oye
r.java:233)
at
org.apache.catalina.ha.tcp.SimpleTcpCluster.messageReceived(SimpleTcpClus=
ter
.java:899)
at
org.apache.catalina.ha.tcp.SimpleTcpCluster.messageReceived(SimpleTcpClus=
ter
.java:880)
at
org.apache.catalina.tribes.group.GroupChannel.messageReceived(GroupChanne=
l.j
ava:269)
at
org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(C=
han
nelInterceptorBase.java:79)
at
org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(C=
han
nelInterceptorBase.java:79)
at
org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.messageR=
ece
ived(TcpFailureDetector.java:110)
at
org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(C=
han
nelInterceptorBase.java:79)
at
org.apache.catalina.tribes.group.ChannelCoordinator.messageReceived(Chann=
elC
oordinator.java:241)
at
org.apache.catalina.tribes.transport.ReceiverBase.messageDataReceived(Rec=
eiv
erBase.java:225)
at
org.apache.catalina.tribes.transport.nio.NioReplicationTask.drainChannel(=
Nio
ReplicationTask.java:188)
at
org.apache.catalina.tribes.transport.nio.NioReplicationTask.run(NioReplic=
ati
onTask.java:91)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor=
.ja
va:885)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.jav=
a:9
07)
at java.lang.Thread.run(Thread.java:619)

09-jun-2008 8:38:07 org.apache.catalina.startup.HostConfig deployWAR
INFO: Despliegue del archivo prueba1.war de la aplicaci=F3n web
09-jun-2008 8:38:07 org.apache.catalina.startup.ContextConfig init
GRAVE: Exception fixing docBase: {0}=20
java.util.zip.ZipException: invalid END header (bad central directory
offset)
at java.util.zip.ZipFile.open(Native Method) ...


I think Tomcat is trying to deploy the file when it is still being = written
, but I dont know how to fix that, maybe I can change a timeout attr or
something? Ive tried setting  backgroundProcessorDelay to 60, but it =
doesn=92t solve the problem.

Please help me!

 

__ Información de ESET NOD32 Antivirus, versión de la base de firmas
de virus 2945 (20080313) __

ESET NOD32 Antivirus ha comprobado este mensaje.
http://www.eset.com
 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem with FarmWarDeployer

2008-06-09 Thread Filip Hanik - Dev Lists
no work has been done on the farm deployer, and I can't say it has been 
working reliably in 5.5 and 6.0

work and patches are welcome

Filip

Vicente Tarín Font wrote:

Hi guys!

I have a little problem with the FarmWarDeployer. Im using Tomcat 6.0.16
(win32), and I have 2 instances on the same machine. All is working ok
except when I try to deploy a war file.=20

I have this cluster config(this is for node 2, node 1 only changes ports =
and
dirs):

Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster

Manager className=org.apache.catalina.ha.session.BackupManager
expireSessionsOnShutdown=false
notifyListenersOnReplication=true
mapSendOptions=8/

Deployer className=org.apache.catalina.ha.deploy.FarmWarDeployer
tempDir=C:/Archivos de programa/Apache Software
Foundation/Cluster/N2/temp/war-temp/
deployDir=C:/Archivos de programa/Apache Software
Foundation/Cluster/N2/webapps/
watchDir=C:/Archivos de programa/Apache Software
Foundation/Cluster/N2/temp/war-listen/
watchEnabled=true/


Channel className=org.apache.catalina.tribes.group.GroupChannel
Sender
className=org.apache.catalina.tribes.transport.ReplicationTransmitter=
  
Transport

className=org.apache.catalina.tribes.transport.nio.PooledParallelSende=
r
timeout=15000/  /Sender
/Channel
/Cluster

I drop the war on node 1 dir:
C:/Archivos de programa/Apache Software
Foundation/Cluster/N2/temp/war-listen

The FarmDeployer listener detects the change and deploys the war ok on =
node 1, but I fails deploying on node 2, I get this message:

09-jun-2008 8:38:07 org.apache.catalina.ha.deploy.FarmWarDeployer
messageReceived
GRAVE: Unable to read farm deploy file message.
java.io.IOException: Write error
at java.io.FileOutputStream.writeBytes(Native Method)
at java.io.FileOutputStream.write(FileOutputStream.java:260)
at
org.apache.catalina.ha.deploy.FileMessageFactory.writeMessage(FileMessage=
Fac
tory.java:209)
at
org.apache.catalina.ha.deploy.FarmWarDeployer.messageReceived(FarmWarDepl=
oye
r.java:233)
at
org.apache.catalina.ha.tcp.SimpleTcpCluster.messageReceived(SimpleTcpClus=
ter
.java:899)
at
org.apache.catalina.ha.tcp.SimpleTcpCluster.messageReceived(SimpleTcpClus=
ter
.java:880)
at
org.apache.catalina.tribes.group.GroupChannel.messageReceived(GroupChanne=
l.j
ava:269)
at
org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(C=
han
nelInterceptorBase.java:79)
at
org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(C=
han
nelInterceptorBase.java:79)
at
org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.messageR=
ece
ived(TcpFailureDetector.java:110)
at
org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(C=
han
nelInterceptorBase.java:79)
at
org.apache.catalina.tribes.group.ChannelCoordinator.messageReceived(Chann=
elC
oordinator.java:241)
at
org.apache.catalina.tribes.transport.ReceiverBase.messageDataReceived(Rec=
eiv
erBase.java:225)
at
org.apache.catalina.tribes.transport.nio.NioReplicationTask.drainChannel(=
Nio
ReplicationTask.java:188)
at
org.apache.catalina.tribes.transport.nio.NioReplicationTask.run(NioReplic=
ati
onTask.java:91)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor=
.ja
va:885)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.jav=
a:9
07)
at java.lang.Thread.run(Thread.java:619)

09-jun-2008 8:38:07 org.apache.catalina.startup.HostConfig deployWAR
INFO: Despliegue del archivo prueba1.war de la aplicaci=F3n web
09-jun-2008 8:38:07 org.apache.catalina.startup.ContextConfig init
GRAVE: Exception fixing docBase: {0}=20
java.util.zip.ZipException: invalid END header (bad central directory
offset)
at java.util.zip.ZipFile.open(Native Method) ...


I think Tomcat is trying to deploy the file when it is still being = written
, but I dont know how to fix that, maybe I can change a timeout attr or
something? Ive tried setting  backgroundProcessorDelay to 60, but it =
doesn=92t solve the problem.

Please help me!

 


__ Información de ESET NOD32 Antivirus, versión de la base de firmas
de virus 2945 (20080313) __

ESET NOD32 Antivirus ha comprobado este mensaje.
http://www.eset.com
 



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FarmWarDeployer

2007-05-31 Thread ben short

Ok I got it all working.

The server.xml supplied with tomcat 5.5 is slightly misleading IMO.

Deployer className=org.apache.catalina.cluster.deploy.FarmWarDeployer
 tempDir=/tmp/war-temp/
 deployDir=/tmp/war-deploy/
 watchDir=/tmp/war-listen/
 watchEnabled=false/

I assumed that the deployDir could be anywhere as long as it was
accessible to the tomcat user. But after searching nabble I tried
setting it to the webapps dir and it all sprung into life.

On 5/30/07, ben short [EMAIL PROTECTED] wrote:

Hi,

After reviewing the cluster-howto [1] I have noticed a few bits I have
forgotten to configure.

Namely

# Make sure your web.xml has the distributable/ element or set at
your Context distributable=true /
# Make sure that jvmRoute attribute is set at your Engine Engine
name=Catalina jvmRoute=node01 

[1] http://tomcat.apache.org/tomcat-5.5-doc/cluster-howto.html

On 5/30/07, ben short [EMAIL PROTECTED] wrote:
 Hi,

 I'm trying to setup a cluster of two tomcats and use the

 Tomcat 1 server.conf

   Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster

 managerClassName=org.apache.catalina.cluster.session.DeltaManager
  expireSessionsOnShutdown=false
  useDirtyFlag=true
  notifyListenersOnReplication=true

 Membership
 className=org.apache.catalina.cluster.mcast.McastService
 mcastAddr=228.0.0.4
 mcastPort=45564
 mcastFrequency=500
 mcastDropTime=3000/

 Receiver
 
className=org.apache.catalina.cluster.tcp.ReplicationListener
 tcpListenAddress=192.168.6.175
 tcpListenPort=4001
 tcpSelectorTimeout=100
 tcpThreadCount=6/

 Sender

 className=org.apache.catalina.cluster.tcp.ReplicationTransmitter
 replicationMode=pooled
 ackTimeout=15000
 waitForAck=true/

 Valve 
className=org.apache.catalina.cluster.tcp.ReplicationValve

 filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;/

 Deployer
 className=org.apache.catalina.cluster.deploy.FarmWarDeployer
   tempDir=/home/tomcat/war-temp/
   deployDir=/home/tomcat/war-deploy/
   watchDir=/home/tomcat/war-listen/
   watchEnabled=false/

 ClusterListener
 className=org.apache.catalina.cluster.session.ClusterSessionListener/
 /Cluster


 Tomcat 2 server.conf

   Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster

 managerClassName=org.apache.catalina.cluster.session.DeltaManager
  expireSessionsOnShutdown=false
  useDirtyFlag=true
  notifyListenersOnReplication=true

 Membership
 className=org.apache.catalina.cluster.mcast.McastService
 mcastAddr=228.0.0.4
 mcastPort=45564
 mcastFrequency=500
 mcastDropTime=3000/

 Receiver
 
className=org.apache.catalina.cluster.tcp.ReplicationListener
 tcpListenAddress=192.168.6.103
 tcpListenPort=4001
 tcpSelectorTimeout=100
 tcpThreadCount=6/

 Sender

 className=org.apache.catalina.cluster.tcp.ReplicationTransmitter
 replicationMode=pooled
 ackTimeout=15000
 waitForAck=true/

 Valve 
className=org.apache.catalina.cluster.tcp.ReplicationValve

 filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;/

 Deployer
 className=org.apache.catalina.cluster.deploy.FarmWarDeployer
   tempDir=/home/tomcat/war-temp/
   deployDir=/home/tomcat/war-deploy/
   watchDir=/home/tomcat/war-listen/
   watchEnabled=false/

 ClusterListener
 className=org.apache.catalina.cluster.session.ClusterSessionListener/
 /Cluster


 I configured it so that only tomcat 1 can deploy new webapps via the
 FarmWarDeployer mechanism.

 When I upload my war to the watchDir i see the following messages in
 catalina.log.

 INFO: check cluster wars at /home/tomcat/war-listen
 30-May-2007 13:07:37
 org.apache.catalina.cluster.deploy.FarmWarDeployer fileModified
 INFO: Installing webapp[] from /home/tomcat/war-deploy/ROOT.war
 30-May-2007 13:07:37 org.apache.catalina.cluster.deploy.FarmWarDeployer remove
 INFO: Cluster wide remove of web app
 30-May-2007 13:07:59 org.apache.catalina.cluster.deploy.WarWatcher check

 The ROOT.war is in tomcat 1 and tomcat 2 deployDir, but is not in
 either tomcats manager app or accessible via the webapps url.

 Can anyone give me some help with getting this going?

 Regards

 Ben

FarmWarDeployer

2007-05-30 Thread ben short

Hi,

I'm trying to setup a cluster of two tomcats and use the

Tomcat 1 server.conf

 Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster

managerClassName=org.apache.catalina.cluster.session.DeltaManager
expireSessionsOnShutdown=false
useDirtyFlag=true
notifyListenersOnReplication=true

   Membership
   className=org.apache.catalina.cluster.mcast.McastService
   mcastAddr=228.0.0.4
   mcastPort=45564
   mcastFrequency=500
   mcastDropTime=3000/

   Receiver
   className=org.apache.catalina.cluster.tcp.ReplicationListener
   tcpListenAddress=192.168.6.175
   tcpListenPort=4001
   tcpSelectorTimeout=100
   tcpThreadCount=6/

   Sender

className=org.apache.catalina.cluster.tcp.ReplicationTransmitter
   replicationMode=pooled
   ackTimeout=15000
   waitForAck=true/

   Valve className=org.apache.catalina.cluster.tcp.ReplicationValve

filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;/

   Deployer
className=org.apache.catalina.cluster.deploy.FarmWarDeployer
 tempDir=/home/tomcat/war-temp/
 deployDir=/home/tomcat/war-deploy/
 watchDir=/home/tomcat/war-listen/
 watchEnabled=false/

   ClusterListener
className=org.apache.catalina.cluster.session.ClusterSessionListener/
   /Cluster


Tomcat 2 server.conf

 Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster

managerClassName=org.apache.catalina.cluster.session.DeltaManager
expireSessionsOnShutdown=false
useDirtyFlag=true
notifyListenersOnReplication=true

   Membership
   className=org.apache.catalina.cluster.mcast.McastService
   mcastAddr=228.0.0.4
   mcastPort=45564
   mcastFrequency=500
   mcastDropTime=3000/

   Receiver
   className=org.apache.catalina.cluster.tcp.ReplicationListener
   tcpListenAddress=192.168.6.103
   tcpListenPort=4001
   tcpSelectorTimeout=100
   tcpThreadCount=6/

   Sender

className=org.apache.catalina.cluster.tcp.ReplicationTransmitter
   replicationMode=pooled
   ackTimeout=15000
   waitForAck=true/

   Valve className=org.apache.catalina.cluster.tcp.ReplicationValve

filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;/

   Deployer
className=org.apache.catalina.cluster.deploy.FarmWarDeployer
 tempDir=/home/tomcat/war-temp/
 deployDir=/home/tomcat/war-deploy/
 watchDir=/home/tomcat/war-listen/
 watchEnabled=false/

   ClusterListener
className=org.apache.catalina.cluster.session.ClusterSessionListener/
   /Cluster


I configured it so that only tomcat 1 can deploy new webapps via the
FarmWarDeployer mechanism.

When I upload my war to the watchDir i see the following messages in
catalina.log.

INFO: check cluster wars at /home/tomcat/war-listen
30-May-2007 13:07:37
org.apache.catalina.cluster.deploy.FarmWarDeployer fileModified
INFO: Installing webapp[] from /home/tomcat/war-deploy/ROOT.war
30-May-2007 13:07:37 org.apache.catalina.cluster.deploy.FarmWarDeployer remove
INFO: Cluster wide remove of web app
30-May-2007 13:07:59 org.apache.catalina.cluster.deploy.WarWatcher check

The ROOT.war is in tomcat 1 and tomcat 2 deployDir, but is not in
either tomcats manager app or accessible via the webapps url.

Can anyone give me some help with getting this going?

Regards

Ben Short

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FarmWarDeployer

2007-05-30 Thread ben short

Hi,

After reviewing the cluster-howto [1] I have noticed a few bits I have
forgotten to configure.

Namely

# Make sure your web.xml has the distributable/ element or set at
your Context distributable=true /
# Make sure that jvmRoute attribute is set at your Engine Engine
name=Catalina jvmRoute=node01 

[1] http://tomcat.apache.org/tomcat-5.5-doc/cluster-howto.html

On 5/30/07, ben short [EMAIL PROTECTED] wrote:

Hi,

I'm trying to setup a cluster of two tomcats and use the

Tomcat 1 server.conf

  Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster

managerClassName=org.apache.catalina.cluster.session.DeltaManager
 expireSessionsOnShutdown=false
 useDirtyFlag=true
 notifyListenersOnReplication=true

Membership
className=org.apache.catalina.cluster.mcast.McastService
mcastAddr=228.0.0.4
mcastPort=45564
mcastFrequency=500
mcastDropTime=3000/

Receiver
className=org.apache.catalina.cluster.tcp.ReplicationListener
tcpListenAddress=192.168.6.175
tcpListenPort=4001
tcpSelectorTimeout=100
tcpThreadCount=6/

Sender

className=org.apache.catalina.cluster.tcp.ReplicationTransmitter
replicationMode=pooled
ackTimeout=15000
waitForAck=true/

Valve className=org.apache.catalina.cluster.tcp.ReplicationValve

filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;/

Deployer
className=org.apache.catalina.cluster.deploy.FarmWarDeployer
  tempDir=/home/tomcat/war-temp/
  deployDir=/home/tomcat/war-deploy/
  watchDir=/home/tomcat/war-listen/
  watchEnabled=false/

ClusterListener
className=org.apache.catalina.cluster.session.ClusterSessionListener/
/Cluster


Tomcat 2 server.conf

  Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster

managerClassName=org.apache.catalina.cluster.session.DeltaManager
 expireSessionsOnShutdown=false
 useDirtyFlag=true
 notifyListenersOnReplication=true

Membership
className=org.apache.catalina.cluster.mcast.McastService
mcastAddr=228.0.0.4
mcastPort=45564
mcastFrequency=500
mcastDropTime=3000/

Receiver
className=org.apache.catalina.cluster.tcp.ReplicationListener
tcpListenAddress=192.168.6.103
tcpListenPort=4001
tcpSelectorTimeout=100
tcpThreadCount=6/

Sender

className=org.apache.catalina.cluster.tcp.ReplicationTransmitter
replicationMode=pooled
ackTimeout=15000
waitForAck=true/

Valve className=org.apache.catalina.cluster.tcp.ReplicationValve

filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;/

Deployer
className=org.apache.catalina.cluster.deploy.FarmWarDeployer
  tempDir=/home/tomcat/war-temp/
  deployDir=/home/tomcat/war-deploy/
  watchDir=/home/tomcat/war-listen/
  watchEnabled=false/

ClusterListener
className=org.apache.catalina.cluster.session.ClusterSessionListener/
/Cluster


I configured it so that only tomcat 1 can deploy new webapps via the
FarmWarDeployer mechanism.

When I upload my war to the watchDir i see the following messages in
catalina.log.

INFO: check cluster wars at /home/tomcat/war-listen
30-May-2007 13:07:37
org.apache.catalina.cluster.deploy.FarmWarDeployer fileModified
INFO: Installing webapp[] from /home/tomcat/war-deploy/ROOT.war
30-May-2007 13:07:37 org.apache.catalina.cluster.deploy.FarmWarDeployer remove
INFO: Cluster wide remove of web app
30-May-2007 13:07:59 org.apache.catalina.cluster.deploy.WarWatcher check

The ROOT.war is in tomcat 1 and tomcat 2 deployDir, but is not in
either tomcats manager app or accessible via the webapps url.

Can anyone give me some help with getting this going?

Regards

Ben Short



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FarmWarDeployer ROOT.war - / - How to?

2006-04-01 Thread Peter Rossbach
Yes, not a nice feature change: -:( But the deployment system at  
tomcat 5.5 has changed a lot, and I switch to easier way to get  
FarmWarDeployer up and running (Tomcat 5.5.5 Release 12/04).
Last year nobody of the community ask for the separate depoyDir  
feature and so this was not at my top prio list.


My missing feature list at FarmWarDeployer
-   support for Engine level configuration that we support multiple hosts
-   separate deployDir from host appBase dir
-   control application activation
		currently all application start a very strange way when async  
sender is used.

-   give the user the changes that sessions are exists after redeployment!
-  JMX Support

I am now fix the ROOT.war bug. I hope Tim and Filip can test it with  
svn head.


Thanks
Peter


Am 31.03.2006 um 23:40 schrieb Filip Hanik - Dev Lists:


Tim Lucia Wrote:


and a more recent post from Peter Rossbach saying that it SHOULD  
be the

appBase.

[http://marc.theaimsgroup.com/?l=tomcat-userm=113828526109819w=2]


On Thursday 26 Jan 2006 11:33, Peter Rossbach wrote:


Please, set the deployDir to your webapps dir.
Peter

ha ha, :) Peter has a habit of changing underlying functionality to  
new functionality, but provide no backwards compatibility. Earlier,  
the FarmWarDeploy used to deploy remote .war files that were  
located in any directory. (ie deployDir)
Peter has changed this functionlity, that you now must deploy into  
the appBase dir, definitely a functionality I don't like and would  
have -1 if I had caught the change.


Filip

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



FarmWarDeployer ROOT.war - / - How to?

2006-03-31 Thread Tim Lucia
Hi All,

(This one is probably a Filip question...)

I have a 3-node cluster on Red Hat (2.6.9+ kernel) and I wish to use the
FarmWarDeployer.  I have (of course!) RTFM and STFW and both have been
extremely helpful.  I did note an old (2004-ish) post to this list from
Filip saying that the deployDir SHOULD NOT be the host's appBase

[http://servlets.com/archive/servlet/ReadMsg?msgId=486921listName=tomcat-us
er]
From: Filip Hanik - Dev [EMAIL PROTECTED]
Subject: Re: cluster FarmWarDeployer
Date: Fri, 17 Sep 2004 16:32:27 -0500

- should the deploy dir point to the webapp directory?
no it should not, cause you would double deploy your app, and that is 
why
you get an error

but that seemed to only copy the war

no, it deployed it, just didn't expand it, there is no reason to expand 
it

Filip

and a more recent post from Peter Rossbach saying that it SHOULD be the
appBase.

[http://marc.theaimsgroup.com/?l=tomcat-userm=113828526109819w=2]
On Thursday 26 Jan 2006 11:33, Peter Rossbach wrote:
 Please, set the deployDir to your webapps dir.
 Peter

The latter appears to work for wars named other then ROOT.war.  Of course
ROOT.war works properly when autoDeploy'ed via copying directly into
appBase, or when uploading via the manager.  I can successfully deploy an
application named 'tim.war' across my cluster by dropping it into
/tmp/war-listen on the node with watchEnabled=true.

My problem comes when trying to perform a cluster-wide deployment of the
default application.  If I name it ROOT.war, I get / on the master, and
/ + /ROOT on each of the slaves.  One other suggestion was to simply
name it .war
[http://marc.theaimsgroup.com/?l=tomcat-userm=111768929520032w=2] but this
caused the following:

2006-03-31 15:10:02,446
[org.apache.catalina.cluster.tcp.TcpReplicationThread[2]] INFO  HostConfig
: Deploying web application archive .war
2006-03-31 15:10:02,491
[org.apache.catalina.cluster.tcp.TcpReplicationThread[2]] INFO
ContextConfig : Missing application web.xml, using defaults only
StandardEngine[Catalina].StandardHost[localhost].StandardContext[/]

Which is no good either.

Here is my Deployer element, if it matters at all (this is from a slave)

Deployer
className=org.apache.catalina.cluster.deploy.FarmWarDeployer
  tempDir=/tmp/war-temp/
  deployDir=/usr/local/tomcat/webapps/
  watchDir=/tmp/war-listen/
  watchEnabled=false/

What's the official party line on deploying in this manner to /?


Thanks,
Tim


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: FarmWarDeployer ROOT.war - / - How to?

2006-03-31 Thread Tim Lucia
That's what I am saying.  I have a context.xml in my META-INF -- it looks
like this:

Context
  reloadable=true

  !-- Define the admin2 database as a JNDI-enabled DataSource.  --
  Resource
name=jdbc/admin2
type=javax.sql.DataSource
driverClassName=oracle.jdbc.driver.OracleDriver
url=jdbc:oracle:thin:@blah.blah.blah:1521:admin2
username=blah
password=blah
validationQuery=SELECT COUNT(*) FROM DUAL
initialSize=10
defaultCatalog=admin2
maxIdle=20
maxWait=5000
maxActive=50/ 
  Environment 
description=Host name (FQDN) of blah Server 
name=host 
override=false 
type=java.lang.String 
value=blah.blah.blah/ 

/Context 

I forgot to mention - tomcat 5.5.12 / JDK 1.5.0_06 -- I am leery of moving
forward given the recent banter about .16...

Oh, and while I am at it, undeploying the context (empty) created by
deploying .war DELETES MY webapps DIRECTORY!  That can't be good either.

Thanks,
Tim



-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 31, 2006 3:35 PM
To: Tomcat Users List
Subject: Re: FarmWarDeployer ROOT.war - / - How to?

so you are saying its all working except that on a slave you get two
contexts, / and /ROOT?

have you tried putting a context.xml inside the META-INF directory? 
maybe that will solve the problem?
otherwise, I am sure its a bug and I would have to research it a little bit
further.

Filip


Tim Lucia wrote:
 Hi All,

 (This one is probably a Filip question...)

 I have a 3-node cluster on Red Hat (2.6.9+ kernel) and I wish to use 
 the FarmWarDeployer.  I have (of course!) RTFM and STFW and both have 
 been extremely helpful.  I did note an old (2004-ish) post to this 
 list from Filip saying that the deployDir SHOULD NOT be the host's 
 appBase

 [http://servlets.com/archive/servlet/ReadMsg?msgId=486921listName=tom
 cat-us
 er]
   
 From: Filip Hanik - Dev [EMAIL PROTECTED]
 Subject: Re: cluster FarmWarDeployer
 Date: Fri, 17 Sep 2004 16:32:27 -0500

 
 - should the deploy dir point to the webapp directory?
   
 no it should not, cause you would double deploy your app, and that is 
 why
 
 you get an error
   
 but that seemed to only copy the war
   
 no, it deployed it, just didn't expand it, there is no reason to 
 expand it

 Filip
 

 and a more recent post from Peter Rossbach saying that it SHOULD be 
 the appBase.

 [http://marc.theaimsgroup.com/?l=tomcat-userm=113828526109819w=2]
   
 On Thursday 26 Jan 2006 11:33, Peter Rossbach wrote:
 
 Please, set the deployDir to your webapps dir.
 Peter
   

 The latter appears to work for wars named other then ROOT.war.  Of 
 course ROOT.war works properly when autoDeploy'ed via copying directly 
 into appBase, or when uploading via the manager.  I can successfully 
 deploy an application named 'tim.war' across my cluster by dropping it 
 into /tmp/war-listen on the node with watchEnabled=true.

 My problem comes when trying to perform a cluster-wide deployment of 
 the default application.  If I name it ROOT.war, I get / on the 
 master, and / + /ROOT on each of the slaves.  One other suggestion 
 was to simply name it .war
 [http://marc.theaimsgroup.com/?l=tomcat-userm=111768929520032w=2] 
 but this caused the following:

 2006-03-31 15:10:02,446
 [org.apache.catalina.cluster.tcp.TcpReplicationThread[2]] INFO  
 HostConfig
 : Deploying web application archive .war
 2006-03-31 15:10:02,491
 [org.apache.catalina.cluster.tcp.TcpReplicationThread[2]] INFO
 ContextConfig : Missing application web.xml, using defaults
only
 StandardEngine[Catalina].StandardHost[localhost].StandardContext[/]

 Which is no good either.

 Here is my Deployer element, if it matters at all (this is from a 
 slave)

 Deployer
 className=org.apache.catalina.cluster.deploy.FarmWarDeployer
   tempDir=/tmp/war-temp/
   deployDir=/usr/local/tomcat/webapps/
   watchDir=/tmp/war-listen/
   watchEnabled=false/

 What's the official party line on deploying in this manner to /?


 Thanks,
 Tim


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

   


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: FarmWarDeployer ROOT.war - / - How to?

2006-03-31 Thread Tim Lucia
I saw that one as suggestion (.war) in this group ;-)  There was also an
article about the path being ignored.  As I understand it, the path should
be ignored for a tim.war, and it should be deployed as /tim.

Adding path= to the context does not change the behavior.  

Tim
 

-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 31, 2006 4:04 PM
To: Tomcat Users List
Subject: Re: FarmWarDeployer ROOT.war - / - How to?

two things:

1. I don't see that you specified path= in your Context element, I would
try that.
2. Deleting a .war deletes webapps directory, yeah, you can call that a
pretty big oops! if you open a bugzilla item I will be happy to fix that, I
of course never thought anyone would use .war as an actual deployed file.

Filip

Tim Lucia wrote:
 That's what I am saying.  I have a context.xml in my META-INF -- it 
 looks like this:

 Context
   reloadable=true

   !-- Define the admin2 database as a JNDI-enabled DataSource.  --
   Resource
 name=jdbc/admin2
 type=javax.sql.DataSource
 driverClassName=oracle.jdbc.driver.OracleDriver
 url=jdbc:oracle:thin:@blah.blah.blah:1521:admin2
 username=blah
 password=blah
 validationQuery=SELECT COUNT(*) FROM DUAL
 initialSize=10
 defaultCatalog=admin2
 maxIdle=20
 maxWait=5000
 maxActive=50/ 
   Environment 
 description=Host name (FQDN) of blah Server 
 name=host 
 override=false 
 type=java.lang.String 
 value=blah.blah.blah/
 
 /Context

 I forgot to mention - tomcat 5.5.12 / JDK 1.5.0_06 -- I am leery of 
 moving forward given the recent banter about .16...

 Oh, and while I am at it, undeploying the context (empty) created by 
 deploying .war DELETES MY webapps DIRECTORY!  That can't be good either.

 Thanks,
 Tim



 -Original Message-
 From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
 Sent: Friday, March 31, 2006 3:35 PM
 To: Tomcat Users List
 Subject: Re: FarmWarDeployer ROOT.war - / - How to?

 so you are saying its all working except that on a slave you get two 
 contexts, / and /ROOT?

 have you tried putting a context.xml inside the META-INF directory? 
 maybe that will solve the problem?
 otherwise, I am sure its a bug and I would have to research it a 
 little bit further.

 Filip


 Tim Lucia wrote:
   
 Hi All,

 (This one is probably a Filip question...)

 I have a 3-node cluster on Red Hat (2.6.9+ kernel) and I wish to use 
 the FarmWarDeployer.  I have (of course!) RTFM and STFW and both have 
 been extremely helpful.  I did note an old (2004-ish) post to this 
 list from Filip saying that the deployDir SHOULD NOT be the host's 
 appBase

 [http://servlets.com/archive/servlet/ReadMsg?msgId=486921listName=to
 m
 cat-us
 er]
   
 
 From: Filip Hanik - Dev [EMAIL PROTECTED]
 Subject: Re: cluster FarmWarDeployer
 Date: Fri, 17 Sep 2004 16:32:27 -0500

 
   
 - should the deploy dir point to the webapp directory?
   
 
 no it should not, cause you would double deploy your app, and that 
 is why
 
   
 you get an error
   
 
 but that seemed to only copy the war
   
 
 no, it deployed it, just didn't expand it, there is no reason to 
 expand it

 Filip
 
   
 and a more recent post from Peter Rossbach saying that it SHOULD be 
 the appBase.

 [http://marc.theaimsgroup.com/?l=tomcat-userm=113828526109819w=2]
   
 
 On Thursday 26 Jan 2006 11:33, Peter Rossbach wrote:
 
   
 Please, set the deployDir to your webapps dir.
 Peter
   
 
 The latter appears to work for wars named other then ROOT.war.  Of 
 course ROOT.war works properly when autoDeploy'ed via copying 
 directly into appBase, or when uploading via the manager.  I can 
 successfully deploy an application named 'tim.war' across my cluster 
 by dropping it into /tmp/war-listen on the node with watchEnabled=true.

 My problem comes when trying to perform a cluster-wide deployment of 
 the default application.  If I name it ROOT.war, I get / on the 
 master, and / + /ROOT on each of the slaves.  One other 
 suggestion was to simply name it .war
 [http://marc.theaimsgroup.com/?l=tomcat-userm=111768929520032w=2]
 but this caused the following:

 2006-03-31 15:10:02,446
 [org.apache.catalina.cluster.tcp.TcpReplicationThread[2]] INFO 
 HostConfig
 : Deploying web application archive .war
 2006-03-31 15:10:02,491
 [org.apache.catalina.cluster.tcp.TcpReplicationThread[2]] INFO
 ContextConfig : Missing application web.xml, using defaults
 
 only
   
 StandardEngine[Catalina].StandardHost[localhost].StandardContext[/]

 Which is no good either.

 Here is my Deployer element, if it matters at all (this is from a
 slave)

 Deployer
 className=org.apache.catalina.cluster.deploy.FarmWarDeployer
   tempDir=/tmp/war-temp/
   deployDir=/usr/local/tomcat/webapps/
   watchDir=/tmp/war-listen

Re: FarmWarDeployer ROOT.war - / - How to?

2006-03-31 Thread David Kerber
Ok, thanks.  After re-reading this thread again, I had just figured that 
out and was going to post a Never mind message, but you beat me to it...



Filip Hanik - Dev Lists wrote:


what you are missing is
the complete file name being .war
ie, only a suffix, no actual file name

Filip


David Kerber wrote:


Filip Hanik - Dev Lists wrote:


two things:

1. I don't see that you specified path= in your Context element, 
I would try that.
2. Deleting a .war deletes webapps directory, yeah, you can call 
that a pretty big oops! if you open a bugzilla item I will be happy 
to fix that, I of course never thought anyone would use .war as an 
actual deployed file.



Jumping in here:

Huh?  I thought the .war was the normal way of deploying an app.  
Unless I'm missing something in this thread...


Dave




Filip

Tim Lucia wrote:

That's what I am saying.  I have a context.xml in my META-INF -- it 
looks

like this:

Context
  reloadable=true

  !-- Define the admin2 database as a JNDI-enabled DataSource.  --
  Resource
name=jdbc/admin2
type=javax.sql.DataSource
driverClassName=oracle.jdbc.driver.OracleDriver
url=jdbc:oracle:thin:@blah.blah.blah:1521:admin2
username=blah
password=blah
validationQuery=SELECT COUNT(*) FROM DUAL
initialSize=10
defaultCatalog=admin2
maxIdle=20
maxWait=5000
maxActive=50/   Environment description=Host name 
(FQDN) of blah Server name=host override=false 
type=java.lang.String value=blah.blah.blah/ /Context
I forgot to mention - tomcat 5.5.12 / JDK 1.5.0_06 -- I am leery of 
moving

forward given the recent banter about .16...

Oh, and while I am at it, undeploying the context (empty) created by
deploying .war DELETES MY webapps DIRECTORY!  That can't be good 
either.


Thanks,
Tim



-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: 
Friday, March 31, 2006 3:35 PM

To: Tomcat Users List
Subject: Re: FarmWarDeployer ROOT.war - / - How to?

so you are saying its all working except that on a slave you get two
contexts, / and /ROOT?

have you tried putting a context.xml inside the META-INF directory? 
maybe that will solve the problem?
otherwise, I am sure its a bug and I would have to research it a 
little bit

further.

Filip


Tim Lucia wrote:
 


Hi All,

(This one is probably a Filip question...)

I have a 3-node cluster on Red Hat (2.6.9+ kernel) and I wish to 
use the FarmWarDeployer.  I have (of course!) RTFM and STFW and 
both have been extremely helpful.  I did note an old (2004-ish) 
post to this list from Filip saying that the deployDir SHOULD NOT 
be the host's appBase


[http://servlets.com/archive/servlet/ReadMsg?msgId=486921listName=tom 


cat-us
er]
   


From: Filip Hanik - Dev [EMAIL PROTECTED]
Subject: Re: cluster FarmWarDeployer
Date: Fri, 17 Sep 2004 16:32:27 -0500

   


- should the deploy dir point to the webapp directory?
  



no it should not, cause you would double deploy your app, and 
that is why
  



you get an error
   


but that seemed to only copy the war
  



no, it deployed it, just didn't expand it, there is no reason to 
expand it


Filip
  



and a more recent post from Peter Rossbach saying that it SHOULD 
be the appBase.


[http://marc.theaimsgroup.com/?l=tomcat-userm=113828526109819w=2]
   


On Thursday 26 Jan 2006 11:33, Peter Rossbach wrote:
   


Please, set the deployDir to your webapps dir.
Peter
  



The latter appears to work for wars named other then ROOT.war.  Of 
course ROOT.war works properly when autoDeploy'ed via copying 
directly into appBase, or when uploading via the manager.  I can 
successfully deploy an application named 'tim.war' across my 
cluster by dropping it into /tmp/war-listen on the node with 
watchEnabled=true.


My problem comes when trying to perform a cluster-wide deployment 
of the default application.  If I name it ROOT.war, I get / on 
the master, and / + /ROOT on each of the slaves.  One other 
suggestion was to simply name it .war
[http://marc.theaimsgroup.com/?l=tomcat-userm=111768929520032w=2] 
but this caused the following:


2006-03-31 15:10:02,446
[org.apache.catalina.cluster.tcp.TcpReplicationThread[2]] INFO  
HostConfig

: Deploying web application archive .war
2006-03-31 15:10:02,491
[org.apache.catalina.cluster.tcp.TcpReplicationThread[2]] INFO
ContextConfig : Missing application web.xml, using 
defaults




only
 


StandardEngine[Catalina].StandardHost[localhost].StandardContext[/]

Which is no good either.

Here is my Deployer element, if it matters at all (this is from a 
slave)


Deployer
className=org.apache.catalina.cluster.deploy.FarmWarDeployer
  tempDir=/tmp/war-temp/
  deployDir=/usr/local/tomcat/webapps/
  watchDir=/tmp/war-listen/
  watchEnabled=false/

What's the official party line on deploying

Re: FarmWarDeployer ROOT.war - / - How to?

2006-03-31 Thread Peter Rossbach
I currently look inside the FarmWarDeployer code and it seems that  
the ROOT case is not handle really well.
 OK, I have tomorrow time to make a really introspection and a test  
the case.


Regards
Peter



Am 31.03.2006 um 23:04 schrieb Filip Hanik - Dev Lists:


two things:

1. I don't see that you specified path= in your Context  
element, I would try that.
2. Deleting a .war deletes webapps directory, yeah, you can call  
that a pretty big oops! if you open a bugzilla item I will be happy  
to fix that, I of course never thought anyone would use .war as an  
actual deployed file.


Filip

Tim Lucia wrote:
That's what I am saying.  I have a context.xml in my META-INF --  
it looks

like this:

Context
  reloadable=true

  !-- Define the admin2 database as a JNDI-enabled DataSource.   
--

  Resource
name=jdbc/admin2
type=javax.sql.DataSource
driverClassName=oracle.jdbc.driver.OracleDriver
url=jdbc:oracle:thin:@blah.blah.blah:1521:admin2
username=blah
password=blah
validationQuery=SELECT COUNT(*) FROM DUAL
initialSize=10
defaultCatalog=admin2
maxIdle=20
maxWait=5000
maxActive=50/   Environment description=Host name  
(FQDN) of blah Server name=host override=false  
type=java.lang.String value=blah.blah.blah/ /Context
I forgot to mention - tomcat 5.5.12 / JDK 1.5.0_06 -- I am leery  
of moving

forward given the recent banter about .16...

Oh, and while I am at it, undeploying the context (empty) created by
deploying .war DELETES MY webapps DIRECTORY!  That can't be good  
either.


Thanks,
Tim



-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent:  
Friday, March 31, 2006 3:35 PM

To: Tomcat Users List
Subject: Re: FarmWarDeployer ROOT.war - / - How to?

so you are saying its all working except that on a slave you get two
contexts, / and /ROOT?

have you tried putting a context.xml inside the META-INF  
directory? maybe that will solve the problem?
otherwise, I am sure its a bug and I would have to research it a  
little bit

further.

Filip


Tim Lucia wrote:


Hi All,

(This one is probably a Filip question...)

I have a 3-node cluster on Red Hat (2.6.9+ kernel) and I wish to  
use the FarmWarDeployer.  I have (of course!) RTFM and STFW and  
both have been extremely helpful.  I did note an old (2004-ish)  
post to this list from Filip saying that the deployDir SHOULD NOT  
be the host's appBase


[http://servlets.com/archive/servlet/ReadMsg? 
msgId=486921listName=tom

cat-us
er]


From: Filip Hanik - Dev [EMAIL PROTECTED]
Subject: Re: cluster FarmWarDeployer
Date: Fri, 17 Sep 2004 16:32:27 -0500



- should the deploy dir point to the webapp directory?

no it should not, cause you would double deploy your app, and  
that is why



you get an error


but that seemed to only copy the war

no, it deployed it, just didn't expand it, there is no reason to  
expand it


Filip

and a more recent post from Peter Rossbach saying that it SHOULD  
be the appBase.


[http://marc.theaimsgroup.com/?l=tomcat-userm=113828526109819w=2]


On Thursday 26 Jan 2006 11:33, Peter Rossbach wrote:


Please, set the deployDir to your webapps dir.
Peter

The latter appears to work for wars named other then ROOT.war.   
Of course ROOT.war works properly when autoDeploy'ed via copying  
directly into appBase, or when uploading via the manager.  I can  
successfully deploy an application named 'tim.war' across my  
cluster by dropping it into /tmp/war-listen on the node with  
watchEnabled=true.


My problem comes when trying to perform a cluster-wide deployment  
of the default application.  If I name it ROOT.war, I get / on  
the master, and / + /ROOT on each of the slaves.  One other  
suggestion was to simply name it .war
[http://marc.theaimsgroup.com/?l=tomcat- 
userm=111768929520032w=2] but this caused the following:


2006-03-31 15:10:02,446
[org.apache.catalina.cluster.tcp.TcpReplicationThread[2]] INFO   
HostConfig

: Deploying web application archive .war
2006-03-31 15:10:02,491
[org.apache.catalina.cluster.tcp.TcpReplicationThread[2]] INFO
ContextConfig : Missing application web.xml, using  
defaults



only


StandardEngine[Catalina].StandardHost[localhost].StandardContext[/]

Which is no good either.

Here is my Deployer element, if it matters at all (this is from a  
slave)


Deployer
className=org.apache.catalina.cluster.deploy.FarmWarDeployer
  tempDir=/tmp/war-temp/
  deployDir=/usr/local/tomcat/webapps/
  watchDir=/tmp/war-listen/
  watchEnabled=false/

What's the official party line on deploying in this manner to /?


Thanks,
Tim


 
-

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL

Re: FarmWarDeployer ROOT.war - / - How to?

2006-03-31 Thread Filip Hanik - Dev Lists

Tim Lucia Wrote:


and a more recent post from Peter Rossbach saying that it SHOULD be the
appBase.

[http://marc.theaimsgroup.com/?l=tomcat-userm=113828526109819w=2]
  

On Thursday 26 Jan 2006 11:33, Peter Rossbach wrote:


Please, set the deployDir to your webapps dir.
Peter
  
ha ha, :) Peter has a habit of changing underlying functionality to new 
functionality, but provide no backwards compatibility. Earlier, the 
FarmWarDeploy used to deploy remote .war files that were located in any 
directory. (ie deployDir)
Peter has changed this functionlity, that you now must deploy into the 
appBase dir, definitely a functionality I don't like and would have -1 
if I had caught the change.


Filip

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FarmWarDeployer instructions

2006-03-22 Thread Edoardo Causarano
Alle Tuesday 21 March 2006 18:05, Filip Hanik - Dev Lists ha scritto:

Thank you Filip, please bear me one more time. I understand that only the 
tomcat cluster master should have a watchDir configured and watchEnabled 
set to true. The deployDir of all tomcat cluster members should point to 
the clustered Host appBase attribute; in case the Cluster element is 
defined on the Service, the directory should be the parent of the enclosed 
Host appBase attributes. Is this correct?

The watchDir doesn't have anything to do with the appBase folders and can be 
exposed using any network filesystem (eg. CIFS, DAV or NFS) as long as the 
tomcat cluster master process can access it. Is this correct?

In order to get the farm deployment running I do not have to download the 
tomcat-deployer package. Right?

If directories don't exist (especially the tempDir) will Tomcat crash and burn 
or silently fail to farm deploy?

e


 only one server should have (watchEnabled=true), this is the location
 where you deploy all your files.
 if you enable it on all servers, then just be careful so that you don't
 deploy the same file in two locations and end up with a deployment
 collission.

 tempDir=/tmp/war-temp/ -- The directory the deployer uses to assemble
 file transfers
 deployDir=/tmp/war-deploy/ -- the directory where the deployer
 deploys the WAR file to
 watchDir=/tmp/war-listen/  -- the listen directory, this is where you
 drop in a new file so that the deployer can pick it up
 watchEnabled=false --true means we are watching for new deployments,
 false means we act as a slave, only get deployments from other nodes.

 Filip

 Edoardo Causarano wrote:
  Hello list,
  I've managed to get a test cluster working. ATM all cluster members have
  their own copy of deployed servlets and jsp pages. as well as the apache
  httpd frontend that contains an unpacked copy of the war file for static
  file serving.
  The current config is awkward to maintain but apparently the
  org.apache.catalina.cluster.deploy.FarmWarDeployer class takes care of
  replicating the wars across the cluster.
 
  Ideally (unlesss I don't have a clue) the apache cluster lead has a
  tomcat running in JNI mode where deploys are performed. The other tomcat
  only cluster members are notified of the new deployment and get their
  local copy syncronized. Does tomcat sync on the multicast channel or must
  I export the lead's webapps dir on NFS and point the other members' watch
  dir to it?
 
  Can anyone post their (sanitized) config so I can get the gist of it?
 
  Thanks,
  e
 
  (btw, yesterday it wouldn't work because one of the two test machines
  didn't have mcast in the kernel... grrr)
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

-- Disclaimer --
Ai sensi del D. Lgs. n. 196/2003, si precisa che le informazioni contenute in 
questo messaggio e negli eventuali allegati sono riservate e per uso esclusivo 
del destinatario.
Qualsiasi diffusione, distribuzione o copia della presente comunicazione non 
autorizzata per iscritto è severamente proibita ed espongono il responsabile 
alle relative conseguenze civili e penali.
Chiunque riceva questo messaggio per errore, è pregato di distruggerlo insieme 
agli eventuali allegati, non trattenendone copia, e di informare immediatamente 
Laziomatica S.p.A.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FarmWarDeployer instructions

2006-03-21 Thread Filip Hanik - Dev Lists
only one server should have (watchEnabled=true), this is the location 
where you deploy all your files.
if you enable it on all servers, then just be careful so that you don't 
deploy the same file in two locations and end up with a deployment 
collission.


tempDir=/tmp/war-temp/ -- The directory the deployer uses to assemble 
file transfers
deployDir=/tmp/war-deploy/ -- the directory where the deployer 
deploys the WAR file to
watchDir=/tmp/war-listen/  -- the listen directory, this is where you 
drop in a new file so that the deployer can pick it up
watchEnabled=false --true means we are watching for new deployments, 
false means we act as a slave, only get deployments from other nodes.


Filip

Edoardo Causarano wrote:

Hello list,
I've managed to get a test cluster working. ATM all cluster members have their 
own copy of deployed servlets and jsp pages. as well as the apache httpd 
frontend that contains an unpacked copy of the war file for static file 
serving.

The current config is awkward to maintain but apparently the
org.apache.catalina.cluster.deploy.FarmWarDeployer class takes care of 
replicating the wars across the cluster.


Ideally (unlesss I don't have a clue) the apache cluster lead has a tomcat 
running in JNI mode where deploys are performed. The other tomcat only 
cluster members are notified of the new deployment and get their local copy 
syncronized. Does tomcat sync on the multicast channel or must I export the 
lead's webapps dir on NFS and point the other members' watch dir to it?


Can anyone post their (sanitized) config so I can get the gist of it?

Thanks,
e

(btw, yesterday it wouldn't work because one of the two test machines didn't 
have mcast in the kernel... grrr)



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can anyone give suggestions on Best practices for Farmwardeployer in a tomcat cluster??

2005-12-07 Thread Peter Rossbach

Hey,

the current FarmWarDeployer is only support development.
Active redeployment inside a cluster is very dangerous. You can have
problemes with different versions of classes or the classloader not free 
all classes. My strategie is:

setup a new catalina.base.
Start the new generation servers
setup the new nodes at the mod:jk config
switch the old generation workers too disable state at mod_jk config.
Restart apache graceful.
   After no sessions are active, you can shutdown the old nodes and 
cleanup the mod:jk config.


Peter


Kim Brianne Go schrieb:


I'm just new to HA environments, we were able to do Apache / Tomcat Load
Balancing through AJP13.  Though there were few concerns on fail overs and
session information, so we tried clustering tomcat servers.  Everything went
well and working as of the moment, I know that  clustering is just like
playing with fire.  Without extensive knowledge could be detrimental
overtime.  May I ask anybody who's implemented such architecture for a best
practices guide for this with the utilization of Farmwardeployer.

Small concern on farmwardeployer, if the farmwardeployer server went down
and was started up again.  It always reloads all the application on the
watchedDir path to the entire cluster.  Is this normal, or we can do
something about this to avoid such delays.


Thanks!

--
Kim Brianne Go
Customer Engineer
GBBTech Systems Incorporated
Raffles Corporate Center
9/F Emerald Avenue,
Pasig City, Philippines
Tel. No.: +63 2 9105411 to 16 loc. 104
Fax No.: +63 2 9105418
Cel No.: +63 917 8314366
Email: [EMAIL PROTECTED]

 





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Can anyone give suggestions on Best practices for Farmwardeployer in a tomcat cluster??

2005-12-06 Thread Kim Brianne Go
I'm just new to HA environments, we were able to do Apache / Tomcat Load
Balancing through AJP13.  Though there were few concerns on fail overs and
session information, so we tried clustering tomcat servers.  Everything went
well and working as of the moment, I know that  clustering is just like
playing with fire.  Without extensive knowledge could be detrimental
overtime.  May I ask anybody who's implemented such architecture for a best
practices guide for this with the utilization of Farmwardeployer.

Small concern on farmwardeployer, if the farmwardeployer server went down
and was started up again.  It always reloads all the application on the
watchedDir path to the entire cluster.  Is this normal, or we can do
something about this to avoid such delays.


Thanks!

--
Kim Brianne Go
Customer Engineer
GBBTech Systems Incorporated
Raffles Corporate Center
9/F Emerald Avenue,
Pasig City, Philippines
Tel. No.: +63 2 9105411 to 16 loc. 104
Fax No.: +63 2 9105418
Cel No.: +63 917 8314366
Email: [EMAIL PROTECTED]