diagframeworkdevadminv2-1883022

59
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 1

Upload: kalpit

Post on 26-Nov-2015

51 views

Category:

Documents


0 download

DESCRIPTION

diagframeworkdevadminv2-1883022

TRANSCRIPT

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 1

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 2

    Diagnostic Frameworks for Administrators and Developers

    Natascha Schnfeld

    OCS Bug Diagnostics and Escalations

    Maria Salzberger

    OCS Proactive Support Team

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 3

    THE FOLLOWING IS INTENDED TO OUTLINE OUR GENERAL

    PRODUCT DIRECTION. IT IS INTENDED FOR INFORMATION

    PURPOSES ONLY, AND MAY NOT BE INCORPORATED INTO

    ANY CONTRACT. IT IS NOT A COMMITMENT TO DELIVER ANY

    MATERIAL, CODE, OR FUNCTIONALITY, AND SHOULD NOT

    BE RELIED UPON IN MAKING PURCHASING DECISION. THE

    DEVELOPMENT, RELEASE, AND TIMING OF ANY FEATURES

    OR FUNCTIONALITY DESCRIBED FOR ORACLE'S

    PRODUCTS REMAINS AT THE SOLE DISCRETION OF

    ORACLE

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 4

    Agenda

    Motivation

    Diagnostic Frameworks and the Resolution Process

    Use Cases

    Demo References

    Q&A

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 5

    Motivation

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 6

    The Problem

    Missing diagnostic

    context on First

    Failure

    Loss of productivity

    Maintenance overhead

    Many iterations between Customer and Support

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 7

    On the way to the best solution... Black Box principle: Gain diagnostic context

    information on first failure.

    Flexibility: Configure amount and type of

    diagnostic information needed for analysis

    Integration: Standardize tools and use the same

    diagnostic methods for all products

    SOA Diagnostics and Instrumentation Project - Principles

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 8

    Overview: Diagnostic Frameworks Buzzwords

    DFW

    WLDF

    IPS

    DMS

    ADRCI

    RDA

    ODL

    ST

    SWB

    ECID

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 9

    Resolution Process

    Detect

    Record context information on first failure Monitor resources proactively and provide notification when defined resource limits are

    exceeded i.e. Health Checks

    Collect

    Rules-controlled diagnostic collections Diagnostic information catalogue (Repository) Diagnostic information quality

    Analyze Efficient provisioning of diagnostics to all parties involved in the resolution process

    Solve

    Quicker bug resolution and patch provisioning Discover root cause and apply configuration changes

    Phases and Requirements

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 10

    Diagnostic Frameworks Architectural Overview

    Rules

    Custom Rules

    SOA Rules

    WLS Rules

    WLDF

    DMS

    ODL

    Incidents

    Diagnostic

    Dumps

    zip

    RDA

    IPS

    Logs

    ST

    DFW Rules

    ADR Repository

    Detect

    Collect

    Analyze

    Solve

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 11

    Diagnostic Frameworks and the Resolution

    Process

    Detect

    detect collect analyze solve

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 12

    Diagnostic Frameworks Architecture

    Rules

    Custom Rules

    SOA Rules

    WLS Rules

    WLDF

    DMS

    ODL

    Incidents

    Diagnostic

    Dumps

    zip

    RDA

    IPS

    Logs

    ST

    DFW Rules

    ADR Repository

    Detect

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 13

    DMS: Dynamic Monitoring Service

    The Oracle Dynamic Monitoring Service (DMS) provides Runtime

    Statistics about the JVM and deployed Applications

    Applications utilize the DMS APIs to implement Nouns

    Nouns have associated Sensors for runtime statistics like Request

    Count, Free Heap Size, Processing Time, etc

    Collected Metrics can be viewed through DMS Spy, WLST

    (WebLogic Scripting Tool) or Fusion Middleware Control

    Functionality

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 14

    DMS: Dynamic Monitoring Service SOA Suite Sensors

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 15

    WLDF: WebLogic Diagnostic Framework

    Included with WLS

    Watches and Notifications to monitor runtime conditions and notify in case of failure

    Rules

    Sources (server logs, DMS Sensors,WLS MBeans)

    Notifications

    Generate Diagnostic Dumps containing relevant diagnostic information

    i.e. thread dumps, diagnostic images, JRockit flight recordings,

    etc

    Administration through the WLS Console or WLST

    Functionality

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 16

    WLDF: WebLogic Diagnostic Framework Functionality

    3 1

    2

    4

    3

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 17

    Out-of-the-Box WLDF Watches PS5+: Predefined Watches

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 18

    ODL: Oracle Diagnostic Logging

    Primary logging facility used by most FMW applications to write

    diagnostics into the Diagnostic Logs

    ODL Structure (name/value pairs)

    Mandatory and Optional attributes

    Order of attributes

    ODL attribute values can be used for defining Conditions

    Definition of Logging Levels

    Administration through WLST or Fusion Middleware Control

    Functionality

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 19

    ODL: Oracle Diagnostic Logging

    [2011-09-22T06:50:07.986-07:00] [AdminServer] [NOTIFICATION] []

    [oracle.integration.platform.blocks.deploy] [tid: [ACTIVE].ExecuteThread: '3' for queue:

    'weblogic.kernel.Default (self-tuning)'] [userId: weblogic] [ecid: 3c584fd020bdf1ba:-

    65df75b4:132916143aa:-8000-0000000000000166,1:23265:2] [APP: soa-infra]

    [Deployment] Component: SendMail was successfully deployed to service

    engine:implementation.bpel, for composite:SendMailApp

    Anatomy of an ODL Entry

    1 2 3

    4 5

    6 7

    8 9

    1. Timestamp

    2. Server Name

    3. Message Type

    4. Component ID

    5. Thread ID

    6. User ID

    7. Execution Context ID

    8. Supplemental Attribute

    9. Message Data

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 20

    ODL: Oracle Diagnostic Logging Functionality

    Saved

    Loggers

    Active Loggers

    Logging Levels

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 21

    ST :Selective Tracing

    Selective Tracing adds an additional Attribute: ODL_TRACE_ID

    It can limit the TRACE to:

    Composite

    Application

    User

    Definition of time boundaries for a logging session

    Administration through WLST and Fusion Middleware Control

    (start/stop session)

    Available in release 11.1.1.5 (11gR1 PS4) and above

    Functionality

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 22

    ST :Selective Tracing

    WebLogic

    Domain

    Context: Composite Name, Client Address etc

    Trace Level

    Loggers

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 23

    Diagnostic Frameworks and the

    Resolution Process

    Collect

    detect collect analyze solve

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 24

    Diagnostic Frameworks Architecture

    Rules

    Custom Rules

    SOA Rules

    WLS Rules

    WLDF

    DMS

    ODL

    Incidents

    Diagnostic

    Dumps

    zip

    RDA

    IPS

    Logs

    ST

    DFW Rules

    ADR Repository

    Collect

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 25

    DFW : Diagnostic Framework History / Background

    DFW was introduced with Oracle 11g Database (Fault

    Diagnosability Infrastructure)

    DFW was adopted by Oracle Fusion Middleware SOA starting

    with patchset 11.1.1.6 (11gR1 PS5)

    Standardization of the diagnostic collection mechanisms

    through the whole product stack

    Documentation of every failure in a common repository

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 26

    DFW : Diagnostic Framework Terminology

    Problem

    Inc_2 Inc_n Inc_1

    Problem code bug or configuration issue that causes execution failures

    Incident a single occurrence of a problem

    Problem Key it associates incidents to problems (e.g. OWS-04086 (SOAP

    Fault))

    Diagnostic Dump a collection of diagnostic information (i.e. thread

    dump, configuration, etc)

    Pro

    ble

    m K

    ey

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 27

    DFW : Diagnostic Framework

    DFW Components

    Rules as XML Files

    Rules validation services

    Automatic Diagnostics Repository (ADR) for creating Incident /

    problems catalogue

    The DFW Rules define:

    which ODL events or WLDF Watches MUST trigger an incident

    Which type of information MUST BE collected on incident creation

    (dump execution)

    Functionality

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 28

    DFW: Diagnostic Framework Rules

    LogDetectionCondition Condition based on ODL Attribute values as manifested in Diagnostic

    Logs that triggers the execution of

    dumps

    Rule Condition

    Diagnostic Dump Action

    Rule Condition

    Diagnostic Dump Action

    Condition based on WLDF Watches Diagnostic Dump Actions list the

    specific DDs to take when the condition is met. They can be scoped by

    arguments

    Default Actions are taken for any Log or Rule Condition that is triggered Diagnostic Dump Action

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 29

    DFW: Overview SOA Dumps

    Dump description Name

    Environment (SOA Version/Label, Patch Inventory, Topology) soa.env

    Configuration (soa-infra, service engine config, deployed-

    composites.xml)

    soa.config

    DB Information (Data shape - counts by state, growth patterns for SOA

    schema, MDS schema)

    soa.db

    Composite Metadata (current composite, MDS artifacts referenced) soa.composite

    EDN Dump (EDN event bus state variables, EDN subscriber/publisher

    information for all deployed composites)

    soa.edn

    WSDL/Schema Cache (All Composites) soa.wsdl

    Composite Instance Trail soa.composite.trail

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 30

    WLST: Dump Output SOA Composite Instance Trail Dump

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 31

    DFW: Diagnostic Framework

    ADR (Automatic Diagnostic

    Repository) is a file-based

    repository

    Incidents are stored in ADR with a

    unique ID

    Diagnostic Dumps are stored in

    the related Incident Directory

    ADR Catalogue of Incidents Managed Server

    HOME

    Application Incidents

    Server Incidents

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 32

    DFW: Diagnostic Framework Administration

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 33

    ADRCI/IPS: Incident Packaging System

    IPS is used to gather and package Incident data

    This happens in three steps:

    Create a logical package (Metadata)

    Copy diagnostic information

    Create physical package (.zip) containing the dumps

    Functionality

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 35

    DFW: Diagnostic Framework Summary Component Interaction

    WLDF

    DMS

    ODL

    zip

    RDA

    IPS

    Logs

    ST

    Rules

    Custom Rules

    SOA Rules

    WLS Rules

    Incidents

    Diagnostic

    Dumps

    DFW Rules

    ADR Repository

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 36

    Diagnostic Frameworks and the

    Resolution Process

    Analyze

    detect collect analyze solve

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 37

    Diagnostic Frameworks Architecture

    Rules

    Custom Rules

    SOA Rules

    WLS Rules

    WLDF

    DMS

    ODL

    Incidents

    Diagnostic

    Dumps

    zip

    RDA

    IPS

    Logs

    ST

    DFW Rules

    ADR Repository

    Analyze

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 38

    EM Cloud Control 12c Incident Manager

    Manage reported problems (lifecycle,

    history, etc) through a GUI

    Present patches and workarounds

    when available

    Create Service Requests

    Package data using IPS

    Upload Incident information and test

    cases to Oracle

    Automatically track and synchronize

    Service Request status

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 39

    RDA: Remote Diagnostic Agent

    Log Files

    Incidents

    Configuration

    Diagnostic Information within a SOA Collection

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 40

    WLST: WebLogic Scripting Tool

    List and Execute Diagnostic Dumps

    List and Manage Incidents

    Create Incidents Manually

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 41

    Important Steps When you suspect a problem...

    Check if an Incident is already registered in ADR

    listProblems(), listIncidents().

    View details of the specific Incident

    showIncident(), getIncidentFile().

    If no Incident is created, create an Incident

    manually and collect specific Diagnostic Dumps

    createIncident()

    Package Incidents using IPS or create an

    RDA Collection and upload it to the SR

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 42

    Diagnostic Frameworks and the

    Resolution Process

    Solve

    detect collect analyze solve

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 43

    Diagnostic Frameworks Architecture

    Rules

    Custom Rules

    SOA Rules

    WLS Rules

    WLDF

    DMS

    ODL

    Incidents

    Diagnostic

    Dumps

    zip

    RDA

    IPS

    Logs

    ST

    DFW Rules

    ADR Repository

    Solve

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 44

    Problem Resolution

    Sufficient diagnostics point to a configuration change OR

    Diagnostics provide evidence for a bug that should be fixed in

    cooperation with Oracle Teams

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 45

    Use Cases: Production or Development

    Environments

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 46

    Example Analyzing and Solving a Performance Problem

    detect collect

    End-Users report slow response times

    RDA SOA Collection module will collect the existing Incidents

    RDA Collection uploaded to the SR for further analysis

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 47

    Example Analyzing and Solving a Performance Problem

    The last Incidents in RDA indicate several OutOfMemoryErrors Incident creation was triggered by an out-of-the-box WLDF Watch

    analyze solve

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 48

    Example Analyzing and Solving a Performance Problem

    Support can use JRMC (JRockit Mission Control) because there is

    a JRockit Flight Recording included with the Diagnostic Dumps.

    This points to a specific object causing the OOM.

    analyze solve

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 49

    Cooperation with Support

    RDA SOA Collection

    RDA is used to collect

    configuration and

    runtime information from

    the environment

    RDA guarantees that

    the analysis can start

    immediately w/o

    additional iterations

    Provision of Diagnostic Information

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 50

    Problem Key Description

    DFW-99996 java.sql.SQLException

    DFW-99997 java.lang.OutOfMemoryError creates a jvm.classhistogram dump

    DFW-99998 java.lang.NullPointerException, java.io.IOException,

    java.lang.StringIndexOutOfBoundsException,

    java.lang.ClassNotFoundException

    SOA-900000 SOA Runtime problems

    SOA-900001 SOA Deployment problems (Deployment hangs)

    SOA-900002 SOA DataSource Watch (database and JDBC)

    Predefined Problem Keys Uncaught Exception Problem Keys and SOA-90000x Watches

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 51

    Scenario Action

    SOA Data

    Source

    Problems

    Data Source is

    suspended Detect the root cause

    Setup a WLDF Watch for SOA-900002.

    Heap /

    Memory

    Problems

    OutOfMemoryErrors in

    the logs - Detect the root

    cause

    Setup a WLDF Watch for SOA-900000

    SOA

    Deployment

    - SOA Server Start takes

    a long time

    - Deployment takes a

    long time

    Setup a WLDF Watch for SOA-900001

    Use Selective Tracing for oracle.integration.platform.blocks.deploy.*

    SOA Use Cases SOA Watches and Dumps

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 52

    Beispiel Aktion

    Errors in

    Diagnostic

    Log for

    specific

    composites

    Newly deployed

    composite versions cause

    Errors in the Diagnostic

    Logs

    Use Selective Tracing for the specific composite by setting all needed

    Loggers to TRACE:32 for a timely

    limited session

    Random

    occurrence

    of error

    messages in

    Diagnostic

    Logs

    Need to get the context

    as the problem happens

    sporadically

    Configure Custom Rules in DFW to trigger specific SOA Diagnostic Dumps

    Setup Selective Tracing on the user level if you have evidence that the

    problem is user related

    SOA Use Cases

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 53

    Summary

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 54

    What can we do TODAY?

    We can use WLDF Watches, DMS Metrics and SOA MBeans to

    trigger Incident generation thru DFW and automatic collection of

    diagnostics. That helps to optimize the resolution time and

    increases efficiency.

    We can always check if the pre-defined Watches have already

    created an Incident in a critical situation (First Failure).

    We can use the SOA Modules of RDA for optimizing the workflow

    between Support and customers

    We have everything in place to start familiarizing ourselves with

    the frameworks TODAY!

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 55

    What can we do TOMORROW?

    We can use a variety of dumps for ALL components (including

    OSB, Mediator and Adapters)

    We can use the pre-configured Health Checks (included in RDA

    version 4.30) to proactively identify potential problems

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 56

    Demos References Your Feedback is IMPORTANT!!!

    @SOAProactive

    Twitter

    SOAProactive

    Blog

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 57

    References Overview of SOA Diagnostics in 11.1.1.6

    FMW Diagnostic Framework : Automatic Capture of Diagnostic Data

    Upon First Failure!

    Customer WebCasts: Advisor Webcast Current Schedule

    SOA Suite Information Center

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 58

    Questions?

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 59

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. 60