JMX connection failed for message processor on 4.16.05

I am unable to connect using JMX. I want to monitor message-processor using JMX and also monitor GC usage. I followed the steps described in the Apigee documentation, but it didn't work.

What are the steps for enabling JMX for message processor on 4.16.05?

0 1 440
1 REPLY 1

The steps for enabling JMX are definitely described in the documentation.

Can you be more specific about your situation, and the problem you are seeing?

You have access to the MP box, correct? Have you checked to see if the MP is listening on the JMX port? On linux, you can do this with commands line this:

#enumerate ports that are listening
netstat -plnt
# find out who is listening on port 8444
lsof -i tcp:8444  

This will verify that the MP is actually listening on the JMX port.

If that looks ok, then you need to double-check the IP Address you are using to connect to the MP. Verify that the MP is listening on the IP address for the JMX port (by examining the netstat output). Verify that you are using the correct IP address from your JMX tool (JConsole or VisualVM or whatever).

Finally, verify that the IP address is not blocked.


In some cases I have found that I need to use a SOCKS proxy to get to the MP machine.

To do that, you need SSH access to the MP machine, and you need a second machine (Linux, OSX, or Windows) on which you will run a socks proxy, and Jconsole or VisualVM or whatever your JMX tool is. On the second machine, open 2 terminal windows. In the first, run ssh to create a SOCKS proxy.

ssh -D 2001 -p 22 username@mp-machine

This works on Linux and OSX; on Windows you will probably use PuTTY or similar. The username should be valid on the MP machine and should allow ssh. (You may need to use root.) The mp-machine is the IP address or resolvable name of the MP machine. This will start a shell, and start the SOCKS proxy. This shell must remain open for the duration of the jconsole session. You can choose a different port than 2001 here if you like.

In the next terminal, start jconsole or visualVM. In either case, configure the tool to use the SOCKS proxy that is listening on port 2001 (or whatever you chose above). For jconsole, you do this on the command line:

jconsole -J-DsocksProxyHost=localhost -J-DsocksProxyPort=2001

For VisualVM, you specify it in the UI. For other tools, maybe something different. In any case, then specify the JMX address to be something like this:

service:jmx:rmi:///jndi/rmi://localhost:1101/platform

Note: localhost, not the IP address of the MP machine.