At 10:35 AM 5/21/2004, Allistair Crossley wrote:
We have a test and a production server. They are configured identically. The test server does not experience this log4j:ERROR Failed to rename [../logs/iq2/rar.log] to [../logs/iq2/rar.log.2004-05-20]. problem. Nor do we ever call LogManager.shutdown and have never needed to....needless to say the test tomcat is restarted quite a lot.


Shutting down/restarting Tomcat was not what I meant. Are you hot
re-deploying your web-application on the production server? Are you
performing any operations on one machine but not the other?

In the case of hot-redeploy, it is possible for the old version of
your application to remain in memory, so that it will continue to hold
a lock on the log file.

You can avoid this by calling LogManager.shutdown() when your
application is closed/recycled. See
javax.servlet.ServletContextListener for more information on
web-appplication lifecycle.

Writing and deploying your own ServletContextListener should be
easy. It is likely to help and is generally considered to be good
practice.

Last night I stopped the production server, redeployed the web application and killed all Java processes. Yet still this problem occurs. I even created a new directory into which the log files are stored and set permissions on that folder to be fully writeable.\

If I understand correctly, the problem occurs on the first roll over? You can accelerate the pace of rollover to be as fast as 1 minute. Use DatePattern=".yyyy-MM-dd-HH-mm"


I have used the handle tools to determine nothing other than multiple entries to the log files seem to be present in the tomcat process.

You are saying that it is well a lock issue. Correct?

I don't think this is an IS problem personally but I also cannot think why this reoccurs even after killing all Java processes.

What is "IS"?

Regards

-- Ceki G�lc�

For log4j documentation consider "The complete log4j manual"
ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to