-
Notifications
You must be signed in to change notification settings - Fork 308
Open
Description
I have created a cluster using the following: ccm create --pwd-auth test --version 4.1.4 --nodes 1 --debug --start
When I try to connect in a Python integration test using the Cassandra default username and password (cassandra/cassandra), I receive the error:
cassandra.cluster.NoHostAvailable: ('Unable to connect to any servers', {'127.0.0.1:9042': AuthenticationFailed('Failed to authenticate to 127.0.0.1:9042: Error from server: code=0100 [Bad credentials] message="Provided username cassandra and/or password are incorrect"')})
My connection code is as follows:
from cassandra.cluster import Cluster
from cassandra.auth import PlainTextAuthProvider
from cassandra.policies import DCAwareRoundRobinPolicy
config = {'cassandra': {'hosts': ['127.0.0.1'], 'username': 'cassandra', 'password': 'cassandra', 'keyspace': 'myKeyspace'}}
cluster = Cluster(hosts, auth_provider=PlainTextAuthProvider(username=config['username'], password=config['password']),
load_balancing_policy=DCAwareRoundRobinPolicy())
session = cluster.connect(config['keyspace'])
What are the default credentials? How am I supposed to authenticate to the cluster?
Metadata
Metadata
Assignees
Labels
No labels