# Chapter 23

| # Troubleshooting

> This section includes information on troubleshooting. Items covered include information on:

- Module--page 509
- Console--page 511

## Module

> During the Sun Management Center module development process, when you encounter problems with module loading and its additional functionalities, refer to one of the three areas where Sun Management Center software provides you with trouble shooting information.

- On the console--While loading a module from console, Sun Management Center software provides information about the status of the loading operation.
- In the agent log file--The agent log file provides information regarding module loading and module operation. The agent log file is a circular log file and can be viewed by entering the following command:

      /opt/SUNWsymon/sbin/es-run ctail -f /var/opt/SUNWsymon/log/agent.log

- When in the Interactive Agent mode--Starting the agent in the interactive mode allows you to troubleshoot module loading. To run the agent in interactive mode, enter the following command:

      /opt/SUNWsymon/es-start -ai

|  | The following sections provide some examples for each one of the above categories.

### Console Messages

TABLE 23-1 Example Error Messages that Display on the Console
Problem | Troubleshooting Information
--- | ---
Loading at the wrong place. | Check the ` `param:moduleType = '` value in <module>-m.x file.
Error Message: Module load failed. | Check to see if the following conditions exist: If the agent file is under `/opt/SUNWsymon/modules/cfg` If the models file is under `/opt/SUNWsymon/modules/cfg` For any syntax error in module files For valid syntax and datatypes in the models file If the library files exist

### Agent Log File Messages

TABLE 23-2 Example Error Messages That Are Found in the Agent Log File
Error Messages | Troubleshooting Information
--- | ---
Import interface failed | Check to see if the agent file is under `/opt/SUNWsymon/modules/cfg`.
Shutting down subagents parsing error in file: `//localhost/<module>-d.x flags=ro(1)`: failed to open file. aborting execution | Check to see if the models file is under `/opt/SUNWsymon/modules/cfg`.
Syntax error in file: /`/localhost/<module-file`> flags=ro(42) at token '}' aborting execution | Check for syntax error in <module-file> around line# 42.
Parsing error in file`: //localhost/<module>-models-d.x` `flags=ro(17)inheri`t: could not inherit ASDF. aborting execution | Check the datatype ASDF in models file.
Shutting down subagents, general parsing error, file: `//localhost/helloworld-version02-d.x` `flags=ro 10 couldn't load file pkgdemohw2.so":ld.so.1:esd:fatal:libdemohw2.so.1:open` failed: No such file or directory" ], aborting execution | Check to see if the of library files exist.

### Interactive Agent Mode Messages

TABLE 23-3 Example Error Messages Provided by the Interactive Agent
Error Messages | Troubleshooting Information
--- | ---
Parsing error in file: `//localhost/<module>-d.x flags=ro(1)`: failed to open file aborting execution | Check to see if the models file is under `/opt/SUNWsymon/modules/cfg`.
Syntax error in file: `//localhost/<module-file> flags=ro(42) at token '}`' aborting execution | Check for syntax error in <module-file> around line# 42.
Parsing error in file: `//localhost/<module>-models-d.x flags=ro(17)`: inherit: could not inherit ASDF aborting execution | Check the datatype ASDF in models file.
General parsing error `file://localhost/helloworld-version02-d.x` flags=ro 10 couldn't load file pkgdemohw2.so": .so.1: esd: fatal: libdemohw2.so.1: open failed: No such file or directory" ] aborting execution | Check to see if the library file exists.

## Console

> The Sun Management Center console is based on a configuration file infrastructure. This infrastructure provides a scripting language that is interpreted at run time to create Java consoles. Because of this late binding, most of the errors are shown at run time.

> Errors are displayed in two places:

- Inside the terminal window in which the Sun Management Center console is started: If you have made any syntax errors in your configuration file definition for your application, those errors will show up in this terminal window.
- Inside the Sun Management Center Console Messages dialog which is invoked from the file `pulldownmenu` in the main console: The error messages that are shown here are run time errors. For example, as given in the Task List, if you mention a wrong path for your `awx:component` bean, you will get an error that indicates this class was not found. It is advisable to keep the Sun Management Center Console Messages dialog up while you are doing development. You can also look at the Sun Management Center server log to see if the communication between the Sun Management Center console and Sun Management Center server is going through.

> > Note - All configuration files (those with extension `.x`) are installed on the Sun Management Center server, hence any action on these files will go through that server.

> For example, if you are using a [`load myConsole-j.x` ] construct in your application, then in the Sun Management Center server log you should see this file being read by the console.

> The Sun Management Center server log is a circular text file. To look at it in a 'tail' mode run following command:

>     /opt/SUNWsymon/sbin/es-run ctail -f /var/opt/SUNWsymon/log/server.log

> No console log is created by the Sun Management Center console. All console debug messages are displayed in the Sun Management Center Console Messages dialog. When the Sun Management Center console comes up, it redirects all `stdout` messages to this dialog. Thus, if your Java code has `System.out.println` statements, the output of those will be displayed in this dialog.

Copyright © 2000 Sun Microsystems, Inc. All Rights Reserved.