Discussion:
Apache Tomcat Deploying war file every time on AIX even though there are no changes in war file.
Nagaraju Varaparla
2018-11-10 16:35:40 UTC
Permalink
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
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.
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.

Thanks,
Nagaraju.V
Mark Thomas
2018-11-10 20:35:43 UTC
Permalink
Post by Nagaraju Varaparla
Hi,
greetings!!
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
OS : IBM AIX 6.1 (AIX VERSION 6100-09-09-1717)
1. Set JAVA PATH to IBM JDK 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-***@tomcat.apache.org
For additional commands, e-mail: users-***@tomcat.apache.org
Nagaraju Varaparla
2018-11-12 05:36:46 UTC
Permalink
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?

Thanks,
Nagaraju.V



From: Mark Thomas <***@apache.org>
Sent: Sunday, November 11, 2018 2:06 AM
To: Tomcat Users List <***@tomcat.apache.org>
Subject: Re: Apache Tomcat Deploying war file every time on AIX even though there are no changes in war file.
Post by Nagaraju Varaparla
Hi,
greetings!!
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)
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-***@tomcat.apache.org<mailto:users-***@tomcat.apache.org>
For additional commands, e-mail: users-***@tomcat.apache.org<mailto:users-***@tomcat.apache.org>
Mark Thomas
2018-11-12 09:30:23 UTC
Permalink
Post by Nagaraju Varaparla
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
Post by Nagaraju Varaparla
Thanks,
Nagaraju.V
Sent: Sunday, November 11, 2018 2:06 AM
Subject: Re: Apache Tomcat Deploying war file every time on AIX even though there are no changes in war file.
Post by Nagaraju Varaparla
Hi,
greetings!!
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)
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.
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-***@tomcat.apache.org
For additional commands, e-mail: users-***@tomcat.apache.org
Nagaraju Varaparla
2018-11-13 10:02:39 UTC
Permalink
Mark,
I did not find any luck with this.
Can I try anything more ?

Thanks,
Nagaraju.V


From: Mark Thomas <***@apache.org>
Sent: Monday, November 12, 2018 3:00 PM
To: ***@tomcat.apache.org
Subject: Re: Apache Tomcat Deploying war file every time on AIX even though there are no changes in war file.
Post by Nagaraju Varaparla
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
Post by Nagaraju Varaparla
Thanks,
Nagaraju.V
Sent: Sunday, November 11, 2018 2:06 AM
Subject: Re: Apache Tomcat Deploying war file every time on AIX even though there are no changes in war file.
Post by Nagaraju Varaparla
Hi,
greetings!!
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><http://8.5.0.25<http://8.5.0.25>>
OS : IBM AIX 6.1 (AIX VERSION 6100-09-09-1717)
1. Set JAVA PATH to IBM JDK 1.8.5.25<http://1.8.5.25><http://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.
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-***@tomcat.apache.org<mailto:users-***@tomcat.apache.org>
For additional commands, e-mail: users-***@tomcat.apache.org<mailto:users-***@tomcat.apache.org>
David Cleary
2018-11-13 19:19:26 UTC
Permalink
Mark,

Turns out it is a JDK bug.

http://www-01.ibm.com/support/docview.wss?uid=swg1IV99686
https://bugs.openjdk.java.net/browse/JDK-8177809

While it has been fixed, we currently are required to support AIX 6.1, which doesn't have an updated JDK because IBM no longer supports that version of AIX.

Dave

-----Original Message-----
From: Mark Thomas <***@apache.org>
Sent: Monday, November 12, 2018 4:30 AM
To: ***@tomcat.apache.org
Subject: Re: Apache Tomcat Deploying war file every time on AIX even though there are no changes in war file.
Post by Nagaraju Varaparla
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
Post by Nagaraju Varaparla
Thanks,
Nagaraju.V
Sent: Sunday, November 11, 2018 2:06 AM
Subject: Re: Apache Tomcat Deploying war file every time on AIX even though there are no changes in war file.
Post by Nagaraju Varaparla
Hi,
greetings!!
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
http://8.5.0.25
.25<http://8.5.0.25
.5.0.25> OS : IBM AIX 6.1 (AIX VERSION 6100-09-09-1717)
1. Set JAVA PATH to IBM JDK http://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.
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-***@tomcat.apache.org
For additional commands, e-mail: users-***@tomcat.apache.org
Christopher Schultz
2018-11-15 05:03:35 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Dve,
Post by David Cleary
Turns out it is a JDK bug.
http://www-01.ibm.com/support/docview.wss?uid=swg1IV99686
https://bugs.openjdk.java.net/browse/JDK-8177809
While it has been fixed, we currently are required to support AIX
6.1, which doesn't have an updated JDK because IBM no longer
supports that version of AIX.
Tomcat-on-Linux-on-AIX?

I think James H. H. Lampert (a frequent contributor, here) does a lot
with AIX and has even done some awful things like what I suggested
above. Maybe the price required to "support AIX" is to install a
compatibility layer: Linux.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlvs/icACgkQHPApP6U8
pFjqTBAAvyNsE2vNrYxmuvDxy8FXqhi7zFFoP3+sTOViOBsmqaekNxxD7YAwoPF6
hSG3K7rqxgg8GMHV3oS64hdtBCtV2llyVJB5Mz1z0NbgVQYJeI9AiiEeYD+Xm5/Z
F6XRTCXLS6PO2f6ucIPr2TDfPM9vDtFxvSNPAzlvrGPTEEz3rmQBLYODK9dYVnHL
FyMzp5hKGkvdAd/6sLgLINQwMoRZgbZvGl0Xy44S46dS96OQUdU61/SB7bbhrFAA
RbKTxNK0BSIR/zvvdUizcJp+6fpev/JZH4WwKdbKbUtShSfw1clSe0oUaBodA5QQ
sq4qwF8MEYBFH8Czx4E/TgO6jjy+R7vVDPH1LANXLxk6ZsezGfXVKrvwcBpCVuKo
T5naoKsbuZTmf76xnM+U9siyeqf7QKRNIgEMMdCwiDUp7cAKV3OIRffWsuUB2iCN
hp3nKAnRAKU8KCVTu50Qu2NCjamG+phjpV1r6yMArzc5pWC3Fj8vl59qKCGbAKlI
a3ct4zSuRQsIXjcVXpsb9CHKl6drOLYW39OSCbfKixGQYwfrYxiwJbNymuwvSndw
o1tXYyi0nqPHFAeb2+GYINemwO9iFVt/cmFB6hdTFsOXAqFMv4m3TuDbMVYQzlOu
pc3knO4oqNEDOzmvpkxzEHYD/B3+7YwGORBQNCFtFfEsabl6POI=
=lMm3
-----END PGP SIGNATURE-----

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

Loading...