Sunday 1 July 2012

How to enable JMX in websphere


By default JMX remote port is not enabled in WebSphere, We have to manually enable the JMX remote port. Here I am giving some steps to enable the JMX remote port in Websphere.
This has been done with Websphere 7.0.
After installation of web sphere application server 7.0, fallow the fallowing steps to configure Remote JMX port.
STEP 1:
Login to Admin console of the web sphere any profile(server), short cut will be available in start menu programs.
deploy the PerfServletApp.ear application if not deployed already.
GO TO Applications IN LEFT PANE CLICK WebSphere Enterpise Applications TO CHECK PerfServletApp.ear IS DEPLOYED OR NOT.
IF NOT THEN CLICK New Application UNDER Applications. BROWSE FROM WebSphere directory -> AppServer -> InstallableApps.
FOLLOW THE STEPS.
STEP 2:
Enable the PMI Data and set all the statistics enabled.
GO TO Monitoring and Tuning IN LEFT PANE CLICK ON Performance Monitoring Infrastructure(PMI) IN CONIFGURATION TAB ENABLE THE PMI AND
SET THE ALL STATISTICS. ALSO SET THE ALL STATISTICS IN Runtime Tab. SAVE THE CHANGES.
STEP 3:
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. put the -Djavax.management.builder.initial= -Dcom.sun.management.jmxremote in Generic Jvm Argument field.
and save changes.
STEP 4:
To enable the JMX remote port open the below properties file and add the code below.
FILE : WebSphere 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 5:
SAVE THE MASTER DATA AND STOP THE SERVER AND START THE SERVER TO LOAD THE CHANGES……

Verify the JMX is enable or not
If you have a default Websphere installation, the JNDI port number will likely be 2809, 2810, ... depending on how many servers there are installed on one system and the specific one you want to connect to. To be sure, when starting Websphere, check the logs, as it will dump a line like
0000000a RMIConnectorC A   ADMC0026I: The RMI Connector is available at port 2810

If you don't get this line, open the Websphere admin console and go to
Application servers > server1 > Administration Services > JMX connectors
to see if you need to add or change the config.
Second important bit of information is that the following JAR is always needed when doing JMX with the serverin Java dir:
com.ibm.ws.admin.client_6.1.0.jar

No comments:

Post a Comment