Channa,
On 8/2/24 05:30, Channa Puchakayala wrote:
Hi Tomcat Team,
Issue : Apache Tomcat deploying war file for every restart on Red Hat
Linux 8.6 even though there are no changes in war file.
Observations:
-war-tracker file timestamp is setting with tomcat restart time which is
not matched with original war file timestamp, so tomcat deleting
existing ca-nim-sm folder and extracting war again for every restart.
-Tomcat log message is below
=================
Line 13640: 2024-07-26 06:41:46,035 [main] INFO
org.apache.catalina.startup.ExpandWar - An expanded directory
[/usr/Spectrum/tomcat/webapps/*ca-nim-sm*] was found with a last
modified time that did not match the associated WAR. It will be deleted.
================
-server.xml setting ( <Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="false">)
-We observed this for multiple web applications (wars) on multiple
systems, so it is not an issue single web application(war)
-Issue observed in Red Hat Linux 8.6, but same not occurring on windows
box and Red Hat Linux 8.8, 8.9 and 8.10
Please notice *ca-nim-sm.war* file time stamp
Please notice *war-tracker* file time stamp, which is set to tomcat
restart time
Environment
Red Hat Linux 8.6
Java: OpenJDK 11.0.23 and 17.0.10
Tomcat : 9.0.87 and 9.0.91
Verified tomcat release notes and also tomcat defects in
https://bz.apache.org/bugzilla/ <https://bz.apache.org/bugzilla/>, could
not find any info/defect related to this.
Could you please help us, why war-tracker file timestamp getting
updated with tomcat restart time instead of keeping war file timestamp.
The code is fairly simple here in ExpandWar.java: the war-tracker file
gets the last-modified date of the WAR file that was expanded, and
shouldn't trigger a re-load after that unless either the WAR file or the
war-tracker file's timestamps are modified.
Can you post the results of these commands?
$ stat /usr/Spectrum/tomcat/webapps/ca-nim-sm.war
$ stat /usr/Spectrum/tomcat/webapps/ca-nim-sm
$ stat /usr/Spectrum/tomcat/webapps/ca-nim-sm/META-INF/war-tracker
Please note that the log file shows the paths as being under
/usr/Spectrum/tomcat/webapps/... while your screenshots show
/usr/apache-tomcat-9.0.91/webapps/... are you sure you are looking in
the right place(s) for these files and timestamps?
The next thing to do would be to add both timestamps to the log message
to see what their values are. Perhaps revealing their values will give
some insight into the root problem.
Are you able to compile your own Tomcat locally, or would you need a
custom release artifact to try something like that?
-chris
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org