Re: Tomcat Stop Daily log Rotation for all logs

2018-07-09 Thread sri devops
Thanks Mark, that worked !!!



On Mon, Jul 9, 2018 at 3:27 PM Mark Thomas  wrote:

> On 09/07/18 21:06, sri devops wrote:
> >  Hello All,
> >
> > I have apache-tomcat-8.5.23 installed and running on RHEL 7.x86_64 and
> > OpenJDK version "1.8.0_151".
> >
> > I wanted to manage log rotation using log rotate, however tomcat performs
> > its own log rotation which interacts badly with log rotate. How can i
> turn
> > OFF all tomcat log rotation ? so tomcat will just logs but not perform
> > daily rotation to any of the log files.
>
> Set rotatable=false
>
> i.e.
> 1catalina.org.apache.juli.AsyncFileHandler.rotatable = false
>
> And so on for the other log files.
>
> Mark
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Tomcat Stop Daily log Rotation for all logs

2018-07-09 Thread sri devops
 Hello All,

I have apache-tomcat-8.5.23 installed and running on RHEL 7.x86_64 and
OpenJDK version "1.8.0_151".

I wanted to manage log rotation using log rotate, however tomcat performs
its own log rotation which interacts badly with log rotate. How can i turn
OFF all tomcat log rotation ? so tomcat will just logs but not perform
daily rotation to any of the log files.


Here's what i have in *logging.properties* file

handler = 1catalina.org.apache.juli.AsyncFileHandler,
2localhost.org.apache.juli.AsyncFileHandler,
3manager.org.apache.juli.AsyncFileHandler,
4host-manager.org.apache.juli.AsyncFileHandler,
java.util.logging.ConsoleHandler

.handlers = 1catalina.org.apache.juli.AsyncFileHandler,
java.util.logging.ConsoleHandler


Here are my logs at */opt/apache-tomcat-8.5.23/log*s directory.

catalina.2018-07-08.log
catalina.2018-07-09.log
catalina.out
host-manager. 2018-07-09.log
localhost. 2018-07-09.log
localhost_access_log. 2018-07-08.txt
localhost_access_log. 2018-07-09.txt
manager. 2018-07-09.log


Thanks,
Srinath


Re: Tomcat - DeployonStartup

2018-05-30 Thread sri devops
Yes now i see that, Thanks

- SD

On Wed, May 30, 2018 at 10:34 AM Mark Thomas  wrote:

> On 30/05/18 16:23, sri devops wrote:
> > Hello All, I have tomcat v8.5.23 installed on rhel 7
> >
> > I set autoDeploy to false to stop tomcat reload or redeploy when web.xml
> or
> > context.xml is changed. I do not see deployOnStartup set to true anywhere
> > in my configuration but tomcat can able to successfully perform
> deployments
> > when war is present in webapps and perform tomcat service start manually,
> >
> > My question is deployOnStartup=true, by default in tomcat (if no where
> > specified as false) ? If not, what makes tomcat perform successful
> > deployment (when autoDeploy is set to false)
>
> Have you tried reading the docs?
>
> Mark
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Tomcat - DeployonStartup

2018-05-30 Thread sri devops
Hello All, I have tomcat v8.5.23 installed on rhel 7

I set autoDeploy to false to stop tomcat reload or redeploy when web.xml or
context.xml is changed. I do not see deployOnStartup set to true anywhere
in my configuration but tomcat can able to successfully perform deployments
when war is present in webapps and perform tomcat service start manually,

My question is deployOnStartup=true, by default in tomcat (if no where
specified as false) ? If not, what makes tomcat perform successful
deployment (when autoDeploy is set to false)


Thanks
SD


Re: Help with Tomcat Automatic Application Deployment

2018-05-17 Thread sri devops
Sure i will work in fixing the memory leak and i have another QQ.

Now that I set autoDeploy=false in order to have more control on my tomcat. I
stopped Tomcat, deploy war file and started tomcat and tomcat is extracting
the war just fine without having deployOnStartup attribute stated anywhere. As
i grep for "deployOnStartup" value and couldn't find anywhere in my
configuration, and deployments on start-up is working just fine.


   - Do i need to specifically set deployOnStartup=true,  For happening
   deployments on Tomcat startup ? Or is deployOnStartup=true (by default in
   tomcat) ?
   - Also if autoDeploy is set to false, are there any other unknown
   impacts that might happen which needs to be considered ?



Thanks,
Srinath

On Thu, May 17, 2018 at 10:48 AM Mark Thomas  wrote:

> On 16 May 2018 23:01:14 BST, sri devops  wrote:
> >Thanks Mark, your answer is very helpful. I tried many scenarios using
> >your
> >inputs.
> >
> >I want Tomcat to NOT perform reload but it needs to perform a redeploy
> >when
> >context.xml is changed. So i set autoDeploy=true and commented out
> >below
> >section in context.xml to server my purpose.
> >
> >WEB-INF/web.xml
> >${catalina.base}/conf/web.xml
> >
> >Now what i noticed is, while tomcat and application are in running
> >state,
> >if i removed /opt/apache-tomcat-8.5.23/webapps/cp directory, Tomcat is
> >trying to redeploy which is good but it hung at below error
> >
> >*SEVERE: The web application [cp] created a ThreadLocal with key of
> >type
> >[java.lang.ThreadLocal] (value [java.lang.ThreadLocal@5640c1bb) and a
> >value
> >of type [foo.context.ServiceToken] (value [Unknow] ) but failed to
> >remove
> >it when the web application was stopped. Threads are going to be
> >renewed
> >over time to try and avoid a probable memory leak.*
> >
> >In order to get rid of this error, i manually need to stop / forcefully
> >kill PID for the tomcat and then start tomcat to perform a redeploy
> >---> So
> >here there's a human interaction of manually stopping tomcat and
> >starting
> >it (not serving the purpose of redeploy). Do you have any thoughts or
> >suggestions in this scenarios ?
>
> Fix the memory leak in your web application.
>
> Mark
>
>
> >
> >Thanks,
> >Srinath.
> >
> >
> >On Fri, May 11, 2018 at 11:44 AM Mark Thomas  wrote:
> >
> >> On 08/05/18 19:07, sri devops wrote:
> >> >  Hello Team,
> >> >
> >> > Currently I have apache-tomcat-8.5.23 installed and running on
> >> > RHEL7.x86_64. I have a war deployed and application is running
> >under
> >> > tomcat. While application is running, if i make any manual changes
> >to
> >> some
> >> > config files [ context.xml or server.xml or web.xml] and noticed
> >Tomcat
> >> is
> >> > restarting application even though I haven't called tomcat service
> >start
> >> > script.
> >>
> >> Changes to server.xml do not trigger web application reload or
> >redeploy.
> >> Neither does it trigger a Tomcat restart.
> >>
> >> Changes to web.xml trigger a web application reload because of the
> >> default watched resources (see CATALINA_BASE/conf/context.xml) and
> >> because autoDeploy is true by default.
> >>
> >> Changes to context.xml will trigger a web application redeploy
> >because
> >> autoDeploy is true by default.
> >>
> >>
> >> > My intention is,
> >> > 1) At first when there's initial war deployed and tomcat service
> >start
> >> > script is called, tomcat should extract war and app should work
> >> > 2) Second, While tomcat is in running state and application is
> >running
> >> and
> >> > if i make any manual changes to any tomcat config file, I do not
> >want
> >> > application to auto magically restart.
> >> >
> >> > *my server.xml looks as below*
> >> >
> >> >  >> >unpackWARs="true" autoDeploy="true">
> >> >
> >> >
> >> > I also looked at your docs and researched online, but unclear on
> >these
> >> > parameters what to use when. [ setting autoDeploy=false (or) having
> >> > deployIgnore attribute somewhere ?]
> >>
> >> Set autoDeploy to false.
> >>
> >> 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
>
>


Re: Help with Tomcat Automatic Application Deployment

2018-05-16 Thread sri devops
Thanks Mark, your answer is very helpful. I tried many scenarios using your
inputs.

I want Tomcat to NOT perform reload but it needs to perform a redeploy when
context.xml is changed. So i set autoDeploy=true and commented out below
section in context.xml to server my purpose.

WEB-INF/web.xml
${catalina.base}/conf/web.xml

Now what i noticed is, while tomcat and application are in running state,
if i removed /opt/apache-tomcat-8.5.23/webapps/cp directory, Tomcat is
trying to redeploy which is good but it hung at below error

*SEVERE: The web application [cp] created a ThreadLocal with key of type
[java.lang.ThreadLocal] (value [java.lang.ThreadLocal@5640c1bb) and a value
of type [foo.context.ServiceToken] (value [Unknow] ) but failed to remove
it when the web application was stopped. Threads are going to be renewed
over time to try and avoid a probable memory leak.*

In order to get rid of this error, i manually need to stop / forcefully
kill PID for the tomcat and then start tomcat to perform a redeploy ---> So
here there's a human interaction of manually stopping tomcat and starting
it (not serving the purpose of redeploy). Do you have any thoughts or
suggestions in this scenarios ?

Thanks,
Srinath.


On Fri, May 11, 2018 at 11:44 AM Mark Thomas  wrote:

> On 08/05/18 19:07, sri devops wrote:
> >  Hello Team,
> >
> > Currently I have apache-tomcat-8.5.23 installed and running on
> > RHEL7.x86_64. I have a war deployed and application is running under
> > tomcat. While application is running, if i make any manual changes to
> some
> > config files [ context.xml or server.xml or web.xml] and noticed Tomcat
> is
> > restarting application even though I haven't called tomcat service start
> > script.
>
> Changes to server.xml do not trigger web application reload or redeploy.
> Neither does it trigger a Tomcat restart.
>
> Changes to web.xml trigger a web application reload because of the
> default watched resources (see CATALINA_BASE/conf/context.xml) and
> because autoDeploy is true by default.
>
> Changes to context.xml will trigger a web application redeploy because
> autoDeploy is true by default.
>
>
> > My intention is,
> > 1) At first when there's initial war deployed and tomcat service start
> > script is called, tomcat should extract war and app should work
> > 2) Second, While tomcat is in running state and application is running
> and
> > if i make any manual changes to any tomcat config file, I do not want
> > application to auto magically restart.
> >
> > *my server.xml looks as below*
> >
> >  >unpackWARs="true" autoDeploy="true">
> >
> >
> > I also looked at your docs and researched online, but unclear on these
> > parameters what to use when. [ setting autoDeploy=false (or) having
> > deployIgnore attribute somewhere ?]
>
> Set autoDeploy to false.
>
> Mark
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Help with Tomcat Automatic Application Deployment

2018-05-08 Thread sri devops
 Hello Team,

Currently I have apache-tomcat-8.5.23 installed and running on
RHEL7.x86_64. I have a war deployed and application is running under
tomcat. While application is running, if i make any manual changes to some
config files [ context.xml or server.xml or web.xml] and noticed Tomcat is
restarting application even though I haven't called tomcat service start
script.

My intention is,
1) At first when there's initial war deployed and tomcat service start
script is called, tomcat should extract war and app should work
2) Second, While tomcat is in running state and application is running and
if i make any manual changes to any tomcat config file, I do not want
application to auto magically restart.

*my server.xml looks as below*




I also looked at your docs and researched online, but unclear on these
parameters what to use when. [ setting autoDeploy=false (or) having
deployIgnore attribute somewhere ?]

Thanks in Advance,

Srinath