Support Questions

Find answers, ask questions, and share your expertise

YARN JMX access

avatar
Rising Star

Hello,

I try to connect to the JMX console of the ResourceManager via some tools like Jconsole, but it fails establish a proper connection :

Exception in thread "main" java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.CommunicationException [Root exception is java.rmi.onnectIOException: non-JRMP server at remote endpoint] at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:369) at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:270) at org.archive.jmx.Client.execute(Client.java:225) at org.archive.jmx.Client.main(Client.java:154)

....though the JMX data are visible via the URL :

http://<ResourceManager>:8088/jmx

Any idea on how to enable a correct JMX port for the Yarn ResourceManager ?

Thanks in advance.

Kind regards

LC

1 ACCEPTED SOLUTION

avatar
Explorer

Hello Laurent,

It's true that you can access to the JMX values via the /jmx path but you have to enable the JMX remote access and especify the TCP port. If you deploy via Ambari you have to set in yarn-env template for example the following line:

export YARN_RESOURCEMANAGER_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=8001"

You have to point the Jconsole to that port.

I hope this helps.

Regards.

View solution in original post

6 REPLIES 6

avatar
Master Mentor
@Laurent lau

It's difficult to nail down the exact problem without knowing the environment details, firewall setup and whether you are on corporate vpn or not

http://bugs.java.com/bugdatabase/view_bug.do?bug_i...

avatar
Rising Star

Hello Neeraj,

Actually , there is no such network equipment; it's direct access.It's just that the URL address form is not accepted by the jconcole/jstack tools.regards.

avatar
Explorer

Hello Laurent,

It's true that you can access to the JMX values via the /jmx path but you have to enable the JMX remote access and especify the TCP port. If you deploy via Ambari you have to set in yarn-env template for example the following line:

export YARN_RESOURCEMANAGER_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=8001"

You have to point the Jconsole to that port.

I hope this helps.

Regards.

avatar
Rising Star

Many thanks Raul ! It works perfectly.

avatar
Master Guru

@Laurent lau I am trying to do something similar. Can you provide some details on what tool you used, was this on sandbox?

avatar
New Contributor

Hi,

I would like to also enable JMX although my main concern is that there is no authentication also the use of certificates is also not being used.

Before I enable this on the environment, I would like to know on YARN when you enable this does it allow you to execute operations or will you only be able to access the Mbeans and Attributes just for monitoring purposes?

Kind Regards