Sun Gathering Debug Data for Sun Java System Calendar Server

## To Collect Debug Data on a Calendar Server Database Problem

Use this task to collect data when Calendar Server is experiencing a database problem in a standard database deployment.

A Calendar Server database problem can occur when there are errors in the Calendar Server backup database (obtained with the csbackup command) or when error messages in the logs identify problems in the integrity of the database.

1. Collect the general system information as explained in To Collect Required Debug Data for Any Calendar Server Problem.

2. (Solaris only) Run the cscapture script to gather a copy of the Calendar Server's database and additional information:

./cscapture -db
3. (Other platforms) Run the capture_environment.pl script.

First go to the directory where the script is located. For example:

cd /export/home/myscripts
perl capture_environment.pl

This command creates a file named archive.tar.gz, which contains Calendar Server database logs, system statistics, and configuration information, and database information.

4. Get the output from the csdb check command.

The csdb check command reports errors on the Calendar Server backup database and on database corruption issues that turn up in the error logs.

Note –

This command can return false errors when it is run on a production server database.

UNIX and Linux

cd cal-svr-base/cal/bin./csdb check

Windows

cd cal-svr-base\cal\bincsdb.exe check

5. Try to recover your database from a backup.

Read the section, “Checking and Rebuilding a Calendar Database” or “To Rebuild the Calendar Databases (caldb)” in the Calendar Server 6 Administration Guide:

6. If the database is corrupted, and you have tried to recover it without success, provide a tar file of the entire database directory.

The path of the database is specified in the caldb.berkeleydb.homedir.path parameter in the ics.conf file.

For a Windows system, the following example shows the physical path of the database event, task, and alarm files:

caldb.berkeleydb.homedir.path =
"C:/www/Cal6-1-1/CalendarServer6/var/csdb"
7. Obtain user information for at least 2 users impacted by the problem and 2 users unaffected by the problem.

If no users can connect to the database, please include this information.

Use the csattribute command to get the LDIF entry of each user. The csattribute command displays the user's DN and the attributes of the specified user. following is a sample DN:

uid=user1,ou=people,o=siroe.com,o=isp

Run the command as follows:

UNIX and Linux

cal-svr-base/cal/sbin/csattribute -v list uid

Windows

csattribute -v list uid

where:

server-root

The directory on the Calendar Server machine dedicated to holding the Calendar Server program, and configuration, maintenance, and information files. The default location for UNIX and Linux versions of Calendar Server is /var/opt/mps/serverroot/.

uid

User ID of the user you are searching for.

8. Get the LDIF entry of the domain where the impacted user resides.

Use the domain portion of the DN shown by the csattribute command in the preceding step.

UNIX and Linux

dir-root/shared/bin/ldapsearch -h hostname -p port -D "cn=Directory Manager" -w password -s base -b "baseDN" "(objectclass=*)" > /tmp/domain.ldif

Windows

dir-root\shared\bin\ldapsearch.exe -h hostname -p port -D "cn=Directory Manager" -w password -s base -b "baseDN" "(objectclass=*)" > C:\domain.ldif

where:

dir-root

The directory on the Directory Server machine dedicated to holding the server program, and configuration, maintenance, and information files. The default location for UNIX and Linux versions of Calendar Server is /var/opt/mps/serverroot/.

hostname

Name of the host running Directory Server. You can omit -h hostname if the Directory Server is running locally.

port

Port number on which Directory Server is listening. The default is 389. You can omit port if the Directory Server is running on port 389.

9. If you have not already done so, set the Calendar Server debug log level to Debug and provide all errors printed to the Calendar Server logs.

Provide all log files with pointers to timestamps or error messages.

10. If you have not already done so, provide specific steps showing how to reproduce the problem.

Include any observed error messages from the Web UI, WCAP commands, and the Calendar Server log files and timestamps showing when the error occurred.