Sun Microsystems 820682310 Stack Traces and Thread Dumps, VisualVM, Type the following command

Page 18
Stack Traces and Thread Dumps

Troubleshooting Tools

Stack Traces and Thread Dumps

A stack trace is a user-friendly snapshot of the threads and monitors in a Virtual Machine for the Java platform (Java Virtual Machine or JVM machine). A thread dump shows what every thread in a JVM is doing at a given time and is useful in debugging. When the application server freezes, hangs, or becomes sluggish for no apparent reason, you should generate and analyze a thread dump.

This section explains how to obtain a thread dump for Enterprise Server. More information about analyzing the information contained in a thread dump can be found in “An Introduction to Java Stack Traces” (http://java.sun.com/developer/technicalArticles/Programming/Stacktrace). By default, the server dumps a core file and restarts with the-Xrs java-option flag in the server.xml file.

To Obtain a Server Thread Dump

Type the following command:

asadmin generate-jvm-report --type=thread

See Also generate-jvm-report(1)

VisualVM

VisualVM is a Java troubleshooting tool that uses various technologies such as jvmstat, JMXTM, and Attach API to access monitored applications. VisualVM is a tool for visualizing data sources and by default visualizes the following types: applications, hosts, snapshots, core dumps, heap dumps, and thread dumps. These data sources are visualized in VisualVM so that they can be monitored for the purposes of analysis, management, and troubleshooting. VisualVM is commonly used to detect memory leaks.

VisualVM has a GlassFish plugin that enhances monitoring of hosted applications by adding specialized overview, a tab for monitoring the HTTP Service, and the ability to visually select and monitor any of the deployed web applications. You can experiment with VisualVM troubleshooting capabilities, but note that various features depend on the Java versions used in the client and server. Depending on your configuration, you might only get parts of the VisualVM features. For more information about VisualVM, see https://visualvm.dev.java.net.

18

Sun GlassFish Enterprise Server v3 Prelude Troubleshooting Guide • November 2008

Image 18
Contents v3 Prelude Troubleshooting Guide Sun GlassFish Enterprise ServerSun Microsystems, Inc 4150 Network Circle Santa Clara, CA U.S.A This distribution may include materials developed by third parties Contents 1 Overview of Enterprise Server TroubleshootingWas Application Deployment Successful? Administration FAQs Update Tool FAQs How Do I Use Update Tool to Extend My Enterprise Server Installation?Index Enterprise Server Documentation Set “Symbol Conventions” on page “Default Paths and File Names” on pagePreface “Enterprise Server Documentation Set” on pageTABLE P-1 Books in the Enterprise Server Documentation Set ContinuedRelated Documentation Typographic Conventionshttp//developers.sun.com/javadb The following table explains symbols that might be used in this book Symbol ConventionsDefault Paths and File Names Symbol ConventionsDocumentation, Support, and Training Searching Sun Product DocumentationThird-Party Web Site References Sun Welcomes Your Comments “Where to Go for More Information” on page Identifying the Problem“Identifying the Problem” on page “Troubleshooting Tools” on page First StepsSearch the Product Documentation Verify System Requirements and ConfigurationReview Known Issues Search the GlassFish Mailing Lists and ForumsGathering Information When Does the Problem Occur?What Is Your Environment? Search the SunSolve KnowledgebaseWhat Is Your System Configuration? What Is Different?Examining Log Files Operating System Utilities Troubleshooting ToolsMonitoring the System “Operating System Utilities” on pageVisualVM Type the following commandStack Traces and Thread Dumps To Obtain a Server Thread DumpWhere to Go for More Information Page “Cannot Access Local Server http//localhost8080” on page Specific IssuesCannot Access Local Server http//localhost8080 “Cannot Access Remote Server” on pageWas the Server Started at the Expected Port? To Determine Which Port Number the Server Is Actually UsingDid the Server Start? DescriptionSolution Cannot Access Remote ServerIs the Proxy Setting Causing a Problem? “Is the Proxy Setting Causing a Problem?” on page“Is the Security Manager Disabled?” on page Cannot Access the Administration Console“Is the Administration Console Running on the Expected Port?” on page Is the Application Server Running?Is the Security Manager Disabled? Cannot Access a Server ApplicationIs the Administration Console Running on the Expected Port? “Administrator User Name or Password Not Known” on pageWas Application Deployment Successful? Administrator User Name or Password Not KnownTo Remove the User Name and Password Completely 1 Stop the server, if it is currently running4 Start the server 8 Restart the server for the new user name-password to take effectServer Will Not Start on Windows Port Conflict 7 Uncomment the security-constraint element in the web.xml fileHas an Ungraceful Shutdown Occurred on a Previously Running Server? SolutionTwo Server Instances Bind to Same Port on Windows DescriptionIssues Related to Applications Error When Deploying EARCannot Produce a JVM Thread Dump After Server Crash Cannot Find SunDeploymentManager http//blogs.sun.com/quinn/entry/deploymentinglassfishv3preludeError CLI143 There is more than one domain Issues Related to asadminasadmin start-domain Command Fails SolutionCannot Stop Domain Using asadmin stop-domain Error Could Not Start DomainIssues Related to Eclipse Using asadmin set Command Might Produce Unexpected ResultsIssues Related to Installation and Upgrade General InstallationCannot Upgrade Cannot Configure JavaMail Resources Issues Related to JavaMailIssues Related to JNDI Cannot Deploy a Mail Session as a JNDI ResourceException When Creating MySQL Connection Pool Issues Related to MySQLIssues Related to Security java.security.AccessControlException AccessMutual Authentication Not Working With the Application Client Page Which asadmin Commands are Supported? Frequently Asked QuestionsAdministration FAQs “Administration FAQs” on page “Application FAQs” on pageHow Do I Debug Applications? Application FAQsEclipse FAQs How Do I Change Application Permissions?How Do I Develop Add-On Components? Extensibility FAQsHow Do I Extend the Administration Console? How Do I Add Containers?Jersey FAQs Java Persistence FAQsJDBC FAQs What Java Persistence Support Is Available?If I Deploy an Application Using the glassfishrails OpenESB FAQsRails and JRuby FAQs That Application?What Options Are Available for Running JRuby With Enterprise Server? Gem documentation http//glassfishgem.rubyforge.orgWarbler information http//caldersphere.rubyforge.org/warbler What Happens When No Server Side Realm Is Configured? Security FAQsUpdate Tool FAQs Can I Change the Keystore Password?After you start your Enterprise Server instance, the default location for the Administration Console is http//localhost4848/ at least one Enterprise Server domain must be started before you can launch the Administration Console. Unless you declined to check for updates during installation, you will be notified of available updates in the message area. Update Tool can also be accessed on the command line by running the updatetool command in the as-install/bin directory. Extensive online help is provided for both versions Index