Status: resolved
JRockit Mission Control: 3.1.2
WebLogic: 10.3.2
Use case
You have the need to remotely monitor and profile the JRockit JVM(s) of Oracle WebLogic Server.
Solution
- Install JRockit Mission Control on the client
- Configure WebLogic Server Domain with JRockit JVM
- Configure JRockit Management Server
Components/Products
How to
Bereich
| Beschreibung |
|
|
Putty
| Login as oracle on telde.local [oracle@telde ~]$ cd middleware/user_projects/domains/base_domain/ [oracle@telde base_domain]$ vi startWebLogic.sh |
Putty/vi | Add the following java Options before starting the WLS instance: JAVA_OPTIONS="-Xmanagement:ssl=false,authenticate=false,port=7091" export JAVA_OPTIONS ${DOMAIN_HOME}/bin/startWebLogic.sh $* Save file and Close vi. |
Putty | Start WLS [oracle@telde base_domain]$ ./startWebLogic.sh …. Notice the starting of the management server … [JRockit] Management server started on port 7091, ssl=false, authenticate=false. …
|
Client | Start JRockit Mission Control
|
JRMC | Create a new connection Enter Host Enter Port Click: Test connection => Status keeps “Unable to connect” Click: Finish Starting the console on the newly created connection you might receive the following exception: Could not open Management Console for telde.local. com.jrockit.mc.rjmx.ConnectionException: Connection refused to host: 127.0.0.1; nested exception is: java.net.ConnectException: Connection refused: connect com.jrockit.mc.rjmx.ConnectionException: Connection refused to host: 127.0.0.1; nested exception is: java.net.ConnectException: Connection refused: connect at com.jrockit.mc.rjmx.ConnectionManager.connect(ConnectionManager.java:63) at com.jrockit.mc.console.ui.actions.StartConsole$1.preConnect… So how to fix? |
Putty | Stop WLS |
| Edit startWebLogic.sh Add -Djava.rmi.server.hostname=<remotehost> to the java options so that it looks like
|
Putty/vi | .. JAVA_OPTIONS="-Djava.rmi.server.hostname=telde.local -Xmanagement:ssl=false,authenticate=false,port=7091" export JAVA_OPTIONS ${DOMAIN_HOME}/bin/startWebLogic.sh $* Save file and exit vi. |
Putty | Start WLS once again [oracle@telde base_domain]$ ./startWebLogic.sh
|
JRMC | Now try to test connection again. Result should be
|
JRMC | Start the console and monitor CPU, Mem, seak for memory leaks, etc. |
Resources
java.rmi.server.hostname (1.1 and later)
The value of this property represents the host name string that should be associated with remote stubs for locally created remote objects, in order to allow clients to invoke methods on the remote object. In 1.1.7 and later, the default value of this property is the IP address of the local host, in "dotted-quad" format.
Do you know of any easy way to set up remote monitoring when there is a firewall in place?
ReplyDeleteThanks,
KaJun
p.s. - the text body of the blog posting is getting cut off on it's right side - it seems the CSS style is set too narrow... if I change the width in main-wrapper to something larger, the text will appear...
ReplyDelete#main-wrapper {
width: 664px;
}
Hello KaJun,
ReplyDeleteI will fix/improve the layout issue soon. Thanks.
Monitoring through a firewall depends on network configuration and your possibilities to place potentially needed extra stuff on customers server. So it is not easy to answer....
Regards,
Andreas.
thx for the article
ReplyDeletework!!!! the parameter -Djava.rmi.server.hostname=telde.local isn't in mission control page documentation
ReplyDeletetks!!
Great to hear this post could help you ;)
ReplyDeleteRegards,
Andreas
-Djava.rmi.server.hostname parameter rescued my life.
ReplyDeleteYou re welcome! I am happy to rescue lifes ;)
ReplyDeleteAndreas ... Nice post! Is it possible to, time to time, automatically export/log JVM performance and latelly import in console to view the results ?
ReplyDeleteCheers! :)
Hi, to be honest I am not sure. Maybe jrcmd (command line tool for jrockit) is able to do this. http://docs.oracle.com/cd/E15289_01/doc.40/e15061/ctrlbreakhndlr.htm#i1001717
DeleteYou need to check out yourself ;)
Thanks for your fast reply.
DeleteI was there, exploring jrcmd - at least i'm not completely lost! :)
If i get any more results, i'll let you know!
Thanks once again!
Cheers! ;)
I was wondering that it would be possible to parse some argument when launching specific JVM ?
DeleteSomething like :
"-Xverboselog:${LOGDIR}/gc.log"" ???
Perhaps a stupid question! :)
Fuck shit! this saved my day. I spend all day with this problem with single and easy solution.
ReplyDeleteThank you very much
hello andreas... i am novice at this and so my questioni might sound trivial to you..
ReplyDeletehere it is:
i have multiple weblogic instances built on 1 box which needs to be monitored. I believe i need to spin up 1 port for every instance. However there would only be 1 script to start all instances.. how do i pass different port number each time to start different instances..
Well, it depends how you start you managed servers. At least this is definetly possible because every server has a dedicated jvm process.
ReplyDeleteIf using Nodemanager you are able to set "server start" arguments by using the WLS Admin Console for each server. If you are using the startManagedServer.sh scripts then you are free to parametrize the script.
Hope, that helps!
Hi Andreas,
ReplyDeleteI am using Tomcat Server. Where do I have to add the following line?
JAVA_OPTIONS="-Xmanagement:ssl=false,authenticate=false,port=7091"
export JAVA_OPTIONS
Regards,
Suman
Hi Hecticmind,
ReplyDeleteyou should set it in the JAVA_OPTS variable in $TOMCAT_HOME/bin/catalina.sh or catalina.bat
Hope that helps,
Andreas