I've tried both with pycassa
, cassandra.cluster
and dse.cluster
without making a connection.
I feel like I'm connecting to the wrong host, as I'm writing the linux servers hostname and not specifying anything regarding the cassandra.
Collegues have told me they only know of connecting to the server through cqlsh
inline on the linux machine. That just sounds unconvinient.
Specific configurations in cassandra.yaml
authenticator: com.datastax.bdp.cassandra.auth.DseAuthenticator
authorizer: com.datastax.bdp.cassandra.auth.DseAuthorizer
What I'm doing in pycassa:
import pycassa
URIPORTLIST = ['12345.mycompany.net:9420']
pool = pycassa.ConnectionPool('my_keyspace', server_list=URIPORTLIST,credentials={'USERNAME':'fancycar','PASSWORD':'becauseimbatman'}, prefill=False)
cf = pycassa.ColumnFamily(pool, 'my_table')
Error message:
AllServersUnavailable: An attempt was made to connect to each of the servers twice, but none of the attempts succeeded. The last failure was TTransportException: Could not connect to 12345.mycompany.net:9420
With dse.cluster
from dse.cluster import Cluster
auth_provider = PlainTextAuthProvider(
username='fancycar', password='becauseimbatman')
cluster = Cluster(
['12345.mycompany.net'],
port=9042,auth_provider=auth_provider)
session = cluster.connect('my_keyspace')
Error message:
NoHostAvailable: ('Unable to connect to any servers', {'11.111.11.1': AuthenticationFailed('Failed to authenticate to 11.111.11.2: Error from server: code=0100 [Bad credentials] message="Failed to login. Please re-try."',)})