-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Austin,
On 9/24/14 8:59 PM, Austin Jones wrote:
> I am deploying apps using the Tomcat Manager interface. Tomcat
> 8.0.12 on Linux.
>
> I am setting the parameters: path=/My_Application
> context=/path/to/my/context.xml war=/path/to/my/APP.war
> update=true
>
> This produces the log: <http request starts> 24-Sep-2014
> 16:52:35.933 INFO [http-nio-443-exec-17]
> org.apache.catalina.startup.HostConfig.reload Reloading context
> [/My_Application] 24-Sep-2014 16:52:35.933 INFO
> [http-nio-443-exec-17]
> org.apache.catalina.core.StandardContext.reload Reloading Context
> with name [/My_Application] has started 24-Sep-2014 16:52:45.050
> INFO [http-nio-443-exec-17]
> org.apache.catalina.core.StandardContext.reload Reloading Context
> with name [/My_Application] is completed
>
> <http request returns>
>
> 24-Sep-2014 16:55:48.359 INFO
> [ContainerBackgroundProcessor[StandardEngine[Catalina]]]
> org.apache.catalina.startup.HostConfig.undeploy Undeploying
> context [/My_Application] 24-Sep-2014 16:55:49.861 INFO
> [localhost-startStop-4]
> org.apache.catalina.startup.HostConfig.deployDescriptor Deploying
> configuration descriptor
> /usr/local/apache-tomcat-8.0.12/conf/Catalina/localhost/My_Application.xml
>
>
24-Sep-2014 16:55:58.143 INFO [localhost-startStop-4]
> org.apache.catalina.startup.HostConfig.deployDescriptor Deployment
> of configuration descriptor
> /usr/local/apache-tomcat-8.0.12/conf/Catalina/localhost/My_Application.xml
>
>
has finished in 8,282 ms
>
> My app is already deployed, which triggers HostConfig.check(name),
> and then checkResources(app). Tomcat takes the WAR branch (
> resource.getName() ... endsWith(".war") , and the app is reloaded.
> The context.xml was also updated by the manager, but the
> app.redeployResources map is only updated with the WAR (due to the
> return statement in checkResources).
>
> Moments later, a periodic lifecycle event fires, and
> HostConfig.check() triggers a redeployment on the
> conf/Catalina/localhost/My_Application.xml resource.
>
> I have temporarily worked around the issue by disabling autoDeploy
> in server.xml, but is this a bug, or a misconfiguration on my part?
> It seems like checkResources could automatically update
> app.redeployResources entries which are older than the resource
> being updated, or maybe even the current time at the start of the
> checkResources call.
Is the system time on your server sane? Do you have a particularly
large WAR file that you are deploying? Often, timestamps get slightly
out of sync which can cause redeployments.
I still observe multiple re-deployments in development environments
where a new batch of code is dropped into the deployment directory and
an auto-reload occurs. I then observe repeated auto-reloads several
times before the storm of reloads stops.
I've been meaning to instrument Tomcat to see which resource is
causing it to re-load to see what the problem might be, but I haven't
yet taken the time to do so.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
iQIcBAEBCAAGBQJUJIVlAAoJEBzwKT+lPKRY78UP/02dDuG9y+IReX5aEjFxg5Ko
rIwD2RGTnHL8LlbwrFWnR3to9ILyHatu3Hdv3EraQ/j9AEdsCHhT4tWhAXZhSv6P
C/qpmctlnfiJyA0lSwDZ69HMufrc7Bpbcstzc6Tz1/BIZiv6QDxRs8iu/ENzq+UB
4NuMgNsggQJfYvobb9icBx26W/opjMDjejSbvqcdixp67EdebdjpONPJHgUCfARn
2WAXqqdzbj1dY1olbvBWSbwqd1VsSr5qT8E6nTiI+jZuePB58fO/lelOa43c2Mka
oomPpgTX9Q/E6s0eLNkfmWJMYo0XJDFIt87j7aLexkX032KCIOppxiJBzuJByc3q
60Gy9Lce2JtiCcximLQJqD+mpPeJsx2SxzNIWUgmW3MDVnNjWlYmdmyMMGLLx6mt
l99DsD27z8sO1jWjqce7o6/PsOhTjSyFV4rSGiit1lreFs08566CHT5mA7G4x1kl
AuS+4e+ZV5mvdGrLUws1SccDFIc/Jqjp9ut+tI4+2tBXLnEfW0bpwkbV6No5rP/Y
xjsbqAF44JGD8yuNc5eYRdpFit4qpxyFNBCmc8c/JiaJKgIu2HL4lOybkOB5ByXk
tg2JUHhUG4TEKtSn5bhv54RBvPobOHWUx5kISesG/7bsNJQafMPXHTgveOLWQDMA
ygCaMMUgRH+bRdI44hZN
=T0dv
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]