On 08/08/2024 08:48, Channa Puchakayala wrote:
Hi All,

Any suggestions or help on this ?

What file system is being used? Is this a physical box or a VM? Is the storage local, NAS etc?

shall I create defect ?

Unless you can provide the steps to reproduce this issue on Ubuntu or another free OS (RHEL requires real money to test with) any such issue is likely to get resolved as WORKSFORME.

That no-one else is reporting this issue strongly suggests an environmental issue rather than a Tomcat bug.

Mark



Thanks

Channa

*From:* Channa Puchakayala <channa.puchakay...@broadcom.com <mailto:channa.puchakay...@broadcom.com>>
*Sent:* Monday, August 5, 2024 1:29 PM
*To:* 'Tomcat Users List' <users@tomcat.apache.org <mailto:users@tomcat.apache.org>> *Cc:* 'Narayanarao Yenduri' <narayanarao.yend...@broadcom.com <mailto:narayanarao.yend...@broadcom.com>>; 'Naga Naveen Chevendra' <naganaveen.cheven...@broadcom.com <mailto:naganaveen.cheven...@broadcom.com>>; 'Balamurali Krishna Ippili' <balamurali.ipp...@broadcom.com <mailto:balamurali.ipp...@broadcom.com>> *Subject:* RE: Tomcat deploying war file for every restart on Red Hat Linux 8.6

Hi Tomcat Team,

Thanks to all for helping on this.

- We set the "*autoDeploy="false*" *in server.xml* already, even though it is replaying war without any changes in war file

- Here main issue is, *war-tracker* file doesn't get the same modified date as the war file.

*@Chris,*

Please find the requested data below.

-As per above screenshot, it is clear that *war-tracker* file doesn't get the same modified date as the war file.

-We don’t have local compiled tomcat to print custom logs.

*Note:*

I tested this (ca-nim-sm.war) with my application “*Spectrum*” and also without my application, both cases result is same i.e. redeploying war for every restart, that is the reason log message  and screenshot showing different path in my previous mail.

Regards

Channa

-----Original Message-----
From: Christopher Schultz <ch...@christopherschultz.net <mailto:ch...@christopherschultz.net>>
Sent: Saturday, August 3, 2024 12:00 AM
To: users@tomcat.apache.org <mailto:users@tomcat.apache.org>
Subject: Re: Tomcat deploying war file for every restart on Red Hat Linux 8.6

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/> <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 <mailto:users-unsubscr...@tomcat.apache.org>

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


This electronic communication and the information and any files transmitted with it, or attached to it, are confidential and are intended solely for the use of the individual or entity to whom it is addressed and may contain information that is confidential, legally privileged, protected by privacy laws, or otherwise restricted from disclosure to anyone else. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, you are hereby notified that any use, copying, distributing, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited. If you received this e-mail in error, please return the e-mail to the sender, delete it from your computer, and destroy any printed copy of it.

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

Reply via email to