OverviewThis chapter provides a description of the tools, methods, and information sources available for troubleshooting the Sun Java System Application Server Server 9.1. Guidelines for evaluating and investigating a problem are included.
Planning AheadAs applications get deployed, undeployed, and redeployed, and as you experiment with different server configuration settings, there may be times when your server gets into a confused or unstable state. In such cases, it is useful to have a previously saved working configuration on which to fall back. This is not problem solving, per se, but rather a way to avoid problems in the first place. The Application Server asadmin command includes a backup-domain option that backs up the domain(s) you specify. Use this option to take periodic “snapshots” of your server configuration. Then, if necessary, use the restore-domain option to restore one or more domains to a known working state. Refer to the Application Server Administration Guide for complete instructions on using the asadmin backup-domain and restore-domain options. Briefly, however, for the purposes of this Troubleshooting Guide, use the following procedure to backup and restore a server configuration: To back up and restore a server configuration
Backed up directories are stored by default in the install_dir/backups directory. \ \ {code}install_dir/bin/asadmin restore-domain --filename backup_file domain_name Identifying the ProblemJ2EE application servers are typically deployed in complex and highly sophisticated operating environments. The Sun Java System Application Server covers a broad range of technologies, including Java, Java servlets, XML, JSP, JDBC data sources, EJB technology, and more. Other products and tools associated with the Application Server are LDAP, Web Server, SunONE Message Queue, deployment and migration tools, and so on. Understanding and diagnosing complex issues involving so many disparate components requires thorough knowledge and a careful diagnostic process. Gathering any or all of the following information will make it easier to classify a problem and search for solutions. Note that operating system utilities, such as pkginfo and showrev on Solaris and rpm on Linux, are helpful in gathering system information. To verify configuration information
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ After gathering this information:
Seeking a SolutionAfter identifying the problem and formulating a preliminary hypothesis of what may be The following topics are addressed in this section:
Verify System ConfigurationSometimes the most obvious solutions are overlooked, and so the first step is to verify the system configuration. Refer to the Sun Java System Application Server 9.1 Release Notes for the most up-to-date system requirements and dependencies. Evaluate MessagesMessages generally include information about the attempted action, the outcome of the action, and, if applicable, the cause of jeopardy or failure. Types of MessagesThe log files contain the following general types of message entries:
Error MessagesA problem is often accompanied by an error message that prevents the application from proceeding.
For descriptions of all the Application Server error messages, refer to the Sun Java System Application Server 9.1 Error Message Reference Wiki. Examine Log FilesA number of the Application Server subsystems create log files and log their events to these files. The primary purpose of these log files is to provide troubleshooting information. In addition to the message text, a logged message provides the following information:
The specific logs associated with each Application Server problem area are discussed in the associated chapters of this manual. Log LevelsThe Application Server has many log levels that can be set in the Administration GUI (FINEST, FINER, FINE, CONFIG, INFO, WARNING, SEVERE, ALERT, and FATAL). All messages are logged when the log level is set to FINEST and only serious error messages appear if the log level is set to FATAL. Note that the more detailed log levels (FINEST, FINER, FINE) can generate high volumes of log information for certain events, which may make it appear at first glance that there is an error condition when in fact there is not. All messages with a log level less than the default level of INFO (FINEST, FINER, FINE, and CONFIG) provide information related to debugging and must be specifically enabled. Instructions for doing this are contained in the Sun Java System Application Server Administrator's Guide. In addition to the standard JDK log levels, the Application Server has added log levels designed to map more intuitively to the Application Server log file (server.log) and to tightly integrate with Solaris. The log levels ALERT and FATAL are specific to the Application Server and are not implemented in the JDK1.4 logging API.
Log OptionsThe Administration GUI provides the following two logging options:
When these options are set, stdout and stderr messages are written to the server.log file. (The event log is a syslog daemon on Solaris and Event Log on Microsoft Windows.) If the above options are not set:
Client Side LoggingThe Application Client Container (ACC) has its own log service and can only log to a local file. The ACC typically runs in its own process, on a different host from the Application Server. It has its own logging infrastructure and its own log file. The sun-acc.xml file contains the ACC configuration. Refer to the Sun Java System Application Server 9.1 Developer's Guide for more information. Obtaining a Thread DumpThis section explains how to obtain a thread dump for Application Server 9.1. By default, the server dumps a core file and restarts with the -Xrs java-option flag in the server.xml file.
See if the Problem has been Solved BeforeA good initial step is to scan this Troubleshooting Guide to see if the problem is addressed here. If so, select the appropriate solution. Many of the solutions contain references to other documents in the Application Server document collection for additional details, explanations, or examples. Search the Product DocumentationStart by reading the documentation set Search the Knowledge BaseThe Knowledge Base is a collection of articles on product issues that provide information helpful for troubleshooting. To access the Knowledge Base:
Search or Participate in the Online ForumBrowse directly in any of the online forums, or log in and register to start posting messages. The Application Server online forum is available at: http://forum.java.sun.com/index.jspa Contact SupportWhen necessary, gather together the information you have acquired and contact technical support at http://www.sun.com/service/contacting. |