Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

What triggers a redeploy of WARs on Tomcat during server start up?

We have a performance related issue on RTC server startup. It seems that RTC frequently redeploys the WARs for admin.war, ccm.war, clmhelp.war, converter.war, jts.war etc.. and this takes about 30 minutes. But we are not sure why. In our previous experience, the initial deployment before jts setup takes a long time as WARs are deployed for the first time. But now we find they are being redeployed frequently.

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.

0 votes

Comments

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?

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

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?

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.  



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:



This will cause a redeployment the next time the server is restarted. 



2 answers

Permanent link
There are two ways I know of to cause a reprovision of the WARs on Tomcat:

  1. Delete server/tomcat/work/Catalina/localhost/<contextRoot>/built-on.txt where <contextRoot> is the context root of your application (jts, ccm, jazz, etc).
  2. 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

0 votes

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.


Permanent link
In my experience, the malware known as "McAfee anti-virus" causes a server restart to take much longer. With McAfee turned off, my server starts in 70 seconds. With it turned on, it starts in 20 minutes.

0 votes

Comments

But don't you feel safer ? :D

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 7,509

Question asked: Jan 24 '13, 3:10 a.m.

Question was seen: 12,098 times

Last updated: Jul 08 '14, 1:58 p.m.

Confirmation Cancel Confirm