Monday, July 26, 2010

Enable JMX Remote port in Websphere

By default Websphere is not JMX enabled ,  so we have to enable the JMX remote port after installation.
Below I am trying to explain the steps to enable the JMX remote port in Websphere.  These are the steps I have fallowed to enable the JMX remote port in Websphere 7.0.
STEP 1:
Login to Admin console of the web sphere any profile(server). You can find the shortcut in the Windows menu after installation.
Step 2:
Deploy the PerfServletApp.ear application if not deployed already:  Go to "Applications" left pane of admin console, click on  WebSphere Enterpise Applications. Check PerfServletApp.ear is deployed or not, if its not deployed – fallow the below steps
New Application underApplications. Browse from WebSphere directory -> AppServer -> InstallableApps.
Click on next button to  deploy Pref Application. Fallow the next steps to complete the installation
STEP 3:
 Enable the PMI Data and set all the statistics enabled:
Go to "Monitoring and Tuning" in left pane of Admin Console, Click on Performance Monitoring Infrastructure(PMI) in "Configuration" tab, enable the "PMI and set the All Statistics. Also set the All Statistics in Run time Tab. 
Step 4:  Don’t forget to save all changes……….. J
STEP 5:
    Set the generic jvm argument =
-Djavax.management.builder.initial= -Dcom.sun.management.jmxremote
In Severs --> Server Types --> WebSphere Application Servers  shows the servers list. Click on the server you want.
In the right pane --> Server Infrastructure --> Java and Process Management  click on Process definition, again in Additional Properties of Configuration tab

Click on Java Virtual Machine and put the -Djavax.management.builder.initial= -Dcom.sun.management.jmxremote in Generic Jvm Argument field.
SAVE All THE CHANGES
STEP 6:   
    To enable the JMX remote port open the below properties file and add the code below.
    Note : The properties file can be available in :
WebSphere_Home directory  \AppServer\java\jre\lib\management\management.properties
CODE :
        com.sun.management.jmxremote.port=9001
        com.sun.management.jmxremote.ssl=false
        com.sun.management.jmxremote.authenticate=false

STEP 7:
Save all the changes and stop and start the server.   
After doing all this you can connect the Websphere using your JConsole Appplication.

6 comments:

Jude said...

Did you have to startup up RAD using the Sun JVM? I have the IBM JDK as my JAVA_HOME and so adding the JVM arguments to reference the sun jmx remote argument causes the RAD console to complain that it can't find the class and the startup of RAD fails after adding the argument to the JVM configuration. I had to manually edit my server.xml file (after searching for it painstakingly) and only then was I able to startup my Websphere server again. Use this jmx remote argument with caution!

Jude said...

Did you have to startup up RAD using the Sun JVM? I have the IBM JDK as my JAVA_HOME and so adding the JVM arguments to reference the sun jmx remote argument causes the RAD console to complain that it can't find the class and the startup of RAD fails after adding the argument to the JVM configuration. I had to manually edit my server.xml file (after searching for it painstakingly) and only then was I able to startup my Websphere server again. Use this jmx remote argument with caution!

Gunda said...

What is the version of RAD and IBM JDK you are using... RAD works perfectly with IBM JDK. I am using it also.

Jude said...

Sorry for the confusion. My RAD starts up just fine. When I was talking about the startup complaining I was talking about Websphere INSIDE of RAD. Websphere starts fine within RAD normally but when I added the JVM arguments you suggested in the Admin Console, my next startup of Websphere failed. My guess is because the argument is not recognized by the IBM JDK I have running inside of RAD.

Jude said...

Sorry for the confusion. My RAD starts up just fine. When I was talking about the startup complaining I was talking about Websphere INSIDE of RAD. Websphere starts fine within RAD normally but when I added the JVM arguments you suggested in the Admin Console, my next startup of Websphere failed. My guess is because the argument is not recognized by the IBM JDK I have running inside of RAD.

Gunda said...

I haven't faced any such issues with these changes.