【问题标题】:how to run cassandra repair/compact from one node in a cluster如何从集群中的一个节点运行 cassandra 修复/压缩
【发布时间】:2018-01-06 13:56:43
【问题描述】:

我想从 1 个 Cassandra 集群节点运行修复/压缩操作,而不是从集群中的所有节点调度它。 我正在使用 cassandra 3 版本。 如果我在集群中指定其他节点,"nodetool -h **NODEIP** repair keyspace" 将不起作用。此命令仅适用于我运行此命令的本地节点。请建议一种通过从集群中的一个节点运行来为所有节点运行修复/压缩的方法。

谢谢

【问题讨论】:

  • 您在使用nodetool -h <ip> repair <keyspace>时遇到了什么错误
  • 我收到“nodetool: Failed to connect to ':7199' - ConnectException: 'Connection denied (Connection denied)'。”错误。唯一有效的命令是:“bin/nodetool -h localhost repair ” 它没有解析 ipaddress。
  • 如果您首先调查目标节点无法接收本地节点请求的原因,您可能不需要解决方法。你试过吗?
  • 是的,我试过了。如果我指定 IP 地址,即使本地节点也不工作。不工作:- “nodetool -h repair keyspace” 工作:- “nodetool -h localhost repair keyspace” 我尝试在 cassadra-env 中添加 JVM_OPTS = “$JVM_OPTS -Djava.rmi.server.hostname=IP 地址”。 sh 但问题仍然存在

标签: cassandra cassandra-3.0 nodetool


【解决方案1】:

默认情况下,JMX 安全被禁用并且只能从 localhost 访问,因为 nodetool 使用 JMX 与 Cassandra 通信,除非启用 JMX 安全,否则 nodetool 只会在本地节点上工作。

请参阅此 Datastax 页面,了解如何enable JMX authentication

【讨论】:

    猜你喜欢
    • 2017-12-09
    • 2018-05-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-05-13
    • 2017-11-06
    • 1970-01-01
    • 2012-11-29
    相关资源
    最近更新 更多