无法运行cqlsh(连接被拒绝) [英] Unable to run cqlsh(connection refused)

查看:94
本文介绍了无法运行cqlsh(连接被拒绝)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我从节点的bin目录中运行.cqlsh命令时,出现连接错误无法连接到任何服务器。



我正在使用仅包含以下内容的经过编辑的Yaml文件(其余的默认yaml中的所有值均已省略):



集群名称,num令牌,分区程序,数据文件目录,commitlog目录,commitlog同步,commitlog同步周期,已保存的缓存目录,种子提供者信息,侦听地址和终结点。



是因为我没有在yaml中包括一些重要参数(例如rpc地址)引起的错误?请帮忙。



操作系统:RHEL 6.9
Cassandra:3.0.14

解决方案


  1. cassandra yaml文件可以具有修改后的值,但是您不应删除行并创建自己的yaml文件。是的,yaml文件中需要rpc地址。

  2. 在编写诸如data_file_directories之类的目录时,应遵循与以下相同的缩进:

      data_file_directories-
    / path / to / access


Cassandra在yaml文件中的缩进非常严格。


  1. 最后,运行./cqlsh,如果提供了ip_address,我曾经遇到一个问题。


    1. 它是远程服务器。

    2. 检查nodetool的状态并确认节点是否正常运行。


    I'm getting a connection error "unable to connect to any server" when I run .cqlsh command from the bin directory of my node.

    I'm using an edited yaml file containing only the following(rest all values present in the default yaml have been omitted) :

    cluster name, num tokens, partitioner, data file directories, commitlog directory, commitlog sync, commitlog sync period, saved cache directory, seed provider info, listen address and endpoint snitch.

    Is this error because I've not included some important parameter in the yaml like rpc address? Please help.

    OS: RHEL 6.9 Cassandra: 3.0.14

    解决方案

    1. The cassandra yaml file can have modified values, but you should not delete the rows and make your own yaml file. And yes, rpc address is needed in yaml file.
    2. In writing the directories like data_file_directories, you should follow the same indentation as:

       data_file_directories - 
            /path/to/access
      

    Cassandra is very strict at it's indentation in yaml file. I once faced an issue due to this wrong indentation in data_file_directories.

    1. Finally, run ./cqlsh , provide ip_address if it is a remote server.
    2. Check the nodetool status and confirm whether the node is up and normal.

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

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