Most Read This Week
From the Blogosphere
Configuring JMX in WebSphere 8.5
Historically most JMX implementations used the simple JMXMP protocol as the underlying transport
By: Hovhannes Avoyan
Sep. 17, 2012 08:00 AM
Like most application servers, WebSphere 8.5 has a rich management infrastructure based on JMX, or Java Management Extensions. In fact, the WebSphere administration console uses JMX to connect to the server to issue queries and perform administrative operations. In a previous post I showed you how to secure JBoss’ JMX connector. While there is a lot of information out there on how to connect to WebSphere via JMX, most of the examples involve either disabling SSL, or worse – disabling security globally. So let’s see how we can access WebSphere’s JMX connector remotely in a secure way. Like most things WebSphere, this could look very daunting at first, but once done, you will have a reliable and secure setup.
First, a Little Background
Enabling the JMX Connector in WebSphere
Step 1. Log on to the Admin Console
Step 2. Navigate to the server settings:
From the menu on the left, go to Servers > Server Types > WebSphere Application Servers.
Step 3. Click on your server (default is server1) and select the Configuration tab.
Step 6. Verify the IIOP Port Number Go back to the server page (see steps 2&3), but this time click on Ports (under the Communications heading). Make a note of the ORB_LISTENER_ADDRESS value (default is 9100)
Step 7. Restart the server. From the command line, go to your server profile folder, e.g.
[dkamenov@was01 bin]cd /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/bin [dkamenov@was01 bin]sudo ./stopServer.sh server1 ADMU0116I: Tool information is being logged in file /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/server1/stopServer.log ADMU0128I: Starting tool with the AppSrv01 profile ADMU3100I: Reading configuration for server: server1 ADMU3201I: Server stop request issued. Waiting for stop status. ADMU4000I: Server server1 stop completed. [dkamenov@was01 bin]$ sudo ./startServer.sh server1 ADMU0116I: Tool information is being logged in file /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/server1/startServer.log ADMU0128I: Starting tool with the AppSrv01 profile ADMU3100I: Reading configuration for server: server1 ADMU3200I: Server launched. Waiting for initialization status. ADMU3000I: Server server1 open for e-business; process id is 13397
After what seems like an eternity, your server will come up.
Step 8. Verify that the server is listening on port 9100:
[dkamenov@was01 ~]$ netstat -an | grep 9100 tcp 0 0 :::9100 :::* LISTEN
#!/bin/bash WAS_HOME=/opt/IBM/WebSphere/AppServer # setup server-specific env variables . $WAS_HOME/profiles/AppSrv01/bin/setupCmdLine.sh #HOST=localhost HOST=192.168.24.129 # Change this as needed PORT=9100 CLASSPATH=$JAVA_HOME/lib/jconsole.jar CLASSPATH=$CLASSPATH:$WAS_HOME/runtimes/com.ibm.ws.admin.client_8.5.0.jar CLASSPATH=$CLASSPATH:$WAS_HOME/runtimes/com.ibm.ws.ejb.thinclient_8.5.0.jar CLASSPATH=$CLASSPATH:$WAS_HOME/runtimes/com.ibm.ws.orb_8.5.0.jar $JAVA_HOME/bin/jconsole \ -J-Djava.class.path=$CLASSPATH\ -J$CLIENTSAS\ -J$CLIENTSSL\ service:jmx:iiop://$HOST:$PORT/jndi/JMXConnector
In a future post, we will take things a step further by using the Monitis JMX monitor to gather metrics from WebSphere and upload them to your Monitis account. Until then, happy monitoring!
Subscribe to the World's Most Powerful Newsletters
Today's Top Reads