tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean McEligot <seanmc...@gmail.com>
Subject Re: war not redeploying
Date Thu, 19 Aug 2010 12:49:23 GMT
On Wed, Aug 18, 2010 at 3:57 PM, Mark Eggers <its_toasted@yahoo.com> wrote:
> Are you starting and stopping Tomcat under Cygwin? I've seen some interesting
> file locking problems (as well as the "terminate batch job?" question) when
> running Windows applications under Cygwin.
>
> How are you deploying your web application? Are you copying the new war file
> into $CATALINA_HOME/webapps, using the manager application, or deploying via an
> IDE?
>
> I'm on Linux at the moment, so I can't explore this. However, here are some
> things you might try.
>
> 1. Run everything under DOS.

I'll give it a try, thought I can't imaging how cygwin would have
locks unless you cd'd into your expanded war or opened files there.

> If you're a UNIX person, then this is not going to be as comfortable as running
> Cygwin, but it will remove some unintended consequences. Or as Konstantin
> suggested, run things on Linux.
>
> 2. Use the manager application for deployment.

I removed both ROOT and manager webapps. Only my webapp remains.

> If you are looking at a command line mechanism for deploying applications to
> production, you might take a look at the Ant tasks. Documentation for the Ant
> tasks can be found here:
>
> http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html#Executing_Manager_Commands_With_Ant

I would like it if it worked without the manager webapp, but I'm think
it doesn't.

> 3. Use the IDE in a development environment
>
> Both NetBeans and Eclipse allow you to deploy to a running Tomcat (and start /
> stop Tomcat) from within the IDE. In a development environment I find that much
> more convenient than opening a shell and executing commands.

I might try Eclipse, but we have 20 webapps running on 11 tomcat
servers, and one login server must always be running, so it becomes
complicated.


> Some quick notes on your web application (which I don't think will affect its
> loading and unloading):

> 1. Debug is no longer a valid attribute for the Context element.

removed.

> 2. There appear to be some issues with with your Resource element describing
> your JDBC connection.

Yes, maxIdle, maxActive. It looked harmless so I never go around to
fixing it, but I'll do that.

> 3. Some of the connection pool threads issues could be due to a JDBC driver. If
> you're using MySQL, make sure you have the latest JDBC driver. Versions before
> 5.1.11 did cause problems.

oracle-9.0.2.0.0.jar over oracle.  There is a home grown connection
pool in front of the tomcat pool. It's been used for 11 years to
prevent connection leaks. I can look at that.

>
> . . . . just my two cents.
>
> /mde/
>
>
> ----- Original Message ----
> From: Sean McEligot <seanmce33@gmail.com>
> To: Tomcat Users List <users@tomcat.apache.org>
> Sent: Wed, August 18, 2010 12:04:46 PM
> Subject: Re: war not redeploying
>
> On Wed, Aug 18, 2010 at 11:56 AM, Konstantin Kolinko
> <knst.kolinko@gmail.com> wrote:
>>> 6.0.25
>>
>> An odd version...
>
> I'm in the middle of purchasing springsource-tc. The version is
> actually springsource tomcat-6.0.25.A-RELEASE, but I don't think they
> change anything except they have multiple catalina.base servers for
> one catalina.home. I had the same problem on standard tomcat 6.0.20.
>
>>
>>> shutdown; rm
>> -rf webapps/appname work/* temp/*; startup.
>>
>> Do you run rm -rf on Windows?
>
> Yes. I'm using cygwin.
>
>> Note, that there is also the following file:
>> conf/Catalina/localhost/<appname>.xml   What is its modification time?
>> Is clock set up correctly on the machine?
>
> The clock is working.There isn't anything in conf/Catalina/localhost.
> The directory is empty.
>>
>>> antiJARLocking="true" antiResourceLocking="true"
>>
>> It would be better to test on some Linux machine. You won't be using
>> the above options on Solaris.
>
> Well, this is important in production, but also in development. Since
> the problem is sporadic and fails silently. There's been a few
> occasions where I think my code fix isn't working, only to find out
> the code was never deployed. That can be very frustrating.
>
> For now I'll reset the context.xml to <Context> since none of those
> options are helping me.
>
>>
>> Also different end-of-line handling, '/' vs '\', file names, filename
>> case sensitivity may catch you.
>>
>>>    <WatchedResource>build.txt</WatchedResource>
>>
>> WatchedResource is used to reload a webapp (e.g. when editing
>> web.xml), not to redeploy it.
>
> OK. I don't need WatchedResource then. I've removed it.
>
>>   By the way, please create or edit your
>> webapp's META-INF/context.xml,  not the default one.
>
> I've reset context.xml back to default except jdbc resources and access logging.
>
>> Are there any messages in the logs?
>
> No. The logs are silent when I deploy. There were some errors on the
> last undeploy before it stopped working. See below.
>
>>
>> Are you using this webapps folder (e.g., Tomcat can be run with a
>> different CATALINA_BASE).
>
> I'm sure because I've verified it when redeploy is working.
>
>
>> Best regards,
>> Konstantin Kolinko
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
> Here's the logs from deploying and then undeploying the war. After
> this it does not redeploy and there are no message when I try to
> redeploy.
>
> 18-Aug-2010 14:16:22.796 INFO
> org.apache.catalina.startup.HostConfig.deployWAR Deploying web
> application archive blview.war
>
> 18-Aug-2010 14:16:24.546 WARNING
> org.apache.tomcat.jdbc.pool.ConnectionPool.init maxIdle is larger than
> maxActive, setting maxIdle to: 2
>
> 18-Aug-2010 14:16:24.562 WARNING
> org.apache.tomcat.jdbc.pool.ConnectionPool.init maxIdle is larger than
> maxActive, setting maxIdle to: 2
>
> 18-Aug-2010 14:16:24.562 WARNING
> org.apache.tomcat.jdbc.pool.ConnectionPool.init maxIdle is larger than
> maxActive, setting maxIdle to: 2
>
> 18-Aug-2010 14:16:24.562 WARNING
> org.apache.tomcat.jdbc.pool.ConnectionPool.init maxIdle is larger than
> maxActive, setting maxIdle to: 2
>
> 18-Aug-2010 14:16:24.562 WARNING
> org.apache.tomcat.jdbc.pool.ConnectionPool.init maxIdle is larger than
> maxActive, setting maxIdle to: 2
>
> 18-Aug-2010 14:17:06.437 WARNING
> com.springsource.tcserver.serviceability.request.ThreadDiagnosticsValve.log
> RequestDiagnostics[slow-request]
> com.springsource.tcserver.serviceability.request.ThreadDiagnostics@323274
> - Requests Statistics[1]:
>    URI:/blview/BLView
>        Query String:null
>    Start Time:18 Aug 2010 18:16:52 GMT
>    Completion Time:18 Aug 2010 18:17:06 GMT
>    Duration:14359 ms.
>    GC Collections:8 .
>    GC Collection Times:24 ms.
>        GC Bean:Copy Collections:8 Collection Time:24
>        GC Bean:MarkSweepCompact Collections:0 Collection Time:0
>    Nr of Connections Acquired(success):0
>    Nr of Connections Acquired(failures):0
>    Time waiting for a connection:0 ms.
>    Queries[0]
>    Queries[0 ms.]
>
>
> 18-Aug-2010 14:19:51.671 INFO
> org.apache.catalina.startup.HostConfig.checkResources Undeploying
> context [/blview]
>
> 18-Aug-2010 14:19:51.718 SEVERE
> org.apache.catalina.loader.WebappClassLoader.clearReferencesThreads A
> web application appears to have started a thread named
> [[Pool-Cleaner]:Tomcat Connection Pool[1-31022504]] but has failed to
> stop it. This is very likely to create a memory leak.
>
> 18-Aug-2010 14:19:51.718 SEVERE
> org.apache.catalina.loader.WebappClassLoader.clearReferencesThreads A
> web application appears to have started a thread named
> [[Pool-Cleaner]:Tomcat Connection Pool[2-31022504]] but has failed to
> stop it. This is very likely to create a memory leak.
>
> 18-Aug-2010 14:19:51.718 SEVERE
> org.apache.catalina.loader.WebappClassLoader.clearReferencesThreads A
> web application appears to have started a thread named
> [[Pool-Cleaner]:Tomcat Connection Pool[3-31022504]] but has failed to
> stop it. This is very likely to create a memory leak.
>
> 18-Aug-2010 14:19:51.718 SEVERE
> org.apache.catalina.loader.WebappClassLoader.clearReferencesThreads A
> web application appears to have started a thread named
> [[Pool-Cleaner]:Tomcat Connection Pool[4-31022504]] but has failed to
> stop it. This is very likely to create a memory leak.
>
> 18-Aug-2010 14:19:51.718 SEVERE
> org.apache.catalina.loader.WebappClassLoader.clearReferencesThreads A
> web application appears to have started a thread named
> [[Pool-Cleaner]:Tomcat Connection Pool[5-31022504]] but has failed to
> stop it. This is very likely to create a memory leak.
>
> 18-Aug-2010 14:19:51.718 SEVERE
> org.apache.catalina.loader.WebappClassLoader.clearThreadLocalMap A web
> application created a ThreadLocal with key of type [null] (value
> [ch.qos.logback.core.UnsynchronizedAppenderBase$1@1abdac9]) and a
> value of type [java.lang.Boolean] (value [false]) but failed to remove
> it when the web application was stopped. To prevent a memory leak, the
> ThreadLocal has been forcibly removed.
>
> 18-Aug-2010 14:19:51.718 SEVERE
> org.apache.catalina.loader.WebappClassLoader.clearThreadLocalMap A web
> application created a ThreadLocal with key of type [null] (value
> [ch.qos.logback.core.UnsynchronizedAppenderBase$1@1abdac9]) and a
> value of type [java.lang.Boolean] (value [false]) but failed to remove
> it when the web application was stopped. To prevent a memory leak, the
> ThreadLocal has been forcibly removed.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

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


Mime
View raw message