无法使用cqlsh连接到cassandra [英] Could not connect to cassandra with cqlsh

查看:97
本文介绍了无法使用cqlsh连接到cassandra的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想连接到cassandra但出现此错误:

I want to connect to cassandra but got this error:

$ bin/cqlsh
Connection error: ('Unable to connect to any servers', {'192.168.1.200': error(10061, "Tried connecting to [('192.168.1.200', 9042)]. Last error: No connection could be made because the target machine actively refused it")})


推荐答案

非常简单。

计算机正在主动拒绝,因为您的系统上没有运行cassandra。请按照以下步骤完全摆脱此麻烦:

The machine is actively refusing it because your system does not have cassandra running on it. Follow the following steps to completely get rid of this trouble :


  1. 从DataStax(Datastax-DDC;安装 Cassandra Cassandra版本3)。

  2. 转到〜\安装\路径\DataStax-DDC\apache-cassandra\bin

  3. 在那里打开 cmd 。 (如果出现以下情况,请使用 Alt + F + P 打开它您使用的是Windows 8或更高版本的Windows。)

  4. 键入 cassandra -f ,这会在窗口上产生很多东西,您必须得到最后一行作为 INFO 11:32:31创建默认的超级用户角色'cassandra'

  5. 现在打开另一个 cmd 窗口在同一文件夹中。

  6. 键入 cqlsh

  1. Install Cassandra from DataStax (Datastax-DDC; Cassandra version 3).
  2. Go to ~\installation\path\DataStax-DDC\apache-cassandra\bin.
  3. Open up cmd there. (Use Alt+F+P to open it if you are on windows 8 or later).
  4. type cassandra -f this will generate a lot of stuff on the window and you must get the last line as INFO 11:32:31 Created default superuser role 'cassandra'
  5. Now open another cmd window in the same folder.
  6. Type cqlsh

这应该提示您,没有任何错误。

This should give you a prompt, without any error.

我还发现如果我使用在此处 /www.planetcassandra.org/archived-versions-of-datastaxs-distribution-of-apache-cassandra/ rel = nofollow>存档的Cassandra版本。 我不知道为什么:((如果您发现请发表评论)。

I also discovered that this error doesn't pop up if I use cassadra v2.x found here Archived version of Cassandra. I don't know why :( (If you find out please comment).

因此,如果上述步骤不起作用,您可以随时回到Cassandrav2.x。

So, if the above steps do not work, you can always go back to Cassandra v2.x.

干杯。

这篇关于无法使用cqlsh连接到cassandra的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆