1 Copyright © 2012, Oracle and/or its affiliates. All ... · Diagnostic Frameworks Architektur -...

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

Transcript of 1 Copyright © 2012, Oracle and/or its affiliates. All ... · Diagnostic Frameworks Architektur -...

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

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

Diagnostic Frameworks für Entwickler und Administratoren

Natascha Schönfeld

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 und der Lösungsprozess

Einsatzmöglichkeiten – 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

Das Problem

Fehlender Kontext bei

‚First Failure‘

Produktivitätsverlust

Administrationsaufwand

Iterationen zwischen Kunde und Support

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

Auf dem Weg zur Lösung... Zeitnahe Erfassung des Kontexts (‚Black Box‘)

Flexibilität: die Art und die Menge der

diagnostischen information kann an die Art des

Problems angepasst werden

Integration: Einheitliches Verfahren und

Werkzeuge durch die Produktpalette

SOA Diagnostics und Instrumentation Projekt - Prinzipien

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

Überblick: Diagnostic Frameworks Buzzwords

DFW

WLDF

IPS

DMS

ADRCI

RDA

ODL

ST

SWB

ECID

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

Lösungsprozess

Detect

• Aufzeichnung von Kontextinformation beim ersten Auftreten eines Fehlers.

• Aktive Überwachung von Überschreitung von Grenzwerten verfügbarer Ressourcen z.B. Health Checks

Collect

• Regelgesteuerte Informationssammlung.

• Katalogisierung der gesammelten Information (Repository)

• Informationsqualität

Analyze • Effiziente Bereitstellung von diagnostischen Informationen für alle Beteiligte.

Solve

• Schnelle Bereitstellung von Patches.

• Konfigurationsanpassungen mit minimaler Downtime.

Phasen und Anforderungen

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

Diagnostic Frameworks Architektur - Überblick

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 und der

Lösungsprozess

Detect

detect collect analyze solve

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

Diagnostic Frameworks Architektur

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

Oracle Dynamic Monitoring Service (DMS) bietet

Laufzeitstatistiken für die JVM oder für Applikationen.

Zu diesem Zweck implementieren Applikationen bzw.

Komponenten eine Anzahl von Sensoren (Nouns).

Sensoren erstellen Statistiken über verschiedene

Laufzeitparameter (z.B. Anzahl Requests, Free Heap Size,

Processing Time usw).

Ein Administrator kann die Laufzeitinformation mit Hilfe von WLST,

Fusion Middleware Control oder DMS Spy abfragen.

Funktionalität

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

DMS: Dynamic Monitoring Service SOA Suite Sensoren

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

WLDF: WebLogic Diagnostic Framework

WLDF ist Bestandteil von WebLogic Server und umfasst eine Reihe

von Diensten zur Überwachung der Server Ressourcen.

‚Watches‘ und Notifications

– Regelwerk

– Quellen (server logs, DMS Sensors,WLS MBeans)

– Notifications

Diagnostische Information in Form von Thread Dumps, diagnostic

Images oder JRockit Flight Recordings

Administration mittels WLS Console oder WLST

Funktionalität

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

WLDF: WebLogic Diagnostic Framework Funktionalität

3 1

2

4

5

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

Out-of-the-Box WLDF Watches PS5+: Vorkonfigurierte Überwachungspunkte

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

ODL: Oracle Diagnostic Logging

Server Diagnostic Logs

ODL Struktur

– Pflicht- und optionale Attribute

– Reihenfolge

Attributwerte können für die Definition von Bedingungen verwendet

werden.

Detaillierungsgrad kann festgelegt werden.

Administration mittels WLST oder Fusion Middleware Control.

Funktionalität

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

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

Anatomie eines ODL Logs

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. 21

ODL: Oracle Diagnostic Logging Funktionalität

Saved

Loggers

Active Loggers

Logging Levels

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

ST :Selective Tracing

Erweiterung zu ODL (zusätzliches Attribute ODL_TRACE_ID)

Festlegen von Detaillierungsgrad der Protokollierung:

– Composite

– Applikation

– Benutzer

Zeitliche Einschränkung einer Protokollierungssitzung (Session).

Administration mittels WLST und Fusion Middleware Control

(z.B. Session starten / stoppen).

Selective Tracing ist verfügbar ab Version 11.1.1.5 (11gR1 PS4).

Funktionalität

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

ST :Selective Tracing

WebLogic

Domain

Context: Composite Name, Client Address etc

Trace Level

Loggers

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

Diagnostic Frameworks und der

Lösungsprozess

Collect

detect collect analyze solve

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

Diagnostic Frameworks Architektur

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. 26

DFW : Diagnostic Framework Historie

Das DFW wurde mit Oracle Datenbank 11g eingeführt (Fault

Diagnosability Infrastructure).

Oracle Fusion Middleware adaptiert das DFW mit der Version

11.1.1.6 (11gR1 PS5)

Vereinheitlichung des Verfahrens für Sammlung und

Katalogisierung von diagnostischen Informationen für ALLE

Produkte

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

DFW : Diagnostic Framework Terminologie

Problem

Inc_2 Inc_n Inc_1

Problem – Ein Laufzeitfehler

Incident – einmaliges Auftreten

eines Problems

Problem Key – Schlüssel zur

Verknüpfung des Problems zu

Incident(s) (z.B. OWS-04086

(SOAP Fault))

Diagnostic Dump – diagnostische

Information (z.B. thread dump)

Pro

ble

m K

ey

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

DFW : Diagnostic Framework

Komponenten

– Regelwerk in Form von XML Dateien

– Laufzeitdienste zu Validierung des Regelwerks

– Automatic Diagnostics Repository (ADR) zur Katalogisierung von

Problemen und Incidents.

Im Regelwerk wird festgelegt:

– welche ODL events oder WLDF Watches Incidents generieren.

– welche Art von Information gesammelt wird.

Funktionalität

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

DFW: Diagnostic Framework Regelwerk

LogDetectionCondition Bedingungen basieren auf ODL

Attributen in den Diagnostic Logs

Rule Condition

Diagnostic Dump Action

Rule Condition

Diagnostic Dump Action

Bedingungen basieren auf WLDF

Watches oder Attributen des Server

Log

Diagnostic Dump Actions

definieren welche spezifische

Information gesammelt wird

Default Actions: zusätzliche

diagnostische Information Diagnostic Dump Action

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

DFW: Überblick SOA Dumps

Dump Beschreibung Name

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

Konfiguration (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. 31

WLST: Dump Ausgabe SOA Composite Instance Trail Dump

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

DFW: Diagnostic Framework

ADR (Automatic Diagnostic

Repository) ist ein File-based

repository.

Incidents / Problems sind mit

eindeutigen ID’s im ADR

eingetragen.

Incident Dumps werden im

Incident Verzeichnis gespeichert.

ADR – Persistenz von Incidents

Managed Server

HOME

Application Incidents

Server Incidents

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

DFW: Diagnostic Framework Administration

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

ADRCI/IPS : Incident Packaging System

IPS wird verwendet, um Incident Informationen zu bündeln.

Dies geschieht in drei Schritten:

– Logisches Paket zum Incident erstellen.

– Diagnostische Information zuordnen.

– Komprimierte Datei (.zip) generieren.

Funktionalität

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

DFW: Diagnostic Framework Das Zusammenspiel

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. 37

Diagnostic Frameworks und der

Lösungsprozess

Analyze

detect collect analyze solve

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

Diagnostic Frameworks Architektur

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. 39

EM Cloud Control 12c: Incident Manager

Grafisches UI

Verwaltung und Analyse von

Incidents

Erstellung von Service Requests

über die Support Workbench

Analyseinformation automatisch

zum Service Request hochladen

Erstellen einer RDA Collection

wenn ein Incident auftritt

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

RDA

Log Dateien

Incidents

Konfigurations-Information

Analysedaten in einer SOA Collection

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

WLST

Dumps auflisten und ausführen

Probleme oder Incidents auflisten

Incidents manuell generieren

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

Vorgehensweise Wenn ein Problem festgestellt wird ...

Ist ein Incident / Problem im ADR eingetragen?

listProblems(), listIncidents().

Dumps zum Incident lokalisieren und analysieren

showIncident(), getIncidentFile().

Sind keine Incidents vorhanden, manuell einen

Incident generieren

createIncident()

Incident Package oder RDA Collection zum

SR hochladen

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

Diagnostic Frameworks und der

Lösungsprozess

Solve

detect collect analyze solve

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

Diagnostic Frameworks Architektur

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. 45

Problembehebung

Diagnose Information untersuchen

Konfigurationsänderungen ableiten aus der Dump Analyse

Patches – Kooperation mit Support

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

Einsatzmöglichkeiten in Produktions-

und Entwicklungsumgebungen

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

Beispiel: Untersuchen und Lösen eines Performanceproblems

detect collect

End-User melden Performance Probleme, Requests sind langsam

Situation muss untersucht werden, Analyseinformation wird

gesammelt.

Eine RDA SOA Collection wird erstellt um die Konfigurations- und

Laufzeitdaten und auch die letzten Incidents zu sammeln.

Ein Service Request mit Oracle Support wird geöffnet und die RDA

Collection wird zusammen mit einer Problembeschreibung

hochgeladen

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

Beispiel: Untersuchen und Lösen eines Performanceproblems

Eine Analyse der letzten Incidents zeigt, dass zahlreiche

OutOfMemoryErrors aufgetreten sind. Diese Incidents wurden

aufgrund der vordefinierten Watches erstellt:

analyze solve

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

Beispiel: Untersuchen und Lösen eines Performanceproblems

Support analysiert die diagnostic Dumps für die Incidents und kann

ein Objekt lokalisieren, welches für den Speicherverbrauch

verantwortlich ist:

analyze solve

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

Kooperation mit Support

RDA SOA Collection

enthält Konfigurations-

und Laufzeitinformation

zur Analyse von vielen

verschiedenen

Problemen.

Stellt sicher dass

Analyse gestartet

werden kann.

Vermeidung von

Iterationen

Bereitstellung von Analyseinformation für einen Service Request

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

Problem Key Beschreibung

DFW-99996 java.sql.SQLException

DFW-99997 java.lang.OutOfMemoryError - generiert

jvm.classhistogram dump

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

java.lang.StringIndexOutOfBoundsException,

java.lang.ClassNotFoundException

SOA-900000 SOA Speicherinformation

SOA-900001 SOA Deploymentzeiten (Deployment hang)

SOA-900002 SOA DataSource Watch (Datenbank und JDBC)

Vordefinierte Watches Uncaught Exception Problem Keys und SOA-90000x Watches

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

Beispiel Aktion

SOA Data

Source

Probleme

Data Source hat Status

“suspended” – Aufspüren

der Ursache.

Konfigurieren des vordefinierten SOA-

Watch SOA-900002 um zusätzliche

Diagnoseinformation zu erhalten.

Speicher-

Probleme

In einer SOA Umgebung

treten OutOfMemoryError

Meldungen auf.

Konfigurieren des vordefinierten SOA-

Watch SOA-900000

SOA

Deployment

Starten von SOA Servern

dauert lange,

Deploymentzeiten sollen

analysiert werden

Konfigurieren des vordefinierten SOA

Watch SOA-900001

SOA Use Cases Benutzen von vordefinierten SOA Watches und Dumps

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

Beispiel Aktion

Fehler im

diagnostic

Log für

bestimmte

Composites

Im diagnostic Log File

treten unspezifische

Fehler auf. Vor kurzem

wurde eine neue Version

eines bestimmten

Composites eingespielt

Um zusätzliche Diagnoseinformation zu

erhalten wird Selective Tracing für das

zuletzt geänderte Composite

eingeschaltet. So kann die debug-

Information auf die “verdächtige

Komponente” eingeschränkt werden.

Fehlermel-

dungen in

den Logs

In den Logs treten Fehler

auf, für welche der

Kontext bestimmt werden

soll, da seit einiger Zeit

keine Applikations- oder

Konfigurationsänderung

vorgenommen wurde.

Custom Rules in DFW mit den

entsprechenden Dumps aufsetzen um

zu ermitteln in welchem

Zusammenhang diese auftreten.

Selective Tracing kann helfen, debug-

Information zu erhalten, etwa wenn die

Fehler nur für bestimmte User auftreten.

SOA Use Cases

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

Zusammenfassung

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

Was können wir heute tun?

Die automatische Sammlung von Kontextinformation in kritischen

Situationen (WLDF Watches / DMS Metrics / SOA MBeans) trägt zur

effizienten Diagnose und schnellen Behebung von Problemen in

FMW / SOA Umgebungen bei.

Vorkonfigurierte WLDF Watches spüren kritische Fehler auf (‚First

Failure‘) und dokumentieren den Kontext.

Strukturierte Ablage und Aufbereitung der diagnostischen

Information(ADR/RDA) trägt zur Optimierung der Arbeitsabläufe

zwischen Support und unseren Kunden bei.

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

Was können wir morgen tun?

Die Integration aller Fusion Middleware Komponenten wird

stufenweise in Form von zusätzlichen, spezifischen Diagnostic

Dumps für Applikationen oder Komponenten (Oracle Service

Bus, Adapter ,Mediator) vorangetrieben.

Entwicklung von Health Checks auf Basis von Erfahrungswerten

für neue RDA Versionen geplant.

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

Demos – Referenzen

Ihr Feedback ist wichtig!

@SOAProactive

Twitter

SOAProactive

Blog

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

Weitere Informationen 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. 59

Fragen?

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

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