WF3815V17_诊断

download WF3815V17_诊断

of 33

Transcript of WF3815V17_诊断

  • 8/8/2019 WF3815V17_

    1/33

    Welcome to:

    Troubleshooting

  • 8/8/2019 WF3815V17_

    2/33

    Unit Objectives

    After completing this unit, you should be able to:Discuss problem determination issues

    Identify resources for problem determination

    Log files

    Trace outputMessages

    Describe tools for troubleshooting

    TracingLog Analyzer

    JNDI Namespace Dump Tool

    Collector Tool

    First Failure Data Capture tool

    Application Server Toolkit

  • 8/8/2019 WF3815V17_

    3/33

    IBM HTTP Server

    Web Server Plug-in

    Use browser to access

    http://localhost (if local)

    or http://

    (if remote)

    Check

    http_plugin.log file

    Application Server

    Web

    Container

    Check activity.log,

    SystemOut.log,

    SystemErr.log

    EJB

    Container

    Use browser to

    access port 9080

    Use Java client to

    access EJBLoad Balancer

    Ping the IP

    address, ping the

    cluster address

    Client

    Database

    Use database

    client with SQL to

    check tables

    Problem Determination Divide and Conquer

  • 8/8/2019 WF3815V17_

    4/33

    Problem Determination

    Navigate through the problem:What kind of problem do I have?

    What component is causing the problem?

    Resources for identifying problems.

    WebSphere Application Server topology

  • 8/8/2019 WF3815V17_

    5/33

    Resources for Identifying a Problem

    Console messages provide configuration probleminformation, starting server and loading of module information

    Java exceptions provide stack trace.

    Log files provide information about servers as they initialize

    and run.Log Analyzerdiagnoses problems from event history and

    symptom database.

    Traces provide detailed information about WebSphereApplication Server components.

    JNDI Dump Name Space displays global names for objects

    and references.

  • 8/8/2019 WF3815V17_

    6/33

    Console Messages (1 of 4)

    Console messages appear in the

    WebSphere Status pane

    DisplaysConfiguration Problem

    messagesRuntime messages

    Available on every

    page of the Administrative

    Console.Automatically

    refreshes every

    60 seconds(configurable)

  • 8/8/2019 WF3815V17_

    7/33

    Console Messages (2 of 4)

    Runtime events grouped by severityError

    Warning

    Information

    Clicking onerror link

    shows details

  • 8/8/2019 WF3815V17_

    8/33

    Console Messages (3 of 4)

    Runtime event details

  • 8/8/2019 WF3815V17_

    9/33

    Console Messages (4 of 4)

    Configuration problemsChanging level of validation will show more or less severe

    problems

  • 8/8/2019 WF3815V17_

    10/33

    Log Files in logs Directory

    SystemOut.log - standard JVM output logIndicates if code running in the server started and stopped

    successfullyCan be used for application messages

    Destination and name are configurableSystemErr.log - standard JVM error logExceptions thrown by code running in the serverDestination and name are configurable

    startServer.log and stopServer.logstartup and shutdown of the Application Servers

    activity.log - events that show a history of activitiesuse Log Analyzer to read output from this file

    http_plugin.log - plug-in logErrors and trace data from the Web server plug-in

    trace.log output from diagnostic trace

    Destination and name are configurable

  • 8/8/2019 WF3815V17_

    11/33

    Log Formatting

    The JVM log and the Tracelogs can be formatted in:

    Basic format

    Advanced format

    In addition the Trace log can

    also be produced in activity log

    format. In this format the Log

    Analyzer tool can be used toview.

    Formatting controlled through

    Administrative Console

  • 8/8/2019 WF3815V17_

    12/33

    Log and Trace File Format

    [31/01/03 9:51:15:081 EST] 3c07adad SystemOut O Looking up Account

    Entry to a method (debug)< Exit a method (debug)

    A Audit

    W Warning

    X Error

    E Event (debug)

    D Debug (debug)

    T Terminate (exits process)

    F Fatal (exits process)

    Thread

    ID

    TimestampComponent

    Msg type Message

    I InformationO Program output

  • 8/8/2019 WF3815V17_

    13/33

    Log Analyzer Tool

    The Log Analyzer looks at error conditions in the log entries

    to diagnose problems and suggest possible solutions.

    Update your Symptom Database by downloading from IBM.

    Activity

    Log

    Log

    Analyzer

    Symptom

    Database

    XML file

    IBM

    Support

    Problem

    Diagnosis

  • 8/8/2019 WF3815V17_

    14/33

    Log Analyzer (1 of 2)

    {

    {

    {Log Pane

    (Navigation)

    Record Pane

    (Display Detail)

    Analysis Pane

    MaxRetries

    set to 3 in

    admin.config.

    Error repeats

    three times

    L A l (2 f 2)

  • 8/8/2019 WF3815V17_

    15/33

    Log Analyzer (2 of 2)

    Log Pane - Navigation

    Raw logging data is formatted into Units of Work (UoW)

    UoWs contain individual lines detailing activity

    Record Pane - Details

    Process, Thread and Source IDsFunction name

    Extended Message

    Analysis Pane - More (external) informationLooks up (on command) symptoms in database:

    /properties/logbr/symptoms/adv/symptomdb.xml

    T

  • 8/8/2019 WF3815V17_

    16/33

    Traces

    Trace can be started

    While server is running using Runtime Diagnostic Trace

    When server is started using Configuration Diagnostic

    Trace

    Trace output can be directed to:Memory ring buffer - Dumped after trace stops

    File

    Trace has a significant impact on performanceEnable temporarily for problem determination

    Trace to file is slower than trace to memory ring buffer

    Java

    components

    Ring

    buffer

    Dump fileTrace Dump

    T R i A li ti S

  • 8/8/2019 WF3815V17_

    17/33

    Trace a Running Application Server

    Current Trace String

    Click to modify

    tracespecifications

    Select Trace to

    Memory Buffer or File

    View Trace File on Console

    T A li ti S f St t

  • 8/8/2019 WF3815V17_

    18/33

    Trace Application Server from Startup

    Trace Administration

  • 8/8/2019 WF3815V17_

    19/33

    ! Select Groups or

    Components.

    ! Click, select trace type.

    ! Click Apply.

    ! Click Close.

    Gray None

    Blue Entry/Exit

    Yellow Event

    Red Debug

    Trace Administration

    Components to Trace

  • 8/8/2019 WF3815V17_

    20/33

    Components to Trace

    A different way to select what

    components to trace

    WebSphere used packages

    are instrumented for tracing

    User created applications canbe instrumented too, and be

    included in the trace output.

    Reading a Trace File

  • 8/8/2019 WF3815V17_

    21/33

    Reading a Trace File

    Timestamps give good clues:

    Time stamps are real machine time values

    Good when comparing traces from different processes.

    Look for exceptions (search for "exception" from top)

    Events prior to exception are probable causes.Events after exception are recovery attempts.

    Often useful to follow a single thread.

    Dumping the JNDI Name Space

  • 8/8/2019 WF3815V17_

    22/33

    Dumping the JNDI Name Space

    DumpNameSpace utility shows JNDI directory content.

    Useful to ensure correct association of named objects:

    Data sources

    EJBs

    JMS resourcesOther resources

    Syntax and some of the options:

    Output can be redirected to a file and inspected.

    \bin\DumpNameSpace[-host bootstrap_host_name (defaults to localhost)][-port bootstrap_port_number (defaults to 2809)][-startAt subcontext/in/the/tree]

    Dumping the JNDI Name Space - Example

  • 8/8/2019 WF3815V17_

    23/33

    Dumping the JNDI Name Space - Example

    ==============================================================================

    Beginning of Name Space Dump

    ==============================================================================

    1 (top)

    2 (top)/domain javax.naming.Context

    2 Linked to context: was5host

    3 (top)/cells javax.naming.Context4 (top)/clusters javax.naming.Context

    5 (top)/cellname java.lang.String

    6 (top)/cell javax.naming.Context

    6 Linked to context: was5host

    7 (top)/nodes javax.naming.Context

    8 (top)/nodes/was5host javax.naming.Context

    9 (top)/nodes/was5host/persistent javax.naming.Context10 (top)/nodes/was5host/nodename java.lang.String

    11 (top)/nodes/was5host/domain javax.naming.Context

    11 Linked to context: was5host

    12 (top)/nodes/was5host/cell javax.naming.Context

    12 Linked to context: was5host

    13 (top)/nodes/was5host/servers javax.naming.Context

    14 (top)/nodes/was5host/servers/server1 javax.naming.Context15 (top)/nodes/was5host/servers/server1/jms javax.naming.Context

    16 (top)/nodes/was5host/servers/server1/jms/StockQueue

    .

    .

    .

    Application Server Toolkit

  • 8/8/2019 WF3815V17_

    24/33

    Application Server Toolkit

    Based on Eclipse tooling

    Similar to WebSphere Studio Application Developer, limited

    function

    Remote Debugger

    Log AnalyzerProfiler

    Java perspectives

    Installed from separate CD

    First Failure Data Capture tool (FFDC)

  • 8/8/2019 WF3815V17_

    25/33

    First Failure Data Capture tool (FFDC)

    Preserves the information generated from a processing

    failure

    Captured data is saved in log files for use in analysis

    This tool is meant to be used by IBM support

    Capturing FFDC data does not affect performanceFFDC data is collected on the \logs\ffdc directory

    There are no administrative tasks to manage FFDC

    Collector Tool

  • 8/8/2019 WF3815V17_

    26/33

    Collector Tool

    Gathers information about the WebSphere Application Server

    installation

    Packages information in JAR file

    JAR file is sent to IBM Support

    Run collector from the \bin directoryIBM Support will ask you to run it to collect information to

    solve a problem.

    Information Resources

  • 8/8/2019 WF3815V17_

    27/33

    Information Resources

    WebSphere V5 Systems Management and Configuration (Redbook)

    http://www.redbooks.ibm.com/redpieces/pdfs/sg246195.pdfWebSphere Application Server Library

    http://www.ibm.com/software/webservers/appserv/library.html

    WebSphere InfoCenter

    http://www.ibm.com/software/info/websphere/library/index.html

    WebSphere Developer Domain

    http://www7b.boulder.ibm.com/wsdd/

    WebSphere Administration: Lessons from the Experts

    http://www7b.boulder.ibm.com/wsdd/library/presents/wsexperts.html

    WebSphere Advisor Magazine

    http://Advisor.com/www/WebSphereAdvisor

    WebSphere Application Server Supporthttp://www.ibm.com/software/webservers/appserv/support.html

    Problem Determination Demonstration

  • 8/8/2019 WF3815V17_

    28/33

    Problem Determination

    Demonstration

    Problem Determination Demonstration

    Unit Summary

  • 8/8/2019 WF3815V17_

    29/33

    Unit Summary

    Discussed problem determination issues.

    Described resources and tools for problem determination.

    Described how to view messages in the Administrative

    Console.

    Described how to enable tracing for WebSphere components.Described how to use the Log Analyzer to view events in the

    activity.log file.

    Described how to dump the JNDI namespace.Touched on other problem determination tools (FFDC,

    Collector)

  • 8/8/2019 WF3815V17_

    30/33

    Additional Material

    HTTP Plug-in Log

  • 8/8/2019 WF3815V17_

    31/33

    g g

    The plug-in runs in the Web server process and routes

    requests from the Web server to the application server.

    The plug-in log can be found in:\logs\http_plugin.log

    Location of log and LogLevel is configured in file:\config\cells\plugin-cfg.xml

    in element:

  • 8/8/2019 WF3815V17_

    32/33

    gg g

    HTTP Server provides logging of errors and HTTP requests

    Configured via logging directives in httpd.conf file

    Error and access logging configured by defaultErrorLog logs/error.log

    LogLevel warn

    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combinedLogFormat "%h %l %u %t \"%r\" %>s %b" common

    LogFormat "%{Referer}i -> %U" referer

    LogFormat "%{User-agent}i" agent

    CustomLog logs/access.log common

    Change log level for problem determinationChange log format if analyzing access logs

    Configure separate logs for virtual hosts

    Fast Response Cache Accelerator (FRCA) loggingEnable logging by adding directives to httpd.conf fileAfpaLogging on

    AfpaLogFile "C:/Program Files/IBMHTTPServer/logs/afpalog" V-ECLF

    HTTP Server SNMP Support

  • 8/8/2019 WF3815V17_

    33/33

    pp

    HTTP Server includes a Simple Network Management

    Protocol agent

    Provided as a plug-in module

    Supports the following Management Information Bases (MIB)

    SNMP MIBWWW MIB

    Apache MIB

    Configured via SNMP directives in httpd.conf fileSNMP module is not configured by defaultLoadModule snmp_agt_module modules/IBMModuleSNMP.dll

    SNMPenable

    SNMPcommunity publicsysContact [email protected]

    sysLocation 3rd floor computer room, London office