cassandra的连接问题
我是 cassandra 新手。我正在尝试连接到 cassandra bt 无法连接。 我接下来的步骤是
1.使用命令启动服务器 - /root/Documents/apache-cassandra-0.6.6/bin/cassandra -f
2.在另一个终端上给出命令 /root/Documents/apache-cassandra-0.6.6/bin/cassandra-cli 这是说欢迎使用 cassandra cli
3。然后我通过发出命令来连接 cassandra /root/Documents/apache-cassandra-0.6.6/bin/cassandra-cli
但我收到异常“连接到 10.10.10.142/9160 的异常 - java.net.NoRouteToHostException:没有到主机的路由” “
任何人都可以帮助我为什么我会遇到这样的例外。
I m new to cassandra.I m trying to connect to cassandra bt couldnot connect.
the steps i m following are
1.start the server with command -
/root/Documents/apache-cassandra-0.6.6/bin/cassandra -f
2.on another terminal i m giving command
/root/Documents/apache-cassandra-0.6.6/bin/cassandra-cli
which is saying welcome to cassandra cli
3.then i m connecting too cassandra by giving the command
/root/Documents/apache-cassandra-0.6.6/bin/cassandra-cli
but i m getting exception as "Exception connecting to 10.10.10.142/9160 - java.net.NoRouteToHostException: No route to host
"
can anyone help me why i m getting such exception.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这与卡桑德拉“无关”。
文档(关于 NoRouteToHostException)指出:
“表示在尝试将套接字连接到远程地址和端口时发生错误。通常,由于防火墙的介入,或者如果中间路由器已关闭。”
This has "nothing" to do with cassandra.
The documentation (regarding NoRouteToHostException) states that:
"Signals that an error occurred while attempting to connect a socket to a remote address and port. Typically, the remote host cannot be reached because of an intervening firewall, or if an intermediate router is down. "
关闭 Linux 中的防火墙
另一个需要考虑的选择是将端口 7199 添加到防火墙,或者只是测试它以查看是否可以访问 2 节点系统,即使用“ sudo service firewalld stop” [dse@orion conf]$ dsetool status mars
DC:Cassandra 工作负载:Cassandra 图表:无
状态 = 向上/向下
|/ 状态=正常/离开/加入/移动
-- 地址负载有效所有权 VNode 机架运行状况 [0,1]
UN 10.0.0.165 250.03 KiB 100.00% 1 机架1 0.20
UN 10.0.0.20 656.65 KiB 100.00% 256 机架1 0.40
Another option to consider is to add the port 7199 to the firewall or just to test it to see if you can access a 2 node system is to turn off the firewall in linux using " sudo service firewalld stop"
[dse@orion conf]$ dsetool status mars
DC: Cassandra Workload: Cassandra Graph: no
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Effective-Ownership VNodes Rack Health [0,1]
UN 10.0.0.165 250.03 KiB 100.00% 1 rack1 0.20
UN 10.0.0.20 656.65 KiB 100.00% 256 rack1 0.40