Saturday, June 30, 2012

how to setup JConsole for Oracle Oracle WebLogic Server

Hi Everyone,

We all know JConsole is part of JDK, it can be found in $JAVA_HOME/bin directory, and this utility can be used as JMX Console for Managing WebLogic Server, Where you can see the WebLogic Server configuration and invoke various MBean operations, it helps to view and edit the MBean configuration and invoke various JMX Operations on the serverRuntime, serverConnfig and domainRuntime

Here in this post we will see how to setup JConsole for WebLogic Server 10g.

As JConsole is free and distributed with JDK, there is no need of downloading it seperately

We will follow simple steps to setup the JConsole for WebLogic Server
JConsole works in two modes :
  1. Local Process Mode -> Checks for Local Java Process to Manage them through console
  2. Remote Mode ->We Can provide JMX URL to Manage the Remote Java Process
We Normally Use Remote mode as we need to connect the JConsole to MBean Server of WebLogic Application Server

Step 1. Start WebLogic Admin Server
 
Step  2. Login to Admin Console and check the domain configuration


Fig 2. Check Domain's Advanced Configuration as The MBean Servers are enabled or not
Step 3. Check for the Parameters "Compatibility MBean Server Enabled" and "Management EJB Enabled" Status ( They Should be Enabled - By Default They are enabled)


 
Step 4. Check The Configuration at Admin Server Side in Ports Tab - > IIOP


Fig 4. IIOP Should be enabled in Admin Server IIOP Port Configuration


Fig 5. Provide some user name and password (preferable weblogic/weblogic), as Anonymous users are not allowed to connect to the JMX MBean Server (Advanced Options in IIOP)


Step 5. Save and Activate Changes - This Needs Restart of the Admin Server.










Notice that the logs at the startWebLogic.cmd command window shows as below

The non-dynamic attribute DefaultIIOPPasswordEncrypted on weblogic.management.configuration.ServerMBeanImpl@453b029e([ProdDomain]/Servers[AdminServer]) has been changed. This may require redeploying or rebooting configured entities
change has been made which affects the server AdminServer. This server must berebooted in order to consume this change

Step 6. Restart the Admin Server


Step 7. Start JConsole - Execute following Steps and Verify the output

F:\>echo %WL_HOME%
F:\Oracle\Middleware\wlserver_12.1

F:\>echo %JAVA_HOME%
F:\Oracle\Middleware\jdk160_29\bin
 
F:\>cd %WL_HOME%

F:\Oracle\Middleware\wlserver_12.1>cd server

F:\Oracle\Middleware\wlserver_12.1\server>cd bin

F:\Oracle\Middleware\wlserver_12.1\server\bin>setWLSEnv.cmd


Step 8. Execute the following command to invoke "jconsole remote"

jconsole -J-Djava.class.path=%JAVA_HOME%\lib\jconsole.jar;%WL_HOME%\server\lib\wljmxclient.jar -J-Djmx.remote.protocol.provider.pkgs=weblogic.management.remote

Step 9. We will get to see the console as below.


 
Fig 9 . JConsole Login Screen
Step 10. Please provide Service JMX URL for Admin Server and Specify the MBean Tree to enter as below and their particular JConsole Space.


1. service:jmx:rmi:///jndi/iiop://localhost:7011/weblogic.management.mbeanservers.domainruntime


username/password = weblogic/weblogic

 3. service:jmx:rmi:///jndi/iiop://localhost:7011/weblogic.management.mbeanservers.edit
username/password = same as above





Fig 12. JConsole Edit Session in Edit Tree.


This is it..!!

Please let me know if you have any feed back suggestion here


Thanks for Visiting My Blog - Please Share your feed back and ideas.
Enjoy working with middleware....

Regards,
Ajinkya Vichare
ajinkya-vichare.blogspot.com


6 comments:

  1. HI,the above information is a avaluable. For more detailed explanation of weblogic,java, system admin,c,c++ i have found a website.You can visit and study
    www.tipsforinterview.in

    ReplyDelete
    Replies
    1. Hi Sriram,

      Best Wishes @@@@@...

      Thank you so much... Will check your given link...

      Regards,
      Ajinkya Vichare

      Delete
  2. hi Ajinkya thanku for posting this Article.. Its very useful to moniter the JVMs gud...

    But I hav a senario.. can u pls share u r Answer

    I am in my personal computer....k

    My weblogic server has located in another place(means server has installed in another Machine)....k

    Through Putty s/w I connected the Box . I started my servers useing shell... now the same way i run the Jconsole.. it show the message has some x11 properties something something....how to overcome this situation

    can I RUN the Jconsole in Mycomputer(with connecting to another machine)


    pls share u r answer

    ReplyDelete
    Replies
    1. HI Weblogic GUY,

      Best Wishes..@@@

      Can you provide me error which you have got about X11 something something..?

      If you have connectivity to your server then i don't things you will have any issues to run the same.

      You can write me for further queries on middlewaresolution1@gmail.com

      Regards,
      Ajinkya Vichare

      Delete
  3. Hello, where do you acutally configure the management port as 7011?

    ReplyDelete
  4. The moment I clicked "Publish", I realized it's just the HTTP port for the domain, as I didn't configure it to use a separate administration port, or a JMX port.

    Thank you so much!
    -Yu

    ReplyDelete