Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Not able to connect to jmx metric running on HDP sandbox using jconsole remotely

Highlighted

Not able to connect to jmx metric running on HDP sandbox using jconsole remotely

New Contributor

I added following properties to hbase-site.xml

<property>

<name>hbase.coprocessor.regionserver.classes</name>

<value>org.apache.hadoop.hbase.JMXListener</value>

</property>

<property>

<name>regionserver.rmi.registry.port</name>

<value>61130</value>

</property>

<property>

<name>regionserver.rmi.connector.port</name>

<value>61140</value>

</property>

Added following config to hbase-env

export HBASE_JMX_BASE="-Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"

export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS $HBASE_JMX_BASE"

export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS $HBASE_JMX_BASE"

10 REPLIES 10

Re: Not able to connect to jmx metric running on HDP sandbox using jconsole remotely

Are you able to do telnet or nc(netcat) from the remote machine on this host and port?

Re: Not able to connect to jmx metric running on HDP sandbox using jconsole remotely

New Contributor

Getting connection refused while trying to connect using telnet. I have HDP sandbox on same machine.

Re: Not able to connect to jmx metric running on HDP sandbox using jconsole remotely

@Tushar Patil

You should add the "-Dcom.sun.management.jmxremote.port=portNum" and then try to connect to that port using jconsole like:

export HBASE_JMX_BASE="-Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false  -Dcom.sun.management.jmxremote  -Dcom.sun.management.jmxremote.port=5555"

Re: Not able to connect to jmx metric running on HDP sandbox using jconsole remotely

New Contributor

@jk

I tried the approach that you have suggested but no success.

Currently i have following configuration in hbase-env,

export HBASE_JMX_BASE="-Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false" export HBASE_MASTER_OPTS="$HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=10101" export HBASE_REGIONSERVER_OPTS="$HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=10102"

And following in hbase-site

<property> <name>hbase.coprocessor.regionserver.classes</name> <value>org.apache.hadoop.hbase.JMXListener</value> </property> <property> <name>regionserver.rmi.registry.port</name> <value>61130</value> </property>

And added 10102 and 61130 in port forwarding in sandbox.

Re: Not able to connect to jmx metric running on HDP sandbox using jconsole remotely

If you cannot use telnet or nc to connect to the port in the Sandbox from your physical machine, there is a networking issue. You can try using the RegionServer RPC port to test connectivity (16020).

Also, use `netstat` on the Sandbox to verify that the ports are not bound only on localhost (which might prevent the VM networking from properly forwarding the port).

Re: Not able to connect to jmx metric running on HDP sandbox using jconsole remotely

New Contributor

@Josh Elser

telnet -d 127.0.0.1 10102

I used telnet with 10102 port and got output given below,

Trying 127.0.0.1...

setsockopt (SO_DEBUG): Permission denied

Connected to 127.0.0.1.

Re: Not able to connect to jmx metric running on HDP sandbox using jconsole remotely

Are you running that from inside the Sandbox or your host machine? You would want to make sure that you can do that test from your host machine into the virtual machine.

Re: Not able to connect to jmx metric running on HDP sandbox using jconsole remotely

New Contributor

@Josh Elser

I running telnet from host machine.

Re: Not able to connect to jmx metric running on HDP sandbox using jconsole remotely

New Contributor

@Josh Elser

Hi Josh,

Are below configurations are correct to enable jmx on sandbox(hbase version - 1.1.2)

<property>

<name>hbase.coprocessor.regionserver.classes</name>

<value>org.apache.hadoop.hbase.JMXListener</value>

</property>

<property>

<name>regionserver.rmi.registry.port</name>

<value>61130</value>

</property>

<property>

<name>regionserver.rmi.connector.port</name>

<value>61140</value>

</property>

Added following config to hbase-env

export HBASE_JMX_BASE="-Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"

export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS $HBASE_JMX_BASE"

export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS $HBASE_JMX_BASE"

Don't have an account?
Coming from Hortonworks? Activate your account here