WebLogic Troubleshooting
1) Inclidubg the time taken field in access.log
Console — lock & edit — Environment — servers — managed server — Logging –http– advanced — extended — format –and type
c-ip date time cs-method cs-uri sc-status bytes time-taken
save and activate changes, repeat the above procedure for all managed server
It will show you which pages or request taken longer time
————————————————————-
—————————————————————–
2) Enabling verbose garbage collection logging
add the following parameter in server start argument
-Xverbose:memory,gc -XverboseTimeStamp
check the system load using $sar -q command and find the highest load and check at that .out log
Enabling verbose log without restarting server
$ps aux | grep Prod_server01 | grep -v grep | awk ‘{print $2}
$jrcmd PID verbosity set=gc,memory
——————————————————————————————————–
3) Taking Thrad dumps
The thread dumps can be taken from the administration console, shell or using jrcmd command
a)using administration console
console — environment — servers– servername — monitoring — threads — Dump Thread Stacks
b) using jrcmd
$ps aux | grep Prod_server01 | grep -v grep | awk ‘{print $2}
$jrcmd PID print_threads some_log_file
c) Using Kill command
$Kill -3 PID
It will generate log file in default log file
———————————————————————————————————-
4) Enabling JRockit Mission Control Flight Recorder
Add the following server start parameter
-XX:FlightRecorderOptions=defaultrecording=true,disk=true,repository=./jfr/Prod_server01,maxage=1440ms,size=100m
maxage and size value 0= unlimited
—————————————————————————————————————-
5) Analyzing Heap Dump
The heap dump can be performed using jrcmd command
$jrcmd PID hprofdump
Analyze heap dump using Eclipse memory analyzer (MAT)
————————————–
6) Generating the deap dump automatically on OOM ( Out Of Memory ) conditions
add the below argument in server startup
-XX:+HeapDumpOnOutOfMemoryError
heap file dump generating same like generating using jrcmd command
———————————————————————————————–
7) Recovering the WebLogic Admin Password
$ cd $DOMAIN_HOME/bin
$. ./setDomainEnv.shell
start wlst
$cd $WL_HOME/common/bin/wlst.sh
run the following command
from weblogic.security.internal import BootProperties .BootProperties.load(“/oracle/Middleware/user_project/domains/PROD_DOMAIN/servers/PROD_Adminserver/security/boot.properties”,false)
prop = BootProperties.getBootProperties()
print “username: ” + prop.getOneClient()
print “password: ” + prop.getTwoClient ()
the usename and password will be displayed on the screen, using the same method we can recover the datasource password also
——————————————————————————————————–