You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "linbo.liao (JIRA)" <ji...@apache.org> on 2017/01/11 13:41:58 UTC

[jira] [Created] (ZOOKEEPER-2663) Enable remote jmx, zkCli.sh start failed with jmx communication error

linbo.liao created ZOOKEEPER-2663:
-------------------------------------

             Summary: Enable remote jmx, zkCli.sh start failed with jmx communication error
                 Key: ZOOKEEPER-2663
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2663
             Project: ZooKeeper
          Issue Type: Bug
          Components: jmx
    Affects Versions: 3.4.9
         Environment: OS: Centos 6.7 x86_64
Zookeeper: 3.4.9
Java: HotSpot 1.8.0_65-b17
            Reporter: linbo.liao


My laptop is Macbook Pro with macOS Sierra (IP: 192.168.2.102). An VM (IP: 192.168.2.107) is running on VirtualBox.

Deploy zookeeper-3.4.9 on VM, enable the remote JMX with option:

-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8415 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.rmi.port=8415
-Djava.rmi.server.hostname=192.168.2.107

Test with jconsole on Mac,  connect 192.168.2.107:8415 works fine.

Runnign zkCli.sh failed
$ bin/zkCli.sh
Error: JMX connector server communication error: service:jmx:rmi://localhost.localdomain:8415

$ cat /etc/hosts
127.0.0.1       localhost.localdomain localhost
::1     localhost6.localdomain6 localhost6



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)