Re: JVM crash with Log4J.

2010-04-08 Thread Yair Ogen
Hot deploy is when you load a new version of a war for example while the
server is still running. This triggers a chain of init actions on the server
side.

I see from the logs the doGet method in the servlet caused a init of log4j
configuration.

try looking in that direction. I think this should not happen.

The exception logged indicates a class file was changed in the middle of
using it (or something like that). these things sometime happen when using
hot deploy.

On Wed, Apr 7, 2010 at 4:40 PM, Shahnaz Ali shaan20...@gmail.com wrote:

 Hi,

 Thanks for your quick response.

 This crash happens only once so far in a year. After restart of OS and
 Tomcat, without any change system is working fine again. This is a telco
 system, so they need to know reason of crash. And if possible solution of
 that.

 Actually this is a server side application which receives calls. At one
 time
 it may receive around 150 concurrent calls. When I check logs, i notice
 there were around 900 call sessions. No clue how it happened.

 Application is in production, so we just cant change the configuration so
 easily. We haven't tried with Java 6.

 Current Log4J version is: log4j-1.2.8.jar
 Java Version is: 1.5
 OS: Redhat Linux

 Please explain, what do you mean by hot deploy here?


 BR,
 Shahnaz Ali.



 On Wed, Apr 7, 2010 at 6:10 PM, Michael Erskine mse...@googlemail.com
 wrote:

  On 7 April 2010 13:19, Shahnaz Ali shaan20...@gmail.com wrote:
   We have IVR application running on tomcat web application server on
  Redhat
   linux OS, using Log4J. This is a mission critical server application
 with
   good amount of call load.
  
   Recently we faced JVM (tomcat) crash and major of errors before crash
   pointing to Log4J. We are not expert in Log4J, though of sharing with
 you
   and take your feedback. If you can point out the reason and corrective
   action, will be great.
 
  Tomcat running as root? 1080 threads?  :o
 
  I can see the PropertyConfigurator failing repeatedly - once for each
  HTTP daemon?
  Is this something to do with...
  -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
 
  Does this Log4j configuration usually work?
  Have you tried running on a recent version of Java 6?
 
  Regards,
  Michael Erskine.
 
  -
  To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
  For additional commands, e-mail: log4j-user-h...@logging.apache.org
 
 



Re: JVM crash with Log4J.

2010-04-08 Thread Shahnaz Ali
No, there was no any hot deployment. We deploy our application WAR file and
restart tomcat. This is a must for us. And there was no any change to Log4J
library jar file.

BR,
Shahnaz Ali.



On Thu, Apr 8, 2010 at 12:13 PM, Yair Ogen yairo...@gmail.com wrote:

 Hot deploy is when you load a new version of a war for example while the
 server is still running. This triggers a chain of init actions on the
 server
 side.

 I see from the logs the doGet method in the servlet caused a init of log4j
 configuration.

 try looking in that direction. I think this should not happen.

 The exception logged indicates a class file was changed in the middle of
 using it (or something like that). these things sometime happen when using
 hot deploy.

 On Wed, Apr 7, 2010 at 4:40 PM, Shahnaz Ali shaan20...@gmail.com wrote:

  Hi,
 
  Thanks for your quick response.
 
  This crash happens only once so far in a year. After restart of OS and
  Tomcat, without any change system is working fine again. This is a telco
  system, so they need to know reason of crash. And if possible solution of
  that.
 
  Actually this is a server side application which receives calls. At one
  time
  it may receive around 150 concurrent calls. When I check logs, i notice
  there were around 900 call sessions. No clue how it happened.
 
  Application is in production, so we just cant change the configuration so
  easily. We haven't tried with Java 6.
 
  Current Log4J version is: log4j-1.2.8.jar
  Java Version is: 1.5
  OS: Redhat Linux
 
  Please explain, what do you mean by hot deploy here?
 
 
  BR,
  Shahnaz Ali.
 
 
 
  On Wed, Apr 7, 2010 at 6:10 PM, Michael Erskine mse...@googlemail.com
  wrote:
 
   On 7 April 2010 13:19, Shahnaz Ali shaan20...@gmail.com wrote:
We have IVR application running on tomcat web application server on
   Redhat
linux OS, using Log4J. This is a mission critical server application
  with
good amount of call load.
   
Recently we faced JVM (tomcat) crash and major of errors before crash
pointing to Log4J. We are not expert in Log4J, though of sharing with
  you
and take your feedback. If you can point out the reason and
 corrective
action, will be great.
  
   Tomcat running as root? 1080 threads?  :o
  
   I can see the PropertyConfigurator failing repeatedly - once for each
   HTTP daemon?
   Is this something to do with...
   -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
  
   Does this Log4j configuration usually work?
   Have you tried running on a recent version of Java 6?
  
   Regards,
   Michael Erskine.
  
   -
   To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
   For additional commands, e-mail: log4j-user-h...@logging.apache.org
  
  
 



Re: Multiple log files, multiple logger names and the same appender

2010-04-08 Thread Mohan.Radhakrishnan

Hopefully more explanation can attract some ideas here.

I am using XML configuration and a custom appender. So I have one section in
the XML corresponding to one logger name and one log file.

So for each different logger name, log file and the same custom appender I
need to add one more section in log4j.xml

Is there a way to parameterize the logger section and the log file so that
one section can substitute for multiple sections ? The same appender is used
for all sections.
-- 
View this message in context: 
http://old.nabble.com/Multiple-log-files%2C-multiple-logger-names-and-the-same-appender-tp28024737p28175329.html
Sent from the Log4j - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



Re: JVM crash with Log4J.

2010-04-08 Thread Michael Erskine
On 8 April 2010 07:47, Shahnaz Ali shaan20...@gmail.com wrote:
 No, there was no any hot deployment.

But the evidence points to a change of class so something equivalent
to a redeployment must have happened. Something caused a deployed
class to be reloaded and that operation failed due to a class
incompatibility. That is what happened. Unless the logs are somehow
fabricated :)

The cause of the crash however could be anything! Have a try at
repeating it by dropping newer Wars and Jars. Upgrade your Java
runtime to apply all the officially available fixes. Quit running
Tomcat as root :)

Regards,
Michael Erskine.

-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



Re: JVM crash with Log4J.

2010-04-08 Thread Shahnaz Ali
Hi,

Its not possible to do these kind of experiments in running production
server. But i am sure there is nothing happened like redeploying new war,
jar or any kind of change. Server was untouched for last several hours.

Logs are not fabricated, yeah i took only the portion when problem started.
and the JVM crash dump.

The reason of crash even could be out of Log4J, but i m here to discuss, why
logs are pointing to only Log4J. And more over all the errors it is pointing
should not even work after tomcat restart. Infact everything is working fine
after OS restart without any single change.

BR,
Shahnaz Ali.





On Thu, Apr 8, 2010 at 1:47 PM, Michael Erskine mse...@googlemail.comwrote:

 On 8 April 2010 07:47, Shahnaz Ali shaan20...@gmail.com wrote:
  No, there was no any hot deployment.

 But the evidence points to a change of class so something equivalent
 to a redeployment must have happened. Something caused a deployed
 class to be reloaded and that operation failed due to a class
 incompatibility. That is what happened. Unless the logs are somehow
 fabricated :)

 The cause of the crash however could be anything! Have a try at
 repeating it by dropping newer Wars and Jars. Upgrade your Java
 runtime to apply all the officially available fixes. Quit running
 Tomcat as root :)

 Regards,
 Michael Erskine.

 -
 To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
 For additional commands, e-mail: log4j-user-h...@logging.apache.org




Re: JVM crash with Log4J.

2010-04-08 Thread Michael Erskine
On 8 April 2010 10:27, Shahnaz Ali shaan20...@gmail.com wrote:
 Its not possible to do these kind of experiments in running production
 server. But i am sure there is nothing happened like redeploying new war,
 jar or any kind of change. Server was untouched for last several hours.

Don't you have an identical test/backup server running your production code? :o

 The reason of crash even could be out of Log4J, but i m here to discuss, why
 logs are pointing to only Log4J. And more over all the errors it is pointing
 should not even work after tomcat restart. Infact everything is working fine
 after OS restart without any single change.

Log4j logs it's problems so when underlying problems occur, they get
logged! If your platform (JVM, application server, host OS) is
unstable (or suspect it is), set up some test conditions and try to
recreate the problem. I can't suggest anything more than that without
doing your job for you :)

Regards,
Michael Erskine.

-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



RE: [SCL-2] Re: Multiple log files, multiple logger names and the same appender

2010-04-08 Thread Bender Heri
If I understand you correctly, you want to have several loggers all using the 
same appender? 

Use the hierarchical approach of the logger repository by prefixing your logger 
names:

logger name=loggerFamily1.Test1
level value=info/
/logger

logger name=loggerFamily1.Test2
level value=warn/
/logger

logger name=loggerFamily1 additivity=false
appender-ref ref=MultiplexingAppender1 /
/logger

 more loggers for family2

logger name=loggerFamily2 additivity=false
appender-ref ref=MultiplexingAppender2 /
/logger

Like this all loggers of loggerFamily1 write to the appender 
MultiplexingAppender1, but on different log-levels, and all loggers of 
loggerFamily2 write to appender MultiplexingAppender2.

Heri

-Original Message-
From: Mohan.Radhakrishnan [mailto:moh...@fss.co.in] 
Sent: Thursday, April 08, 2010 9:55 AM
To: log4j-user@logging.apache.org
Subject: [SCL-2] Re: Multiple log files, multiple logger names and the same 
appender


Hopefully more explanation can attract some ideas here.

I am using XML configuration and a custom appender. So I have one section in
the XML corresponding to one logger name and one log file.

So for each different logger name, log file and the same custom appender I
need to add one more section in log4j.xml

Is there a way to parameterize the logger section and the log file so that
one section can substitute for multiple sections ? The same appender is used
for all sections.
-- 
View this message in context: 
http://old.nabble.com/Multiple-log-files%2C-multiple-logger-names-and-the-same-appender-tp28024737p28175329.html
Sent from the Log4j - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org


-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org