9 Replies Latest reply on Mar 1, 2013 4:07 AM by steljboss

    Thread Dumps for JBoss AS 7 as Windows Service

    steljboss

      I am trying to take thread dumps for our JBoss 7.1.1 server that is running as a windows service however failing to do so. I have tried

       

      • jstack -l PID --> result is access denied
      • visualvm       ---> It does not see the process, even when I have run visualvm with the same user as the JBoss server is running or as LOCAL SYSTEM (Note JMX connection [1] fails [2])
      • jconsole       --> Based on [3] I can take a Heap Dump but do not see any operations to take a Thread Dump

       

      The problem is as we are running the JBoss as a window service and it does not manifest itself when we are simply starting the server using the standalone or domain scripts

       

      [1] http://docs.oracle.com/javase/6/docs/technotes/guides/visualvm/jmx_connections.html

      [2]

      WARNING: Failed to load the specified log manager class org.jboss.logmanager.LogManager
      Exception in thread "main" java.lang.ExceptionInInitializerError
       at org.jboss.as.server.Main.main(Main.java:73)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.modules.Module.run(Module.java:260)
       at org.jboss.modules.Main.main(Main.java:291)
      Caused by: java.lang.IllegalStateException: The LogManager was not properly installed (you must set the "java.util.logging.manager" system property to "org.jboss.logmanager.LogManager")
       at org.jboss.logmanager.Logger.getLogger(Logger.java:60)
       at org.jboss.logmanager.log4j.BridgeRepositorySelector.<clinit>(BridgeRepositorySelector.java:42)
       ... 7 more
      

      As I set the logmanager it is still not working

      [3] https://community.jboss.org/wiki/UsingJconsoleToConnectToJMXOnAS7