Sun GlassFish Enterprise Server v3 Prelude Troubleshooting Guide

Chapter 1 Overview of Enterprise Server Troubleshooting

This chapter describes the tools, methods, and information sources available for troubleshooting Sun GlassFish Enterprise Server v3 Prelude. Guidelines for evaluating and investigating a problem are included.

This chapter contains the following sections:

Identifying the Problem

Application servers are typically deployed in complex and sophisticated operating environments and involve many technologies, products, and tools. Understanding and diagnosing problems in a large piece of software with so many components performing so many tasks can be challenging. This section gets you started, and includes the following topics:

First Steps

Sometimes the most obvious solutions are overlooked. As you begin your investigation, try the following steps first.

Verify System Requirements and Configuration

Problems are often caused by configuration issues (system, JVMTM, server, or application-level) and by resource issues (such as when a system runs out of memory). Refer to the Sun GlassFish Enterprise Server v3 Prelude Release Notes for the latest information regarding system requirements dependencies.

Review Known Issues

Your problem might be related to a known issue for the release. Refer to the Sun GlassFish Enterprise Server v3 Prelude Release Notes for the latest information regarding known issues and possible workarounds. Also search the GlassFish issue tracker at

Search the Product Documentation

Enterprise Server includes complete documentation. Search the documentation to see if your problem is addressed. The documentation set is available at See Enterprise Server Documentation Set for a list of books in the documentation set and a description of their contents.

Search the GlassFish Mailing Lists and Forums

Lists and forums are extremely helpful resources, and are accessed as follows:

Learn More About Enterprise Server v3 Prelude

As the name suggests, the release is a prelude to Sun GlassFish Enterprise Server v3. It is not a full Java EE 5 application server, and not everything that was implemented in Sun Java System Application Server 9.1 (GlassFish v2) is implemented and functional in Enterprise Server v3 Prelude. You might be trying to do something that is not possible with the existing feature set. For more information about Enterprise Server v3 Prelude and the features it contains, consult the following resources:

Note –

Some resources refer to GlassFish v3 Prelude. GlassFish v3 Prelude is the community version of the commercially supported offering, Sun GlassFish Enterprise Server v3 Prelude. The software is the same; the difference is in support.

Search the SunSolve Knowledgebase

SunSolveSM is Sun's informational and patch database service with a browseable directory of all publicly available Sun Microsystems support documents. SunSolve is available at Additional resources are also available for customers with support contracts.

Gathering Information

Troubleshooting and analysis require information. The more information that you have, the easier it is to classify a problem and search for its solution. Detailed information will also be necessary should you need to contact others for support, either through a community mailing list or through more formal Sun support channels.

For general information about gathering data, also refer to Sun Gathering Debug Data for Sun Java System Application Server. The document pertains to previous versions but much of the information is generic enough that it might be helpful for Enterprise Server v3 Prelude.

As you continue your investigation, consider the following questions.

When Does the Problem Occur?

What Is Your Environment?

What Is Your System Configuration?

What Is Different?

Examining Log Files

Logging is one of your most important troubleshooting tools. It is the process by which Enterprise Server captures data about events that occur during server operation. This data is recorded in a log file, and is usually the first source of information when Enterprise Server problems occur. The primary purpose of log files is to provide troubleshooting information.

By default, all Enterprise Server log information is captured in the server.log file, typically located in domain-dir/logs. Log Viewer is not available in Enterprise Server v3 Prelude. You cannot view the server's log file or configure logging using the Administration Console. To view log information, open the server.log file in a text editor. You can also use command-line file viewing commands such as tail, grep, or more. Logging is configured by editing the file, located by default in the same directory as the domain.xml file, typically domain-dir/config.

Log levels such as SEVERE, WARNING, INFO, CONFIG, and others can be set to provide different types and amounts of information. Each Enterprise Server module has its own logger, and each logger has its own namespace. Log levels can be set globally for all loggers, or individually for module-specific loggers.

See Chapter 9, Administering Logging, in Sun GlassFish Enterprise Server v3 Prelude Administration Guide for complete details about logging. Also see the Sun GlassFish Enterprise Server v3 Prelude Release Notes for any known issues related to logging.

Monitoring the System

Monitoring is another helpful tool. It is the process of reviewing the statistics of a system to improve performance or solve problems. By monitoring the state of various components and services deployed in Enterprise Server, you can identify performance bottlenecks, predict failures, perform root cause analysis, and ensure that everything is functioning as expected. For more information about monitoring, see Chapter 10, Monitoring the Enterprise Server, in Sun GlassFish Enterprise Server v3 Prelude Administration Guide.

Troubleshooting Tools

Several tools are available that can be used to collect information for troubleshooting purposes. This section provides basic information about the following:

Operating System Utilities

Operating system utilities, such as pkginfo and showrev on Solaris and rpm on Linux, are helpful in gathering system information.

The ps -ef command provides helpful information about processes that are running, including their process identification numbers (PIDs).

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” ( By default, the server dumps a core file and restarts with the -Xrs java-option flag in the server.xml file.

ProcedureTo Obtain a Server Thread Dump

  1. Type the following command:

    asadmin generate-jvm-report --type=thread
See Also



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

Where to Go for More Information