如何更改Datastax代理尝试连接的地址?

时间:2015-05-19 20:39:45

标签: datastax datastax-enterprise

我的Cassandra实例没有收听127.0.0.1。当我开始datastax-agent时,我会在日志中找到它:

# tail -n 100 /var/log/datastax-agent/agent.log
...
ERROR [Initialization] 2015-05-19 22:35:04,064 Can't connect to Cassandra, retrying soon.
 com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: /127.0.0.1:9042 (com.datastax.driver.core.TransportException: [/127.0.0.1:9042] Cannot connect))
    at com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:220)
    at com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:78)
    at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1231)
    at com.datastax.driver.core.Cluster.init(Cluster.java:158)
    at com.datastax.driver.core.Cluster.connect(Cluster.java:246)
    at clojurewerkz.cassaforte.client$connect_or_close.doInvoke(client.clj:149)
    at clojure.lang.RestFn.invoke(RestFn.java:410)
    at clojurewerkz.cassaforte.client$connect.invoke(client.clj:165)
    at opsagent.cassandra$setup_cassandra$fn__8157.invoke(cassandra.clj:344)
    at again.core$with_retries_STAR_$fn__8013.invoke(core.clj:98)
    at again.core$with_retries_STAR_.invoke(core.clj:97)
    at opsagent.cassandra$setup_cassandra.invoke(cassandra.clj:339)
    at opsagent.opsagent$setup_cassandra.invoke(opsagent.clj:153)
    at opsagent.jmx$determine_ip.invoke(jmx.clj:276)
    at opsagent.jmx$setup_jmx$fn__8438.invoke(jmx.clj:293)
    at clojure.lang.AFn.run(AFn.java:24)
    at java.lang.Thread.run(Thread.java:745)

如何更改Datastax Agent连接的地址?我尝试在代理local_interface(并重启代理)中设置address.yaml,但是这似乎不起作用。

1 个答案:

答案 0 :(得分:1)

秘诀是将rpc_address设为0.0.0.0。致LHWizard指出这一点。