Cassandra 集群设置出现 JMX 错误
我正在尝试设置 cassandra 集群作为测试台,但出现 JMX 远程连接错误。我似乎从 cassandra 常见问题解答页面 Nodetool 中找到了错误的答案,
Nodetool 对于任何远程主机都显示“连接拒绝主机:127.0.1.1”。什么给?
Nodetool 依赖于 JMX,而 JMX 又依赖于 RMI,而 RMI 又根据交换每一端的需要设置自己的侦听器和连接器。通常,所有这些都在幕后透明地发生,但是连接的主机或所连接的主机的名称解析不正确可能会导致交叉线和令人困惑的异常。
如果您不使用 DNS,请确保您的 /etc/hosts 文件在两端都是准确的。如果失败,请尝试在启动时将 -Djava.rmi.server.hostname=$IP 选项传递给 JVM(其中 $IP 是您可以从远程计算机访问的接口的地址)。
但有人可以帮助我如何做 -Djava.rmi.server.hostname=$IP 或者添加的是hosts文件,我知道在hosts中通常我们添加“IP别名”,但是它的ip和别名。
我不太了解 java 或 linux
我目前正在使用 ubuntu v10.04 和 cassandra v0.74
Sudesh
I m trying setup a cassandra cluster as a test bed but gave the JMX remote connection error. I seem to found the answer for my error from cassandra FAQ page
Nodetool says "Connection refused to host: 127.0.1.1" for any remote host. What gives?
Nodetool relies on JMX, which in turn relies on RMI, which in turn sets up it's own listeners and connectors as needed on each end of the exchange. Normally all of this happens behind the scenes transparently, but incorrect name resolution for either the host connecting, or the one being connected to, can result in crossed wires and confusing exceptions.
If you are not using DNS, then make sure that your /etc/hosts files are accurate on both ends. If that fails try passing the -Djava.rmi.server.hostname=$IP option to the JVM at startup (where $IP is the address of the interface you can reach from the remote machine).
But can somebody help me on how to do -Djava.rmi.server.hostname=$IP
Or what to add is hosts file, i know that in hosts normally we add "IP Alias", but whose ip and alias.
I dont know much java or either linux
I m currently working on ubuntu v10.04 and cassandra v0.74
Sudesh
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于 JMX,您需要启用 JMX-remoting:
根据您想要访问 jmx-server 的位置,您还需要指定端口:
并设置或禁用密码。
查看 http://download.oracle.com /javase/1.5.0/docs/guide/management/agent.html 了解更多详细信息。
For JMX you need to enable JMX-remoting:
Depending on from where you want to access the jmx-server, you also need to specify a port:
and set or disable passwords.
Have a look at http://download.oracle.com/javase/1.5.0/docs/guide/management/agent.html for more details.