dse-driver连接被拒绝

时间:2016-09-15 19:57:43

标签: cassandra datastax datastax-enterprise cassandra-node-driver

我正在尝试连接到我的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有点太长了,如果需要我可以发布一个链接

1 个答案:

答案 0 :(得分: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