使用cqlsh远程连接cassandra——设置cassandra.yaml里rpc_address和listen_address为ipv4地址即可

简介:

You need to edit cassandra.yaml on the node you are trying to connect to and set the node ip address for rpc_address and listen_address and restart Cassandra.

rpc_address is the address on which Cassandra listens to the client calls.

listen_address is the address on which Cassandra listens to the other Cassandra nodes.

 

Try to change the rpc_address to point to the node's IP instead of 0.0.0.0 and specify the IP while connecting to the cqlsh, as if the IP is 10.0.1.34 and the rpc_port left to the default value 9160 then the following should work:

cqlsh 10.0.1.34 9160 

Or:

cqlsh 10.0.1.34 


见:http://stackoverflow.com/questions/29121904/cassandra-cqlsh-connection-refused

Synopsis 

On a Linux host:

bin/cqlsh [options] [host [port]]
On a Windows host:
python cqlsh.py [options] [host [port]] 

windows下直接python cqlsh.py加上host port即可!
















,如需转载请自行联系原作者
相关文章
|
3月前
|
存储 IDE 测试技术
玩转数据处理利器:学会使用 YAML 文件轻松处理数据
玩转数据处理利器:学会使用 YAML 文件轻松处理数据
56 0
|
6月前
|
Kubernetes Cloud Native 应用服务中间件
【云原生】使用k8s创建nginx服务—通过yaml文件svc类型暴露
【云原生】使用k8s创建nginx服务—通过yaml文件svc类型暴露
132 0
|
6月前
|
Web App开发 资源调度 JavaScript
SAP Fiori Elements 应用里的 ui5.yaml 文件详解试读版
SAP Fiori Elements 应用里的 ui5.yaml 文件详解试读版
76 0
|
6月前
|
Kubernetes 应用服务中间件 nginx
kubernetes集群命令行工具kubectl介绍&yaml文件介绍-20230208
kubernetes集群命令行工具kubectl介绍&yaml文件介绍-20230208
|
2月前
|
机器学习/深度学习 数据可视化 计算机视觉
YOLOv5改进 | 2023Neck篇 | 轻量级跨尺度特征融合模块CCFM(附yaml文件+添加教程)
YOLOv5改进 | 2023Neck篇 | 轻量级跨尺度特征融合模块CCFM(附yaml文件+添加教程)
146 1
|
2月前
|
Shell Go
go 编辑yaml 文件
在Go语言中编辑YAML文件通常涉及以下步骤: 1. 读取YAML文件内容到字符串。 2. 使用YAML解析库(如`gopkg.in/yaml.v2`)将字符串解析为Go数据结构(如`map[string]interface{}`或自定义的结构体)。 3. 修改数据结构中的值以更新YAML内容。 4. 将修改后的数据结构编码回YAML格式的字符串。 5. 将字符串写回到YAML文件。 以下是一个简单的例子,展示了如何使用`gopkg.in/yaml.v2`库来编辑YAML文件: 首先,确保你已经安装了`gopkg.in/yaml.v2`包: ```bash go get gopkg.i
|
6月前
|
Kubernetes NoSQL 关系型数据库
通过编写k8s的资源清单yaml文件部署gitlab服务
通过编写k8s的资源清单yaml文件部署gitlab服务
|
2月前
|
编解码 文件存储 计算机视觉
YOLOv5改进 | 2023Neck篇 | BiFPN双向特征金字塔网络(附yaml文件+代码)
YOLOv5改进 | 2023Neck篇 | BiFPN双向特征金字塔网络(附yaml文件+代码)
214 0
|
3月前
|
移动开发 开发框架 JavaScript
什么是 SAP UI5 项目 ui5.yaml 文件中的 specVersion 字段
什么是 SAP UI5 项目 ui5.yaml 文件中的 specVersion 字段
18 0
|
4月前
|
Java
Java【代码分享 11】yaml配置List和Map参数对象的配置信息及类文件实例分享(效仿GatewayDynamic+DynamicDataSource的注入方法)
Java【代码分享 11】yaml配置List和Map参数对象的配置信息及类文件实例分享(效仿GatewayDynamic+DynamicDataSource的注入方法)
51 0