Cisco Craft Works Interface User Guide, Release 3.6
Troubleshooting User Customization Problems

Table Of Contents

Troubleshooting User Customization Problems

Common Launch Problems for the User-Defined Application

Problems for the User-Defined Attribute Pool Application

Problems Relating to the User Script


Troubleshooting User Customization Problems


These topics describe how to troubleshoot user customization problems:

Common Launch Problems for the User-Defined Application

Problems for the User-Defined Attribute Pool Application

Problems Relating to the User Script

Common Launch Problems for the User-Defined Application

Table A-1 lists the common launch problems for the user-defined application.

Table A-1 Common Launch Problems for the User-Defined Application 

Symptom
Possible Problems
Actions

User defined application does not appear in the Tools menu bar

Definition file does not have an .xml extension. CWI ignores the file in directory scanning.

Definition file is not placed in the elementbrowser/usr directory or one of the subdirectories.

Placing the definition file in the elementbrowser/ directory to be together with the prepackaged application definition files does not work. CWI ignores any nonpredefined definition files in the elementbrowser/ directory.

The following action applies when the definition file is not placed in the elementbrowser/usr directory or one of the subdirectories:

Be sure to place the file in the correct version installation directory when multiple versions of CWI are installed.

Duplicated file error message appears from the Tools menu bar

Duplicated definition filenames are not allowed even if they are placed in a different subdirectory of elementbrowser/usr.

For example, you created two definition files named MyApp.xml. You placed one file in the elementbrowser/usr/router directory, and the other file in the elementbrowser/usr/bar directory. CWI returns an error message from the Tools menu bar.

The following action applies to the possible problem:

Ensure that every added definition file contains a unique filename.

User-defined application appears in the menu bar options with the filename rather than the name specified in the definitions file

An error is detected in the definitions file and the proper application display cannot be parsed out of the file. Therefore, CWI reverts back to the definitions filename.

The following actions apply to the possible problem:

Launch the application.

Validate the definitions file and point to the error.

If you chose the menu option to launch a user-defined application, the application is not launched but an error dialog window appears.

Some validation errors were found in the definition file. CWI captures them and displays the messages in the error dialog window.

The following actions apply to the possible problem:

Locate and correct all the applicable errors in the definition file.

Save the changes.

Launch the application again.


Problems for the User-Defined Attribute Pool Application

Table A-2 lists problems for the user-defined attribute pool application.

Table A-2 Problems for the User-Defined Attribute Pool Application 

Symptom
Possible Problems
Actions

The attribute pool application launches but some of the attributes appear as blank in the table.

The attributes were not configured on the router. For example, PMInterface and PMNode attributes are available only when the router is configured to enable the collection of the performance monitoring data.

The key attributes were not properly assigned. If only a few keys were specified, for example, the join with the attribute pool data, can result in the wrong value being taken.

The following actions apply to the possible problem:

Ensure that the necessary configuration for the attributes to show up exists on the device.

Ensure that the key attributes are correctly assigned.

The application does not display the correct number of rows.

Certain attribute pool attributes must be assigned as key values. You must be careful to assign the Key="true" attribute to those that are unique keys. If you assign only one key instead of two, you get fewer rows appearing in the result than expected. The first one that matches the keys is taken.

The following action applies to the possible problem:

Ensure that the key attributes are correctly assigned.

Some of the attribute pool values are not correct

The key attributes were not properly assigned. If only a few keys were specified, for example, the join with the attribute pool data can result in the wrong value being taken. The first one that matches the keys is taken.

The following action applies to the possible problem:

Ensure that the key attributes are correctly assigned.


Problems Relating to the User Script

Table A-3 list the related problems for the user script.

Table A-3 Related Problems for the User Script 

Symptom
Possible Problems
Actions

The application appears but does not display valid data for the scripted properties.

The user script does not return the expected output.

The metadata, which is specified for the user script, is incorrect.

The following actions apply to the possible problem:

Add your own log output from the script.

Add the Logging="true" attribute to the UserScript element, which results in an output of all messaging between the script and CWI. In addition, error log information is sent to the script.log file in the logger/ directory.

If cwitalk.pm is used, check for the return values from the various cwitalk.pm invocations in the script.

Log the error messages to the file or send them back to CWI by calling the send_err() method.

A user-defined monitoring application uses a Standalone script. The script returns the correct number of rows for the return data. However, not all of the rows are displayed in the CWI table.

The definitions file does not have the correct key assigned in the <Record> child of the <UserScript> element. If fewer keys are indicated, only the first matching keys are displayed in the table, which results in fewer overall rows being displayed than originally intended.

The following action applies to the possible problem:

Ensure that the correct key properties are specified in the <Record> child of the <UserScript> element.

Upon launch, the application hangs during the script invoking phase.

The script performs a task that takes a long time to execute for the following reasons:

A deadlock happens. No timeout is set in the <UserScript> definition.

The script returns an incomplete message to CWI. For example, the script forgot to send the close tag, and blocks and waits for the reply from CWI.

CWI expects the rest of the remaining message, and cannot send any reply unless the incoming message is complete. A deadlock happens.

A deadlock happens. For example, the script returns an incomplete message to CWI, such as the close tag is missing, and blocks and waits for a reply from CWI. CWI waits for the message to complete; therefore, both are waiting on the other side and a deadlock results.

The following action applies to the possible problem:

Specify a nonzero Timeout attribute to the <UserScript> element.

The application launches but some unexpected error messages appear in the dialog.

CWI handles any message read from STDERR1 of the script process as system errors. CWI terminates the script.

Script syntax error

Execute in warning-enabled mode. For example, the -w flag for Perl script execution is used.

In the script, write to STDERR is used for logging or debugging purposes.

The following actions apply to the possible problem:

Perform script syntax checking before launching the application.

Do not run in warning-enabled mode.

For logging or debugging purposes, write to a log file or use <SIG_CWI_ERR> and </SIG_CWI_ERR> tags to enclose error messages and write to STDOUT2 . CWI reads and displays the errors.

1 STDERR=standard error

2 STDOUT=standard output