You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jonathan O'Donovan <jo...@eurokom.ie> on 2008/04/28 12:40:16 UTC

Deploying discovered web applications

Hi,

I was wondering if anybody has encountered a situation where Tomcat keeps deploying a given webapp?

I noticed that it has cropped up on this forum before but there doesn't seem to have been any solution found.
. 
The following is continually logged every 15 seconds to the context logger of the webapp in question: 

2008-04-28 00:01:47 HostConfig[local_eaglevm.stats.XX.XX]: Deploying discovered web applications
2008-04-28 00:01:47 HostConfig[local_eaglevm.stats.XX.XX]: Deploying discovered web applications
2008-04-28 00:01:47 HostConfig[local_eaglevm.stats.XX.XX]: Deploying discovered web applications
etc...

I am running 

Tomcat 4.1
Apache/1.3.33 (Win32) 
mod_jk/1.2.8 
JRE Version 1.4.2_03

My webapp is working. Here is a copy of the server.xml file. I have made sure to turn make reloadable false but the problem persists.

    <Host name="local_eaglevm.stats.XX.XX" debug="9" appBase="webapps/eurokom2/active" unpackWARs="true">
    <Alias>XX.XX.XX</Alias>

    <Context path="" workDir="work/pressweb" docBase="../pressweb" debug="9" reloadable="false">

    <Logger timestamp="true" className="org.apache.catalina.logger.FileLogger" prefix="XX.XX.log-tomcat"/>
    
    [realm and resources follow here...]

    </Context>
   </Host>   

There are no .war files sitting in the /webapp directory.  


Thanks in Advance
Jonathan 

Re: Deploying discovered web applications

Posted by Jonathan O'Donovan <jo...@eurokom.ie>.
Hi Charles,

Thanks again for your help and your time. I'm still having no luck -

> Yes - transferring files from some system to another with a different
> time base can cause "interesting" actions in Tomcat.

What do you mean by timebase - is this an OS-specific time format for files?
I have checked all file timestamps and none have a date in the future.

> Look in conf/Catalina/[host] for .xml files that provide <Context>
> elements for the apps in question.  You probably also want to clean out
> Tomcat's work directory to make sure there's no junk left lying around
> in there.

I've tried cleaning out the /work directory with each restart of Tomcat.

I'm not sure what you mean by
conf/Catalina/[host]  :

All my <contexts> are in server.xml (see below) aparf from

/webapps/manager.xml
/webapps/admin.xml

which contains the following <contexts>, respectively

 <Context path="/manager" docBase="../server/webapps/manager" debug="0" 
privileged="true">
  <ResourceLink name="users" global="UserDatabase" 
type="org.apache.catalina.UserDatabase" />
  </Context>


<Context path="/admin" docBase="../server/webapps/admin" debug="0" 
privileged="true">
  <Logger className="org.apache.catalina.logger.FileLogger" 
prefix="localhost_admin_log." suffix=".txt" timestamp="true" />
  </Context>

Perhaps I have got appBase and docBase misconfigured between the various 
hosts - I noticed that hosts local_eaglevm.cs and localhost both
have appBase="webapps" in the <host> declaration. Should this be a problem ? 
Also, host local_eaglevm.clients has appBase="webapps/eurokom2/active", even 
though the /active directory does not exist. Is this ok ? - I'm trying to 
understand someone else's configuration file here. It doesn't seem to cause 
a problem because the context's docBase is set to ../pressweb giving 
webapps/eurokom2/pressweb which exists.

I have tried using appBase="webapps/eurokom2" and docBase="pressweb" in the 
above but it doesn't solve the problem.


Many thanks again,
Jonathan

------------------ server.xml ----------------------


<Server port="8005" shutdown="SHUTDOWN" debug="0">

  <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
            debug="0"/>
  <Listener 
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
            debug="0"/>

  <GlobalNamingResources>
    <Environment name="simpleValue" type="java.lang.Integer" value="30"/>
    <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
       description="User database that can be updated and saved">
    </Resource>
    <ResourceParams name="UserDatabase">
      <parameter>
        <name>factory</name>
        <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
      </parameter>
      <parameter>
        <name>pathname</name>
        <value>conf/tomcat-users.xml</value>
      </parameter>
    </ResourceParams>
  </GlobalNamingResources>

  <Service name="Tomcat-Standalone">

  <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
               port="8080"
               enableLookups="true" redirectPort="8443"
               acceptCount="100" connectionTimeout="20000"
               useURIValidationHack="false" disableUploadTimeout="true" />
    <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
               port="8009" enableLookups="true" redirectPort="8443"
      acceptCount="100" debug="9"
               connectionTimeout="600000"
               useURIValidationHack="false"
               protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>

    <Engine name="Standalone" defaultHost="localhost" debug="9">

      <Logger className="org.apache.catalina.logger.FileLogger"
              prefix="catalina_log." suffix=".txt"
              timestamp="true"/>

      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
                 debug="0" resourceName="UserDatabase"/>

      <Host name="localhost" debug="9" appBase="webapps"
       unpackWARs="true" autoDeploy="true">

        <Logger className="org.apache.catalina.logger.FileLogger"
                 directory="logs"  prefix="localhost_log." suffix=".txt"
         timestamp="true"/>

        <Context path="/examples" docBase="examples" debug="9"
                 reloadable="false" crossContext="true">

          <Logger className="org.apache.catalina.logger.FileLogger"
                     prefix="localhost_examples_log." suffix=".txt"
           timestamp="true"/>
          <Ejb   name="ejb/EmplRecord" type="Entity"
                 home="com.wombat.empl.EmployeeRecordHome"
               remote="com.wombat.empl.EmployeeRecord"/>

          <Environment name="maxExemptions" type="java.lang.Integer"
                      value="15"/>
          <Parameter name="context.param.name" value="context.param.value"
                     override="false"/>
          <Resource name="jdbc/EmployeeAppDb" auth="SERVLET"
                    type="javax.sql.DataSource"/>
          <ResourceParams name="jdbc/EmployeeAppDb">

            <parameter><name>user</name><value>sa</value></parameter>
            <parameter><name>password</name><value></value></parameter>
            <parameter><name>driverClassName</name>
              <value>org.hsql.jdbcDriver</value></parameter>
            <parameter><name>driverName</name>
              <value>jdbc:HypersonicSQL:database</value></parameter>
          </ResourceParams>
          <Resource name="mail/Session" auth="Container"
                    type="javax.mail.Session"/>
          <ResourceParams name="mail/Session">
            <parameter>
              <name>mail.smtp.host</name>
              <value>localhost</value>
            </parameter>
          </ResourceParams>
          <ResourceLink name="linkToGlobalResource"
                    global="simpleValue"
                    type="java.lang.Integer"/>
        </Context>

      </Host>


   <!--  
=========================================================================================
   ============================================================================================= 
 -->
     <Host name="local_eaglevm.clients" debug="9" 
appBase="webapps/eurokom2/active" unpackWARs="true" autoDeploy="true">
    <Alias>XX.XX</Alias>
    <Logger timestamp="true" 
className="org.apache.catalina.logger.FileLogger" 
prefix="stats_eurokom_log-tomcat"/>
    <Context path="" workDir="work/pressweb" docBase="../pressweb" debug="9" 
reloadable="false">
    <Logger timestamp="true" 
className="org.apache.catalina.logger.FileLogger" 
prefix="stats_eurokom_log_insidecontext-tomcat"/>

     <Realm className="org.apache.catalina.realm.JDBCRealm"
      connectionName="xx"
      connectionPassword="xx"
      connectionURL="jdbc:oracle:thin:@database.XX.XX"
      driverName="oracle.jdbc.driver.OracleDriver"
      userCredCol="password"
      userNameCol="username"
      userTable="stats_auth_users"
      roleNameCol="role_name"
      userRoleTable="tomcat_roles"
      digest="MD5"
      debug="0"
      />

     <Resource name="jdbc/pressweb" auth="Container" 
type="javax.sql.DataSource"/>
     <ResourceParams name="jdbc/pressweb">
      <parameter><name>factory</name><value>org.apache.commons.dbcp.BasicDataSourceFactory</value></parameter>
      <parameter><name>driverClassName</name><value>oracle.jdbc.driver.OracleDriver</value></parameter>
      <parameter><name>username</name><value>client</value></parameter>
      <parameter><name>password</name><value>XX.XX</value></parameter>
      <parameter><name>url</name><value>jdbc:oracle:thin:@database.XX.XX</value></parameter>
      <parameter><name>maxActive</name><value>10</value></parameter>
      <parameter><name>maxIdle</name><value>10</value></parameter>
      <parameter><name>maxWait</name><value>60000</value></parameter>
      <parameter><name>defaultAutoCommit</name><value>true</value></parameter>
      <parameter><name>defaultReadOnly</name><value>false</value></parameter>
      <parameter><name>removeAbandoned</name><value>true</value></parameter>
      <parameter><name>removeAbandonedTimeout</name><value>60</value></parameter>
      <parameter><name>logAbandoned</name><value>true</value></parameter>
     </ResourceParams>

     <Resource name="mail/session" auth="Container" 
type="javax.mail.Session"/>
     <ResourceParams name="mail/session">
      <parameter><name>mail.smtp.host</name><value>XX.XX.XX</value></parameter>
     </ResourceParams>

    </Context>
   </Host>



   <Host name="local_eaglevm.cs" debug="9" appBase="webapps"
    unpackWARs="true" autoDeploy="true" liveDeploy="false">
    <Context path="/cs" docBase="cs" debug="9"
     reloadable="false" crossContext="true">
    <Logger timestamp="true" 
className="org.apache.catalina.logger.FileLogger" prefix="cs_log-tomcat" 
verbosity="4"/>

    <Realm className="org.apache.catalina.realm.MemoryRealm" />

    <Realm className="org.apache.catalina.realm.JDBCRealm"
      connectionName="client"
      connectionPassword="XX.XX"
      connectionURL="jdbc:oracle:thin:@database.XX.XX"
      driverName="oracle.jdbc.driver.OracleDriver"
      userCredCol="password"
      userNameCol="username"
      userTable="stats_auth_users"
      roleNameCol="role_name"
      userRoleTable="tomcat_roles"
      digest="MD5"
      debug="0"
      />

    </Context>
   </Host>



    </Engine>
  </Service>
</Server>


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


RE: Deploying discovered web applications

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Jonathan O'Donovan [mailto:jonathan.odonovan@eurokom.ie] 
> Subject: Re: Deploying discovered web applications
> 
> Or do you mean that some of the files have a timestamp set 
> to a time in the future?

Yes - transferring files from some system to another with a different
time base can cause "interesting" actions in Tomcat.

> Also, I have removed all .war files from that directory but 
> the problem persists.

Look in conf/Catalina/[host] for .xml files that provide <Context>
elements for the apps in question.  You probably also want to clean out
Tomcat's work directory to make sure there's no junk left lying around
in there.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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


Re: Deploying discovered web applications

Posted by Jonathan O'Donovan <jo...@eurokom.ie>.
Hi Chuck - many thanks for your help. I'm not sure what you mean by set in 
the future. Do you mean that the timestamp of some files get reset at some 
point after deployment and this makes tomcat redeploy. Or do you mean that 
some of the files have a timestamp set to a time in the future?

I searched through my /webapps folder but found no file with a timestamp set 
in the future. Also, I have removed all .war files from that directory but 
the problem persists.

Many thanks for your help,
Jonathan

----- Original Message ----- 
From: "Caldarale, Charles R" <Ch...@unisys.com>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Monday, April 28, 2008 1:18 PM
Subject: RE: Deploying discovered web applications


>> From: Jonathan O'Donovan [mailto:jonathan.odonovan@eurokom.ie]
>> Subject: Deploying discovered web applications
>>
>> I was wondering if anybody has encountered a situation where
>> Tomcat keeps deploying a given webapp?
>>
>> I noticed that it has cropped up on this forum before but
>> there doesn't seem to have been any solution found.
>
> The usual cause (as noted frequently on this mailing list) is timestamps
> on the .war files or directory entries set in the future.
>
> - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 


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


RE: Deploying discovered web applications

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Jonathan O'Donovan [mailto:jonathan.odonovan@eurokom.ie] 
> Subject: Deploying discovered web applications
> 
> I was wondering if anybody has encountered a situation where 
> Tomcat keeps deploying a given webapp?
> 
> I noticed that it has cropped up on this forum before but 
> there doesn't seem to have been any solution found.

The usual cause (as noted frequently on this mailing list) is timestamps
on the .war files or directory entries set in the future.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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