0

我正在尝试连接到我在服务器上安装的 Datastax 企业 Cassandra。当我尝试连接时,我收到一个错误:

Cassandra connection error  { [Error: All host(s) tried for query failed. First host tried, XX.XX.XX.XX:9042: Error: connect ECONNREFUSED XX.XX.XX.XX:9042. See innerErrors.]
  innerErrors:
   { 'XX.XX.XX.XX:9042':
      { Error: connect ECONNREFUSED XX.XX.XX.XX:9042
          at Object.exports._errnoException (util.js:896:11)
          at exports._exceptionWithHostPort (util.js:919:20)
          at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1073:14)
        code: 'ECONNREFUSED',
        errno: 'ECONNREFUSED',
        syscall: 'connect',
        address: 'XX.XX.XX.XX',
        port: 9042 } },
  info: 'Represents an error when a query cannot be performed because no host is available or could be reached by the driver.',
  message: 'All host(s) tried for query failed. First host tried, XX.XX.XX.XX:9042: Error: connect ECONNREFUSED XX.XX.XX.XX:9042. See innerErrors.' }

我猜 cassandra.yaml 中的某些内容限制了与 localhost 的连接?

任何帮助将不胜感激!我的 cassandra.yaml 有点长,无法发布,如果需要我可以发布链接

4

1 回答 1

0

答案在 /etc/dse/cassandra/cassandra.yaml

broadcast_rpc_address: <node_address (ex: 127.0.0.1)>
rpc_port: 9160 # <-- Probably, unless you changed it
listen_address: localhost # <-- Cassandra to cassandra communication
于 2016-09-15T21:10:36.847 回答