I am getting this error when I try cqlsh or cqlsh 127.0.0.1:9160 :
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")})
I just started learning Cassandra. My machine had an installation of Cassandra for something else, so I uninstalled and installed Cassandra 3.11.1 to follow tutorials. I followed this to uninstall, I used this instruction to install.
My hosts file is:
127.0.0.1 localhost
My python is version 2.7.12 and some Cassandra settings are:
start_rpc: false
rpc_address: localhost
rpc_port: 9160
Cassandra status is active, and node was up and normal when I first tried "sudo nodetool status", but now it is erroting after I changed start_rpc to true and change it back to false :( Node error message is:
nodetool: Failed to connect to '127.0.0.1:7199' - ConnectException: 'Connection refused'.
I read this and tried his suggestion, and it did not work.
Also, ideally, I want to use python 3. Is it a bad idea?
您可以尝试连接至native_transport_port
,默认值为9042。我将其发布为答案,因为我的用户ID权限无法发布评论。
My uninstalling did not properly delete Cassandra folders. Although I did tell its installer to make a new folders, it did not. I needed to purge Cassandra when I uninstall.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.