Contained WithinFind More DocumentationFeatured Support Resources | Download this book in PDF (1284 KB)
Chapter 4 Troubleshooting Directory Proxy ServerThis chapter describes how to troubleshoot problem you encounter with Directory Proxy Server. It contains the following sections:
Collecting Generic Directory Proxy Server DataNo matter the type of problem you are encountering, there is a minimum set of data that needs to be collected and, if necessary, provided to Sun Support. Collecting Version Information for Directory Proxy ServerThe following sections describe how to collect configuration information on current and previous versions of Directory Proxy Server. Collecting Directory Proxy Server 6.2 Version InformationCollect the Directory Proxy Server 6.2 version information. This information is available in the instance-dir/logs/error file. For example, the error log displays the version information as follows:
Collecting Directory Proxy Server 5.x Version InformationIf you are using migrated Directory Proxy Server 5.x instances, collect the version information as follows:
On UNIX and Linux systems, you might see the following error:
If you see this error, set the LD_LIBRARY_PATH to include Directory Proxy Server libraries in your load path. For example, if you use sh, use the following command:
Running the dpadm Command in Verbose ModeRunning the dpadm command in verbose mode will provide information to help troubleshoot problems that occur during instance creation or deletion, data backup, and so on. Run the dpadm is verbose mode as follows:
Collecting Directory Proxy Server Configuration InformationThe following sections describe how to collect configuration information on current and previous versions of Directory Proxy Server. Collecting Configuration Information on Directory Proxy Server 6.2Collect the Directory Proxy Server 6.2 configuration information. This information is available in the instance-dir/logs/error file. For example, the error log displays the configuration information as follows:
Collecting Configuration Information on Directory Proxy Server 5.xCollect the Directory Proxy Server 5.x configuration information as follows:
The DPS_tailor_Config.ldif file contains configuration information formatted as follows:
Collecting Directory Proxy Server Log InformationCollect the Directory Proxy Server logs. By default, the logs are stored in the following directory:
If you are providing this information to Sun Support, you should also include the generic Directory Server data from the various Directory Servers involved. This generic data includes the Directory Server version and the Directory Server access, error, and audit logs. For more information about collecting the Directory Server generic information, see Collecting Generic Data. Include generic information about any other backend servers you may be using, such as JDBC backends, a SQL database, or an Oracle database. Troubleshooting Directory Proxy Server Installation ProblemsThis section describes procedures to help you debug problems installing Directory Proxy Server. It includes the following: Troubleshooting Directory Proxy Server 5.2 Installation FailuresInstallation may fail if the password contains a dollar sign ($) character, such as pa$$word. For example, you might get the following error message:
When the installer parses the password it interprets the text after the dollar sign, $word, as a variable, and this variable does not exist. Change the password to not include the dollar sign character. Troubleshooting Problems Starting Directory Proxy Server 5.2 on WindowsIf Directory Proxy Server 5.2 fails to start on Windows, check the following:
You may also need to manually remove the Localmachine->system->controlset001->services->admin52 entry. This entry may be causing your problem if you receive the following error in the Admin server install log:
Troubleshooting Problems With the Directory Proxy Server ProcessThis section describes procedures for the following: Overview of Process Troubleshooting ToolsSome tools are provided with Solaris and Java which may help you troubleshoot process issues. The following sections provide an overview of some of the most useful tools Using Java Tools With Directory Proxy Server 6.2As Directory Proxy Server 6.2 is a pure Java application, you can use the Java tools that are delivered with the JDK 1.5 to help troubleshoot problems. These tools include the following:
On Solaris, you can find these tools in the following location:
The JVM also includes a graphical tool for monitoring the Java virtual machine called the Java Monitoring and Management Console (JConsole) tool. This tool uses the Java virtual machine to provide information on performance and resource consumption of applications running on the Java platform using Java Management Extension (JMX) technology. JConsole can be used to observe information about an application running on the Java platform. The JConsole provides information and charts about memory use, thread use, class loading, and JVM parameters On Unix platforms, if the kill -QUIT process-id command is used to get thread dump and it does not work, use jstack. Using Solaris Tools With Directory Proxy Server 5.xSolaris includes a collection of process tools to help you collect more information about process problems, such as a hung process, crashed process, or memory usage problems. These tools include the following:
Troubleshooting a Hung or Unresponsive Directory Proxy Server ProcessThis section describes how to troubleshoot a unresponsive or hung Directory Proxy Server process. A totally unresponsive process is called a hang. The remainder of this section describes how to collect and analyze data about a hang. Collecting Data About a Directory Proxy Server 6.2 Hang on SolarisThe jstat tool tells you the amount of CPU being used for each thread. If you collect a thread stack using the jstack utility at the same time you run the jstat tool, you can then use the jstack output to see what the thread was doing when it had trouble. If you run the jstack and jstat tools simultaneously several times, you can see over time if the same thread was causing the problem and if it was encountering the problem during the same function call. To get the process ID of the running Directory Proxy Server, use the jps command. For example, the command is run as follows on Solaris:
Collect usage information as follows:
The DPS-PID field specifies the PID of the unresponsive process. On Solaris and other UNIX platforms, show system calls that occur during the crash using the truss command as follows:
The value 21362 corresponds to the PID of the unresponsive process. Collecting and Analyzing Data About a Directory Proxy Server 5.x Hang on SolarisThe prstat tool tells you the amount of CPU being used for each thread. If you collect a process stack using the pstack utility at the same time you run the prstat tool, you can then use the pstack output to see what the thread was doing when it had trouble. If you run the prstat and pstack tools simultaneously several times, then you can see over time if the same thread was causing the problem and if it was encountering the problem during the same function call. Note – On Linux, use the lsstack or pstack commands instead of the Solaris pstack utility. The following script automates the process of running these tools:
The value 10 in the [ "$i" -lt "10" ] line can be increased or decreased to suit the time during which the problem you are troubleshooting occurs. This adjustment allows to you collect a full set of process data to help troubleshoot the issue. Thus enabling a full process data set to be captured around the issue. Collect usage information as follows:
The DPS-PID field specifies the PID of the unresponsive process. On Solaris and other UNIX platforms, show system calls that occur during the crash using the truss command as follows:
The value 21362 corresponds to the PID of the unresponsive ldapfwd process. Analyzing Data About a HangWhenever the Directory Proxy Server crashes, it generates a core. With this core file and the process stack of the core file you obtained, you can analyze the problem. For information about analyzing a core file, see Examining a Core File on Solaris. However, rather than running the utility from the ns-slapd binary directory, you must run it from the For example, the output of the truss command shows that no systems calls have been made at the time of the crash, suggesting a passive hang. Looking at the core file and the jstack or pstack information, you can identify several threads that are waiting for a lock to be freed to continue processing. By comparing the out put of the various tools you can safely guess that the cause of the problem is a deadlock. With this information, Sun Support can better help you resolve your problem in a timely fashion. Troubleshooting a Crashed Directory Proxy Server ProcessCore file and crash dumps are generated when a process or application terminate abnormally. Analyzing these files can help you identify the cause of your problem. This section includes the following topics:
Getting the Core and Shared LibrariesGet all the libraries and binaries associated with the Directory Proxy Server process for core file analysis. You must configure your system to allows Directory Proxy Server to generate a core file if the server crashes. For more information about generating a core file, see Generating a Core File. Collect the libraries using the pkg_app script . The pkg_app script packages an executable and all of its shared libraries into one compressed tar file. You provide the process ID of the application and, optionally, the name of the core file to be opened. For more information about the pkg_app script see Using the pkg_app Script on Solaris. As superuser, run the pkg_app script as follows:
Note – You can also run the pkg_app script without a core file. This reduces the size of the script output. You need to later set the variable to the correct location of the core file. Analyzing the Directory Proxy Server 6.2 Core Data on SolarisOnce you have obtained a core file, run the jstack and jpmap Java tools on the file. Run the jstack utility as follows:
For example, the jstack utility creates the following output:
Analyzing the Directory Proxy Server 5.x Core Data on SolarisOnce you have obtained a core file, run the pstack and pmap Solaris utilities on the file. Run the pstack utility as follows:
For example, the pstack utility creates the following output:
You can also use the mdb or adb command instead of the pstack command to show the stack of the core. The mdb command is a modular debugger and the adb command is a general purpose debugger that is part of Solaris. Run the mdb command as follows:
The output of the mdb and the pstack commands provide helpful information about the process stack at the time of the crash. The mdb $C command output provides the exact thread that was executing at the time of the crash. On Solaris 8 and 9, the first thread of the pstack output often contains the thread responsible for the crash. On Solaris 10, use mdb to find the crashing thread or, if using the pstack command, analyze the stack by looking for threads that do not contain lwp-park, poll, and pollsys. On Solaris, you can also use the Solaris dbx symbolic debugger, which is a developer tool available free from http://sun.com/. The dbx tool provides symbolic debugging, and includes variables that can be manipulated. For example, the dbx debugger produces the following output:
Analyzing the Directory Proxy Server 5.x Core Data on LinuxOn Linux, use the lsstack or pstack commands instead of the Solaris pstack utility. For example, run the lsstack command as follows:
You can also use the GNU project debugger, gdb, to see what is happening at the time of the crash. Run this debugger as follows:
For more information about the useful commands available with the gdb tool, see the gdb man page. Analyzing the Directory Proxy Server 5.x Core Data on HP-UXAs for Linux, on HP-UX you can also use the GNU project debugger to see what is happening at the time of the crash. Run this debugger as follows:
For more information about the useful commands available with the gdb tool, see the gdb man page. Analyzing the Directory Proxy Server 5.x Core Data on WindowsOn Windows, you can use the WinDbg debugger, which provides a UI for kernel and NT debugging. It can function both as a kernel-mode and user-mode debugger. You run this debugger on a Windows crash dump file. |
||||||||||||||||||||||||||||