C# to Cassandra service with username and password -
cassandra running service on remote machine in same network. created .net program communicates cassandra environment.
i able communicate cassandra when not running service following connection string:
private void connect() { cluster = cluster.builder().withcredentials(username, password).addcontactpoint("192.168.30.104").build(); session = cluster.connect("core_meter"); }
but when try connect cassandra when running service following error:
an unhandled exception of type 'cassandra.nohostavailableexception' occurred in cassandra.dll
additional information: none of hosts tried query available (tried: 192.168.30.104:9042)
i not sure if have change in .yaml file before can approach service username , password. here yaml file: https://www.dropbox.com/s/wbrexlarkjrvlrm/cassandra.yaml?dl=0
edit: when communicate service without username , password can communicate service (i can communicate execution through command prompt) when use username , password not work anymore.
it seems me service , single executable using different yaml configuration files. check environment variables , cassandra-env.sh
files. have @ datastax documentation.
Comments
Post a Comment