|
From: Freddy A. <fr...@cf...> - 2007-07-26 21:09:03
|
I'm running this on windows XP for now and I'm trying to figure out how I can get a thread-dump from the running wrapper (JBoss 4.0.2) I don't want to run this in a console window but as a service. When the server has issues I would like to send a signal to the jvm and get a thread-dump, is this not possible? Here is my config: #******************************************************************** # Wrapper Properties #******************************************************************** wrapper.java.command=%JAVA_HOME%/bin/java wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp wrapper.java.classpath.1=%JAVA_HOME%/lib/tools.jar wrapper.java.classpath.2=../bin/run.jar wrapper.java.classpath.3=../lib/wrapper.jar wrapper.java.library.path.1=%JBOSS_HOME%/lib # Application parameters. Add parameters as needed starting from 1 wrapper.app.parameter.1=org.jboss.Main wrapper.app.parameter.2=-c wrapper.app.parameter.3=minimal # Initial Java Heap Size (in MB) wrapper.java.initmemory=1024 # Maximum Java Heap Size (in MB) wrapper.java.maxmemory=1024 wrapper.java.additional.1=-Dprogram.name=run.bat wrapper.java.additional.2=-Xss128k wrapper.java.additional.3=-XX:MaxPermSize=128m # Port which the native wrapper code will attempt to connect to wrapper.port=1777 #******************************************************************** # Wrapper Logging Properties #******************************************************************** wrapper.console.format=PM wrapper.console.loglevel=STATUS wrapper.logfile=logs/wrapper.log wrapper.logfile.format=LPTM wrapper.logfile.loglevel=STATUS # Maximum size that the log file will be allowed to grow to before # the log is rolled. Size is specified in bytes. The default value # of 0, disables log rolling. May abbreviate with the 'k' (kb) or # 'm' (mb) suffix. For example: 10m = 10 megabytes. wrapper.logfile.maxsize=1m # Maximum number of rolled log files which will be allowed before old # files are deleted. The default value of 0 implies no limit. wrapper.logfile.maxfiles=5 # Log Level for sys/event log output. (See docs for log levels) wrapper.syslog.loglevel=NONE #******************************************************************** # Wrapper NT Service parameters #******************************************************************** # Title to use when running as a console wrapper.console.title= JBoss Application Server 4.0.2 wrapper.ntservice.name=JBoss wrapper.ntservice.displayname=JBoss Application Server 4.0.2 wrapper.ntservice.description=JBoss Application Server 4.0.2 wrapper.ntservice.dependency.1= wrapper.ntservice.starttype=AUTO_START wrapper.ntservice.interactive=false |
|
From: Leif M. <le...@ta...> - 2007-07-27 16:02:50
|
Freddy, There are a few ways to do this. 1) Make use of the WrapperManager.requestThreadDump() method. This of course requires a hook into your application. 2) Make use of the WrapperActionServer class. You have to add some code to initialize this class, but other than that it is quite simple. You can then initiate a thread dump or perform other functions via telnet. 3) Use the command file feature to invoke the thread dump: http://wrapper.tanukisoftware.org/doc/english/prop-commandfile.html Please note that there is currently a problem in current versions where the Wrapper can not invoke a thread dump unless a console window exists for the service. This has been fixed for the upcoming 3.2.0 release. To work around this in the current version you must either add a console with the wrapper.ntservice.console=true property http://wrapper.tanukisoftware.org/doc/english/prop-ntservice-console.html Or tell the wrapper to execute thread dumps if a shutdown failure occurs: wrapper.request_thread_dump_on_failed_jvm_exit=true http://wrapper.tanukisoftware.org/doc/english/prop-request-thread-dump-on-failed-jvm-exit.html Cheers, Leif Freddy Andersen wrote: > I'm running this on windows XP for now and I'm trying to figure out > how I can get a thread-dump from the running wrapper (JBoss 4.0.2) > > I don't want to run this in a console window but as a service. When > the server has issues I would like to send a signal to the jvm and get > a thread-dump, is this not possible? > > Here is my config: (snip) |
|
From: miken <mik...@gm...> - 2007-08-16 21:00:22
|
Hi there, I'm interested in option 1. Does anybody have a simple example showing how to use requestThreadDump()? Especially, how to log on to the JMX console if there's a form based authentication mechanism (which will rely on a database to provide user / role information) in place. Thanks for your help in advance, Mike Leif Mortenson-2 wrote: > > Freddy, > There are a few ways to do this. > > 1) Make use of the WrapperManager.requestThreadDump() method. > This of course requires a hook into your application. > > 2) Make use of the WrapperActionServer class. > You have to add some code to initialize this class, but other than that > it is quite simple. You can then initiate a thread dump or perform > other functions via telnet. > > 3) Use the command file feature to invoke the thread dump: > http://wrapper.tanukisoftware.org/doc/english/prop-commandfile.html > Please note that there is currently a problem in current versions > where the Wrapper can not invoke a thread dump unless a console > window exists for the service. This has been fixed for the upcoming > 3.2.0 release. > To work around this in the current version you must either add a > console with the wrapper.ntservice.console=true property > http://wrapper.tanukisoftware.org/doc/english/prop-ntservice-console.html > Or tell the wrapper to execute thread dumps if a shutdown failure > occurs: wrapper.request_thread_dump_on_failed_jvm_exit=true > http://wrapper.tanukisoftware.org/doc/english/prop-request-thread-dump-on-failed-jvm-exit.html > > Cheers, > Leif > > Freddy Andersen wrote: >> I'm running this on windows XP for now and I'm trying to figure out >> how I can get a thread-dump from the running wrapper (JBoss 4.0.2) >> >> I don't want to run this in a console window but as a service. When >> the server has issues I would like to send a signal to the jvm and get >> a thread-dump, is this not possible? >> >> Here is my config: > (snip) > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Wrapper-user mailing list > Wra...@li... > https://lists.sourceforge.net/lists/listinfo/wrapper-user > > -- View this message in context: http://www.nabble.com/Re%3A-Cant-get-a-thread-dump-tf4154131.html#a12189421 Sent from the Java Service Wrapper mailing list archive at Nabble.com. |
|
From: Markus S. <sc...@gm...> - 2007-08-17 06:33:16
|
I don't know if this is the answer you are looking for, but we use JConsole from the 1.5-Jdk to inspect the server if it has some troubles. When we don't run in production, you can simply start your server with the cmd-line flags: wrapper.java.additional.10=-Dcom.sun.management.jmxremote.port=9999 wrapper.java.additional.11=-Dcom.sun.management.jmxremote.authenticate=false wrapper.java.additional.12=-Dcom.sun.management.jmxremote.ssl=false Then you can login on the specified port without any authentication. In JConsole, go to the "Thread"-Tab and insoect all of your threads at runtime. For Production-Server, you have to configure the JMX-Authentication of corse. Markus 2007/8/16, miken <mik...@gm...>: > > > Hi there, > > I'm interested in option 1. Does anybody have a simple example showing how > to use requestThreadDump()? Especially, how to log on to the JMX console > if > there's a form based authentication mechanism (which will rely on a > database > to provide user / role information) in place. > > Thanks for your help in advance, > > Mike > > > Leif Mortenson-2 wrote: > > > > Freddy, > > There are a few ways to do this. > > > > 1) Make use of the WrapperManager.requestThreadDump() method. > > This of course requires a hook into your application. > > > > 2) Make use of the WrapperActionServer class. > > You have to add some code to initialize this class, but other than that > > it is quite simple. You can then initiate a thread dump or perform > > other functions via telnet. > > > > 3) Use the command file feature to invoke the thread dump: > > http://wrapper.tanukisoftware.org/doc/english/prop-commandfile.html > > Please note that there is currently a problem in current versions > > where the Wrapper can not invoke a thread dump unless a console > > window exists for the service. This has been fixed for the upcoming > > 3.2.0 release. > > To work around this in the current version you must either add a > > console with the wrapper.ntservice.console=true property > > > http://wrapper.tanukisoftware.org/doc/english/prop-ntservice-console.html > > Or tell the wrapper to execute thread dumps if a shutdown failure > > occurs: wrapper.request_thread_dump_on_failed_jvm_exit=true > > > http://wrapper.tanukisoftware.org/doc/english/prop-request-thread-dump-on-failed-jvm-exit.html > > > > Cheers, > > Leif > > > > Freddy Andersen wrote: > >> I'm running this on windows XP for now and I'm trying to figure out > >> how I can get a thread-dump from the running wrapper (JBoss 4.0.2) > >> > >> I don't want to run this in a console window but as a service. When > >> the server has issues I would like to send a signal to the jvm and get > >> a thread-dump, is this not possible? > >> > >> Here is my config: > > (snip) > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Splunk Inc. > > Still grepping through log files to find problems? Stop. > > Now Search log events and configuration files using AJAX and a browser. > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > _______________________________________________ > > Wrapper-user mailing list > > Wra...@li... > > https://lists.sourceforge.net/lists/listinfo/wrapper-user > > > > > > -- > View this message in context: > http://www.nabble.com/Re%3A-Cant-get-a-thread-dump-tf4154131.html#a12189421 > Sent from the Java Service Wrapper mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Wrapper-user mailing list > Wra...@li... > https://lists.sourceforge.net/lists/listinfo/wrapper-user > |