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)