Cassandra中的连接错误

时间:2016-09-14 11:47:35

标签: ubuntu cassandra

我在ubuntu 16.04上使用以下命令安装了cassandra:

sudo apt-get install cassandra

现在安装,当我运行命令时:

sudo service cassandra status

它显示如下:

● cassandra.service - LSB: distributed storage system for structured data
  Loaded: loaded (/etc/init.d/cassandra; bad; vendor preset: enabled)
Active: active (exited) since Wed 2016-09-14 17:01:17 IST; 11min ago
 Docs: man:systemd-sysv-generator(8)

 Sep 14 17:01:17 ishan-HP-15-Notebook-PC systemd[1]: Starting LSB: distributed st
Sep 14 17:01:17 ishan-HP-15-Notebook-PC systemd[1]: Started LSB: distributed sto
Sep 14 17:06:05 ishan-HP-15-Notebook-PC systemd[1]: Started LSB: distributed sto
Sep 14 17:08:53 ishan-HP-15-Notebook-PC systemd[1]: Started LSB: distributed sto
Sep 14 17:08:57 ishan-HP-15-Notebook-PC systemd[1]: Started LSB: distributed sto
lines 1-10/10 (END)

我认为它已在3.0.8版本中正确安装。但是当我试图跑:

cqlsh

然后显示以下错误:

Connection error: ('Unable to connect to any servers', {'127.0.0.1': error(111, "Tried connecting to [('127.0.0.1', 9042)]. Last error: Connection refused")})

我不知道为什么会这样,任何形式的帮助都会受到赞赏。提前致谢。

1 个答案:

答案 0 :(得分:0)

您是否使用netstat -ant检查了侦听端口9042的IP地址是什么?如果您按照guidelines(快速入门应该足够),请尝试与cqlsh ipaddress建立联系。