Reputation: 15
I am new to cassandra database.if my cassandra version is 2.2.12 at that place cqlsh is working without any issues and it is connected.
after i updated my cassandra db 3.11.2 version, cqlsh is not connected throwing error
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")})
after again i Downgrade my cassandra version cqlsh is working. here why my latest cassandra cqlsh is not working.
Please help me, Thank you
Upvotes: 1
Views: 187
Reputation: 568
Ran the netstat command and got the following output: below command is working for me check it once.
netstat -an | grep 9042 tcp 0 0 ::ffff:10.1.22.10:9042 :::* LISTEN The above output indicated that we are listening on port 9042 and IP address 10.1.22.10.
However, the error clearly showed that cqlsh was trying to connect to 127.0.0.1 by default. So we were getting "connection refused" error.
Modified the cqlsh command to connect to the IP address 10.1.22.10 and re-ran it as follows and we were able to connect to Cassandra database successfully.
Upvotes: 0