开发者

How to enable JBoss server TRACE log?

I am having web application running in JBOSS AS 4.2.2.

Observed that jboss server automatically shuts down, and the following exception is observed in server.log

14:20:38,048 INFO  [Server] Runtime shutdown hook called, forceHalt: true
14:20:38,049 INFO  [Server] JBoss SHUTDOWN: Undeploying all packages

I want to enable TRACE for org.jboss.system.server.Server in jboss-log4j.xml, to hopefully get some more info when the server shuts down.

Please let me know how to enable TRACE for org.jboss.system.server.Server in jboss-log4j.xml.


I was able to add trace for server log and i could see the following output when JBOSS AS shuts down automatically:

2010-06-09 19:07:46,631 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] END handleRequest: jboss.ws:context=hpnp_lqs,endpoint=APIWebService
2010-06-09 19:07:46,631 DEBUG [org.jboss.ws.core.soap.MessageContextAssociation] popMessageContext: org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS@3290a1开发者_运维问答1e (Thread http-0.0.0.0-8080-1)
2010-06-09 19:07:55,895 INFO  [org.jboss.system.server.Server] Runtime shutdown hook called, forceHalt: true
2010-06-09 19:07:55,895 TRACE [org.jboss.system.server.Server] Shutdown caller:
java.lang.Throwable: Here
    at org.jboss.system.server.ServerImpl$ShutdownHook.shutdown(ServerImpl.java:1017)
    at org.jboss.system.server.ServerImpl$ShutdownHook.run(ServerImpl.java:996)
2010-06-09 19:07:55,895 INFO  [org.jboss.system.server.Server] JBoss SHUTDOWN: Undeploying all packages

If anybody, has any clue, on what might be cause for automatic shutdown, pls help me. Thanks!


There's a JBoss wiki page listing log output for various shutdown causes. It looks like yours was caused by a Ctrl-C. I assume you would have known if you hit Ctrl-C, though.

On unix-type servers, Ctrl-C generates a TERM signal, which could also come from someone or some script running as your jboss user or as root executing "kill <jboss pid>". If you're on linux I'd take a look at this question about the OOM killer.


One possible cause for this behaviour is console logout. We have observed this with our own server.

In brief, by default the Sun JVM listens to the event of the console user logging out, and shuts itself down automatically when that happens. To disable this, start the JVM with the -Xrs parameter.

See here for more details (look for Mysterious shutdowns).


One possible cause for a forced shutdown is if the virtual machine is out of memory.

I had this problem several years ago when a colleague implemented some very nasty bulk loading of objects from a database which caused jboss to shutdown on certain requests.

Try searching for "memory" or similar keywords in the log file and/or monitor the memory usage of the server.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜