tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James H. H. Lampert" <jam...@touchtonecorp.com>
Subject Re: WARs getting re-extracted in DST change?!?
Date Tue, 05 Nov 2013 01:19:54 GMT
On 11/4/13 3:49 PM, Konstantin Kolinko wrote:
> If you run with <Host autoDeploy="true"/> then ~every 10 seconds
> Tomcat checks whether the war file is newer than the directory that
> was created when extracting the war file.  If it is then a
> redeployment happens.  You should be able to see deployment /
> undeployment messages in the logs.
>
> Maybe the check was performed during the DST change and the times for
> one web application were inconsistent. Do you need autoDeploy="true"
> if you manually modify the deployed applications?

I'm still not clear on where the autodeploy flag lives.

At any rate, sure enough (and it's not JUST ONE context) there are log 
entries for undeployments and redeployments:

("Wintouch Web" is our web interface for our "Wintouch" CRM application)

(some names have been changed to protect the innocent)

> Nov 3, 2013 1:00:11 AM org.apache.catalina.startup.HostConfig checkResources
> INFO: Undeploying context [/foobar-b]
> 03 Nov 2013 01:00:12,010 INFO  WintouchInitServlet  - Wintouch Web server is closed.
> Nov 3, 2013 1:06:20 AM org.apache.catalina.startup.HostConfig checkResources
> INFO: Undeploying context [/host-manager]
> Nov 3, 2013 1:06:21 AM org.apache.catalina.startup.HostConfig checkResources
> INFO: Undeploying context []
. . .
> Nov 3, 2013 1:10:43 AM org.apache.catalina.startup.HostConfig checkResources
> INFO: Undeploying context [/CodeOnDemand]
> Nov 3, 2013 1:10:44 AM org.apache.catalina.startup.HostConfig checkResources
> INFO: Undeploying context [/manager]
> Nov 3, 2013 1:10:45 AM org.apache.catalina.startup.HostConfig checkResources
> INFO: Undeploying context [/bozbar]
> 03 Nov 2013 01:10:46,012 INFO  WintouchInitServlet  - Wintouch Web server is closed.
> Nov 3, 2013 1:16:49 AM org.apache.catalina.startup.HostConfig checkResources
> INFO: Undeploying context [/tmtest]
> Nov 3, 2013 1:16:50 AM org.apache.catalina.startup.HostConfig deployWAR
> INFO: Deploying web application archive /wintouch/tomcat/webapps/ROOT.war
> Nov 3, 2013 1:23:09 AM org.apache.catalina.startup.TaglibUriRule body
> INFO: TLD skipped. URI: http://www.eclipse.org/birt/taglibs/birt.tld is already defined
> Nov 3, 2013 1:23:13 AM org.apache.catalina.startup.HostConfig deployWAR
> INFO: Deploying web application archive /wintouch/tomcat/webapps/foobar-b.war
. . .
> INFO: Deploying web application archive /wintouch/tomcat/webapps/foobar-b.war
> 3 Nov 2013 01:23:15:Wintouch Web()-Loading Server properties file for Wintouch Web...
> 3 Nov 2013 01:23:15:Wintouch Web()-Context based properties file not specified. To specify
context based properties file, please use
> 3 Nov 2013 01:23:15:Wintouch Web()-Can not load context based properties file.
> 3 Nov 2013 01:23:15:Wintouch Web()-Loading global properties file...
> 3 Nov 2013 01:23:15:Wintouch Web()-Global properties file not specified. To specify global
property file, please use parameter:"-Dws
> 3 Nov 2013 01:23:15:Wintouch Web()-Can not load global properties file.
> 3 Nov 2013 01:23:15:Wintouch Web()-Using configuration from web.xml...
> 3 Nov 2013 01:23:15:Logging level or logging path not specified, using default setting.
> Nov 3, 2013 1:31:42 AM org.apache.catalina.startup.HostConfig deployWAR
> INFO: Deploying web application archive /wintouch/tomcat/webapps/bozbar.war
. . .
> 3 Nov 2013 01:31:44:Wintouch Web(/foobar-b)-Loading Server properties file for Wintouch
Web...
> 3 Nov 2013 01:31:44:Wintouch Web(/foobar-b)-Context based properties file not specified.
To specify context based properties f
> 3 Nov 2013 01:31:44:Wintouch Web(/foobar-b)-Can not load context based properties file.
> 3 Nov 2013 01:31:44:Wintouch Web(/foobar-b)-Loading global properties file...
> 3 Nov 2013 01:31:44:Wintouch Web(/foobar-b)-Global properties file not specified. To
specify global property file, please use
> 3 Nov 2013 01:31:44:Wintouch Web(/foobar-b)-Can not load global properties file.
> 3 Nov 2013 01:31:44:Wintouch Web(/foobar-b)-Using configuration from web.xml...
> 3 Nov 2013 01:31:44:Logging level or logging path not specified, using default setting.
. . .
> Nov 3, 2013 1:40:09 AM org.apache.catalina.startup.HostConfig deployDirectory
> INFO: Deploying web application directory /wintouch/tomcat/webapps/host-manager
> Nov 3, 2013 1:40:09 AM org.apache.catalina.startup.HostConfig deployDirectory
> INFO: Deploying web application directory /wintouch/tomcat/webapps/manager
> Nov 3, 2013 1:40:09 AM org.apache.catalina.startup.HostConfig deployDirectory
> INFO: Deploying web application directory /wintouch/tomcat/webapps/CodeOnDemand
> Nov 3, 2013 1:40:09 AM org.apache.tomcat.util.digester.Digester fatalError
> SEVERE: Parse Fatal Error at line 1 column 1: Content is not allowed in prolog.
> Throwable occurred: org.xml.sax.SAXParseException: Content is not allowed in prolog.
. . .
> INFO: Deploying web application directory /wintouch/tomcat/webapps/tmtest
> Nov 3, 2013 1:40:10 AM org.apache.catalina.startup.ContextConfig webConfig
> SEVERE: Unable to determine URL for WEB-INF/classes
. . .

But I still don't see how the end of DST could have triggered mass 
redeployment.

Now, it seems that the "CodeOnDemand" context's WAR file is *not* in 
webapps (it's in the parent of webapps), and even though the log file 
shows an undeploy/redeploy of the context, the directory was never 
actually deleted or recreated. Likewise, the "tmtest" context never had 
a WAR file; it's just a directory with some static pages in it, manually 
created in place, and an images directory supporting it, in an attempt 
to resolve some problems with trustmarks from a certificate authority, 
and even though the logs say it was undeployed and redeployed, it, too, 
is undisturbed, as are Manager and host-manager.

But "bozbar" and "foobar-b" (not the real names, as they're associated 
with Wintouch environments we host for a couple of our customers) DID 
get redeployed (with their custom settings pointing them at the proper 
Wintouch servers reset to the default of LOCALHOST), as did the ROOT 
context (our own production Wintouch, ass, rather than the default ROOT 
context), and the same pattern apparently holds at all of our customers 
who host their own Wintouch-specific Tomcat servers.

When there aren't any deviations from the default Wintouch Web 
configurations (typically a production Wintouch Web server installed as 
the ROOT context, and talking to a Wintouch server on the same physical 
box at the standard port on LOCALHOST), this redeployment is harmless. 
But when there are any changes, such as the Wintouch server being on a 
different box (one customer), or at a different port (most customers 
have a test/training/development Wintouch environment, with its own 
Wintouch Web context in Tomcat, and one has two live and two 
test/training/development environments), then all this gets reset (and 
signing on to a live environment when you think you're signing on to a 
test environment can be nasty indeed!)

Does disabling auto-deploy and/or deploy-on-start affect our ability to 
deploy from the Manager?

Given that the lack of a corresponding WAR file seems to keep the 
undeploy/deploy from happening automatically, does manually removing the 
WAR file from the webapps directory after deployment have any 
undesirable side effects, such as causing (or blocking) undeployment?

--
James H. H. Lampert
Touchtone Corporation

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


Mime
View raw message