tags:

views:

117

answers:

3

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.

A: 

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@3290a11e (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!

A: 

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.

pra
Thanks for your suggestion. I am pretty sure that Ctrl+C was not the cause of this issue. Forgot to mention that jboss is installed in RHEL
A: 

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).

Péter Török