On 12/11/2018 05:36, Nagaraju Varaparla wrote: > Mark, > Thanks. > I have checked the last modified time of the META-INF/war-tracker file and > the war file. > I see both are same. And still tomcat re-deploying the war file. > > May be the time comparison failing?
Maybe. But it is hard to see how. Can you repeat this in a test environment? If so, I'd recreate this while running Tomcat with a remote debugger and put a break point in org.apache.catalina.startup.ExpandWar.expand(Host,URL,String) to see exactly what is going on. Unfortunately, there isn't any additional logging available. Mark > > Thanks, > Nagaraju.V > > > > From: Mark Thomas <ma...@apache.org> > Sent: Sunday, November 11, 2018 2:06 AM > To: Tomcat Users List <users@tomcat.apache.org> > Subject: Re: Apache Tomcat Deploying war file every time on AIX even though > there are no changes in war file. > > On 10/11/2018 16:35, Nagaraju Varaparla wrote: >> Hi, >> greetings!! >> >> Issue Description: >> Apache Tomcat Deploying war file every time on AIX even though there are no >> changes in war file. >> This causing all my applications are getting un-registered. >> >> Environment. >> Tomcat Version: apache-tomcat-8.5.34 >> JAVA Version : IBM JAVA 8.5.0.25<http://8.5.0.25> >> OS : IBM AIX 6.1 (AIX VERSION 6100-09-09-1717) >> >> Steps to reproduce: >> 1. Set JAVA PATH to IBM JDK 1.8.5.25<http://1.8.5.25>. >> 2. Download apache-tomcat-8.5.34. >> 3. Set CATALINA_HOME as tomcat folder(apache-tomcat-8.5.34). >> 4. we can check the version of tomcat and java with catalina.sh version >> 5. Create sample war file and copy to webapps folder of tomcat. >> 6. start the tomcat (catalina.sh start) >> 7. Wait till tomcat explode the war file into webapps folder.(till we see >> the modified time of the sample folder). >> 8. stop the tomcat (catalina.sh stop) >> 9. again start the tomcat (catalina.sh start) >> >> This will re-deploy the application. Ideally this should not happen as the >> war file is already deployed and not changed. >> This is deleting the existing application and re-deploying. >> I can see this in the log file. >> An expanded directory [apache-tomcat-8.5.34/webapps/sample] was found with a >> last modified time that did not match the associated WAR. It will be >> deleted. ----> it is getting delete here >> Please let us know if more information is needed. > > When Tomcat unpacks a WAR file it adds a file called: > META-INF/war-tracker > > in the expanded directory. The last modified time of this file is set to > be the same as the WAR file. When Tomcat (re-)starts, if those > timestamps are found to be different, Tomcat assumes the WAR was updated > while Tomcat was shut down and redeploys the WAR. > > You need to check those timestamps and investigate what, if anything, > might be modifying them. > > Mark > > --------------------------------------------------------------------- > 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> > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org