What triggers a redeploy of WARs on Tomcat during server start up?
Does anyone know what triggers a redeployment of the WARs? Does the server check for particular changes in RTC configuration and automatically redeploy them at certain times?
We are using RTC 4.0 and integrated with RQM 4.0.
2 answers
-
Delete server/tomcat/work/Catalina/localhost/<contextRoot>/built-on.txt where <contextRoot> is the context root of your application (jts, ccm, jazz, etc).
- Request a server reset by visiting https://serverhost:port/<contextRoot>/admin/cmd/requestReset
You may want to verify that the built-on.txt file (#1) is being created after the server is started. If it is not, then since it is missing every time the server is started, a reprovision will happen every time.
Edit: Also, what makes you think your WARs are being reprovisioned? For example, my Tomcat console shows the following which is similar to your output where you think yours are being reprovisioned, but my WARs are not being reprovisioned:
Jan 24, 2013 11:53:31 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive C:\temp\Servers\stackOverflow\server\tomcat\webapps\admin.war
Jan 24, 2013 11:53:33 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive C:\temp\Servers\stackOverflow\server\tomcat\webapps\ccm.war
Jan 24, 2013 11:53:45 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive C:\temp\Servers\stackOverflow\server\tomcat\webapps\clmhelp.war
Jan 24, 2013 11:53:50 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive C:\temp\Servers\stackOverflow\server\tomcat\webapps\converter.war
Jan 24, 2013 11:53:52 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive C:\temp\Servers\stackOverflow\server\tomcat\webapps\jts.war
Jan 24, 2013 11:53:58 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive C:\temp\Servers\stackOverflow\server\tomcat\webapps\qm.war
Jan 24, 2013 11:54:10 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive C:\temp\Servers\stackOverflow\server\tomcat\webapps\rm.war
Jan 24, 2013 11:54:15 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\temp\Servers\stackOverflow\server\tomcat\webapps\ROOT
Comments
This is the same log output as we have. You are correct, I was assuming that the WARs were being reprovisioned. But what does it mean when it says "Deploying web application archive XXXX" ? How is this different to a reprovision?
I'm not exactly sure what happens during provisioning, but I know it's when the WARs get "expanded" which means the WARs are unpacked to somewhere in the server/tomcat/work folder. I would guess it's likely more than just a simple extraction and more happens during the provisioning.
I would think WAR deployment just means that the Tomcat server recognizes the WAR and serves for it. For example, if Tomcat does not deploy the JTS WAR, then the JTS has not been started and you would not be able to use the JTS.
I deleted the contents under server/tomcat/work/Catalina/localhost and the output to the Tomcat console did not change (looks the same as I pasted above). So it's still possible the server is reprovisioning for some unknown reason. Does your machine meet the system requirements for RTC 4.0? Ralph may be onto something with monitoring your machine and resources.
starting with 4.0.1 I get the deploying xxx.war every time the server starts. I didn't/don't get this message on 3.0.1 server startup, ever.
Comments
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Jan 24 '13, 5:11 a.m.This is a valid question, However, I am wondering why it does take 30 minutes. On my Laptop it takes less than 3-5 minutes for all CLM applications for the first deployment. Do you have a disk performance or other hardware scaling issue?
Ian Wark
Jan 24 '13, 7:29 a.m.As far as we know, we don't have disk performance or other hardware scaling issue, because sometimes startup is as fast as 2 minutes. This is what a problematic log looks like. (Had to abbreviate to reduce chars.)
08/01/2013 12:29:55 PM init
...
08/01/2013 12:30:00 PM
INFO: Starting Servlet Engine: Apache Tomcat/7.0.25
08/01/2013 12:30:00 PM deployWAR
INFO: Deploying web application archive admin.war
08/01/2013 12:30:06 PM deployWAR
INFO: Deploying web application archive ccm.war
08/01/2013 12:40:14 PM deployWAR
INFO: Deploying web application archive clmhelp.war
08/01/2013 12:40:24 PM deployWAR
INFO: Deploying web application archive converter.war
08/01/2013 12:40:26 PM deployWAR
INFO: Deploying web application archive jts.war
08/01/2013 12:46:10 PM deployWAR
INFO: Deploying web application archive qm.war
08/01/2013 12:55:29 PM deployWAR
INFO: Deploying web application archive rm.war
08/01/2013 12:57:44 PM deployDirectory
INFO: Deploying web application directory
...
08/01/2013 12:57:44 PM Catalina start
INFO: Server startup in 1664309 ms
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Jan 24 '13, 8:10 a.m.On my machine (fast laptop with SSD drive), today 4.0.1 took
INFO: Server startup in 69168 ms
Yours took almost 1600000ms longer which is 24 times longer. I can't imagine only the SSD drive does that. This is even way too long for a fresh deployment. 10 minutes for qm, 6 for jts, 10 for ccm does not sound right.
Can you provide more data/details about your machine? Architcture, Mem, Disk, what do you run on it etc?
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Jan 24 '13, 8:22 a.m.By the way, one thing that enforces redeployment is deleting the Folders underneath
server/tomcat/webapps
the same applies for deleting the folders names as the war's in
server\tomcat\work\Catalina\localhost
I just did the latter and my start up time went to
INFO: Server startup in 213408 ms
The longest app took about a minute or so. Still way off of the times you are seeing. However you could try that and get a fresh redeployment, maybe that changes something. I would still consider monitoring the machine and resources more closely to understand what is delaying things.
Guillermo Hurtado
Jan 24 '13, 10:21 a.m.Just wanted to mention that another action that triggers a redeployment is invoking the requestReset command for the application. For example by entering the URL like the following on the browser:
https://<your-RTC-server-name>:<port-number>/ccm/admin/cmd/requestReset
https://<your-RTC-server-name>:<port-number>/qm/admin/cmd/requestReset
https://<your-RTC-server-name>:<port-number>/rm/admin/cmd/requestReset