Troubleshooting

Version Information

If the classpath and bootclasspath entries mentioned in Installation page were applied correctly, you should see the following message when the server starts up.

AspectWerkz - INFO - Pre-processor org.codehaus.aspectwerkz.transform.AspectWerkzPreProcessor loaded and initialized
..

*********************************************
* InfraRED version XX-VERSION
*
* Configured logging system from file:/D:/infrared-home/infrared-log4j.xml
*********************************************                
            

This serves two purposes:

  • identifies that the server paths are setup correctly
  • identifies the version of InfraRED being used

Identifying applications integrated with InfraRED

If the changes to the application as mentioned in Installation page were applied correctly, and if the system property infrared.print.applications is set to true (using -D JVM flag), you should see the following message on the console(System.out) when the application startsup.

[InfraRED] Created MonitorFacade for all-apps, instance your-host-name, with config MonitorConfig[jar:file:D:/infrared-home/infrared-agent-all-servlet-XX.jar!/infrared-agent-root.properties]
[InfraRED] Created MonitorFacade for your-app, instance your-host-name, with config MonitorConfig[file:/D:/your-app-home/WEB-INF/classes/infrared-agent.properties]                
            

The second line above indicates that InfraRED has successfully identified your-app application and would be monitoring it. The configuration file for this application is at D:/your-app-home/WEB-INF/classes/infrared-agent.properties. The first line is always printed and should not be taken as a sign of your application being sucessfully identifed by InfraRED.

Logging

InfraRED uses log4j for logging. It ships with a modified log4j version and does not interfere with the normal logging of the application.

To enable logging of InfraRED, you should have the file infrared-log4j.xml in the server's classpath. The format of this file is same as the regular log4j.xml file, except that all references to classes in package org.apache.log4j should be replaced with net.sf.infrared.org.apache.log4j. A sample infrared-log4j.xml is given below:

                    
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration debug="false">    
    <appender name="FILE" class="net.sf.infrared.org.apache.log4j.FileAppender">
      <param name="file" value="./infrared.log"/>
      <layout class="net.sf.infrared.org.apache.log4j.PatternLayout">
        <param name="ConversionPattern" value="[%c] - %m%n"/>
      </layout>
    </appender>

    <appender name="CONSOLE" class="net.sf.infrared.org.apache.log4j.ConsoleAppender">
        <layout class="net.sf.infrared.org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="[%t %c] - %m%n"/>
        </layout>
    </appender>

    <category name="net.sf.infrared.agent.transport" additivity="false">
        <priority value="DEBUG"/>
        <appender-ref ref="FILE"/>
    </category>
    
    <category name="net.sf.infrared.agent.health" additivity="false">
        <priority value="DEBUG"/>
        <appender-ref ref="CONSOLE"/>
    </category>
    
    <root>
        <priority value="FATAL"/>
        <appender-ref ref="FILE"/>
    </root>
</log4j:configuration>   
 
            

Notice how all packages start with net.sf.infrared.

Two log categories are particularly important

  • net.sf.infrared.agent.transport.impl.SocketWriter is used to log if InfraRED is able to collect data in the application and send it across the GUI. If some data is collected and send to the GUI, you would be seeing logs like:
    [net.sf.infrared.agent.transport.impl.SocketWriter] - SocketWriter (address = localhost/127.0.0.1, port = 7777 connected) - Wrote stats
                        
  • net.sf.infrared.agent.health is used to print information on how much data is collected. Sometimes you would think that InfraRED is all set up correctly, but no data shows up on the GUI. In those cases you should enable this log level - it helps identify whether data is not showing up because of all executions getting pruned. A sample log entry would look like:
    [net.sf.infrared.agent.health] - Agent collected stats for operation that started at Tue Dec 13 07:35:53 GMT 2005 and ended at Tue Dec 13 07:35:53 GMT 2005. Tracked 10 and ignored 1                        
                        
    Some statistics would be ignored because they are below the prune threshold. The concept of prune threshold is explained in the configuration page.

In general, InfraRED generates lots of logs iin DEBUG mode, so it should be only be enabled when you run into issues.