Nikhil
Nikhil

Reputation: 1

Cassandra connectivity issue

I am new to cassandra. These are the resources with theirs' respected versions that i have used to set up cassandra. java : jdk1.8.0.111 cassandra : 3.10 ubuntu : 15.10

I have intsalled cassandra and made changes in the cassandra.yaml file. when i run cqlsh from editor then it shows following error: Connection error: ('Unable to connect to any servers', {'127.0.0.1': AuthenticationFailed('Remote end requires authentication.',)}) I tried my best to look at the issue but couldn't resolve it. can someone please help me in this.

Upvotes: 0

Views: 1765

Answers (2)

Nitin Rane
Nitin Rane

Reputation: 41

try below code

from cassandra.cluster import Cluster

from cassandra.auth import PlainTextAuthProvider

auth_provider = PlainTextAuthProvider(username ='<<username>>', password='<<password>>')

cluster=Cluster(['<<some ip or url >>'], auth_provider=auth_provider)

Upvotes: 0

Shoban Sundar
Shoban Sundar

Reputation: 573

It seems you have enabled Authentication in your cassandra.yaml file. Login in cqlsh with default username and password 'cassandra'.

cqlsh <listen address> <cql port> -u cassandra -p cassandra

Upvotes: 1

Related Questions