jboss enterprise application platform 6 troubleshooting

8
Red Hat JBoss EAP 6 Troubleshooting Alexandre Cavalcanti Middleware Technical Account Manager [email protected]

Upload: alexandre-cavalcanti

Post on 11-Jan-2017

251 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: JBoss Enterprise Application Platform 6 Troubleshooting

Red Hat JBoss EAP 6 Troubleshooting

Alexandre Cavalcanti

Middleware Technical Account Manager

[email protected]

Page 2: JBoss Enterprise Application Platform 6 Troubleshooting

JBoss Troubleshooting - Alexandre Cavalcanti2

AGENDA

Introduction

Dumps

Logs

Byteman

Page 3: JBoss Enterprise Application Platform 6 Troubleshooting

JBoss Troubleshooting - Alexandre Cavalcanti3

There are many different types of problems or erros (Memory Leaks, Transaction Failures, Performance problems, JBoss remoting errors, Data inconsistencies, JVM Garbage Collection, Bad Application Code, Deadlocks

Timeouts, System integration issues etc).

How to troubleshoot them?

Introduction

Page 4: JBoss Enterprise Application Platform 6 Troubleshooting

JBoss Troubleshooting - Alexandre Cavalcanti4

Thread Dump

The thread dump is a snapshot of exactly what's executing at a moment in time.

Useful if your Java application sometimes seems to hang when running under load, as an analysis of the dump will show where the threads are stuck. JSTACK • Check PID and user of Java process by executing ps command:

• ps aux | grep java • Execute jstack command as JBoss user:

• $su - <JAVA_USER> • $jstack -l <JAVA_PID>

https://access.redhat.com/solutions/18178

Dumps

Page 5: JBoss Enterprise Application Platform 6 Troubleshooting

JBoss Troubleshooting - Alexandre Cavalcanti5

Heap Dump

A heap dump is a snapshot of memory at a given point in time. It contains information on the Java objects and classes in memory at the time the snapshot was taken.

A heap dump can also help you understand the memory footprint of your app • -XX:+HeapDumpOnOutOfMemoryError

• <server-groups> • <server-group name="main-server-group" profile="ha"> • <jvm name="default"> • … • <jvm-options> • <option value="-XX:+HeapDumpOnOutOfMemoryError"/> • </jvm-options>

• https://access.redhat.com/solutions/21109

Dumps

Page 6: JBoss Enterprise Application Platform 6 Troubleshooting

JBoss Troubleshooting - Alexandre Cavalcanti6

Jitter and Log files

The JBoss Diagnostic Reporter (JDR pronounced jitter) is an EAP6 subsystem built to collect information to aid in troubleshooting. • [domain@localhost:9999 /] /host=$host/server=$server/subsystem=jdr/:generate-jar-

report Add a log level do the log subsystem • /profile=full-ha/subsystem=logging/logger=org.jboss.jca:add(level=TRACE) Garbage Collection (GC) logging • /host=master/jvm=default/:write-attribute(name=jvm-options,value=["-server","-

verbose:gc “,”-Xloggc:gc.log"])

https://access.redhat.com/solutions/221103 https://access.redhat.com/solutions/459903 https://access.redhat.com/solutions/269023

Logs

Page 7: JBoss Enterprise Application Platform 6 Troubleshooting

JBoss Troubleshooting - Alexandre Cavalcanti7

Byteman allows you to insert extra Java code into your application, either as it is loaded during JVM startup or even after it has already started running. The injected code is allowed to access any of your data and call any application methods, including where they are private. • JAVA_OPTS="$JAVA_OPTS -javaagent:<mypath>/lib/byteman.jar=script:<mypath>/

examplescript.btm,sys:<mypath>/lib/byteman.jar”Bullet

https://access.redhat.com/solutions/31283 http://byteman.jboss.org/

Byteman

Page 8: JBoss Enterprise Application Platform 6 Troubleshooting

Questions?