Wild Goat
Wild Goat

Reputation: 3589

DataStax Devcenter fails to connect to the remote cassandra db

I've installed DataStax cassandra and it is up and running on my remote machine. Now I am trying to connecto via DataStax Devcenter but it fails.

Before posting this question I've read identical here: DataStax Devcenter fails to connect to the remote cassandra database

I went to cassandra.yaml conf file but start_native_transport: true option is not in my file. Where should I look for it? Also I've changed rpc_address to: 0.0.0.0.

UPDATE:

If I add start_native_transport: true into my cassandra.yaml it just crashes on Cassandra restart. Please refer a log below:

ERROR 17:48:32,626 Fatal configuration error error
Can't construct a java object for tag:yaml.org,2002:org.apache.cassandra.config.Config; exception=Cannot create property=start_native_transport for JavaBean=org.apache.cassandra.config.Config@ef28a30; Unable to find property 'start_native_transport' on class: org.apache.cassandra.config.Config
 in "<reader>", line 10, column 1:
    cluster_name: 'Test Cluster'
    ^

        at org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct(Constructor.java:372)
        at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:177)
        at org.yaml.snakeyaml.constructor.BaseConstructor.constructDocument(BaseConstructor.java:136)
        at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:122)
        at org.yaml.snakeyaml.Loader.load(Loader.java:52)
        at org.yaml.snakeyaml.Yaml.load(Yaml.java:166)
        at org.apache.cassandra.config.DatabaseDescriptor.loadYaml(DatabaseDescriptor.java:141)
        at org.apache.cassandra.config.DatabaseDescriptor.<clinit>(DatabaseDescriptor.java:116)
        at org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:124)
        at org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCassandraDaemon.java:389)
        at org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:107)
Caused by: org.yaml.snakeyaml.error.YAMLException: Cannot create property=start_native_transport for JavaBean=org.apache.cassandra.config.Config@ef28a30; Unable to find property 'start_native_transport' on class: org.apache.cassandra.config.Config
        at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:305)
        at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.construct(Constructor.java:184)
        at org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct(Constructor.java:370)
        ... 10 more
Caused by: org.yaml.snakeyaml.error.YAMLException: Unable to find property 'start_native_transport' on class: org.apache.cassandra.config.Config
        at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.getProperty(Constructor.java:342)
        at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:240)
        ... 12 more
null; Can't construct a java object for tag:yaml.org,2002:org.apache.cassandra.config.Config; exception=Cannot create property=start_native_transport for JavaBean=org.apache.cassandra.config.Config@ef28a30; Unable to find property 'start_native_transport' on class: org.apache.cassandra.config.Config
Invalid yaml; unable to start server.  See log for stacktrace.

Thanks for any Help!

Upvotes: 2

Views: 2320

Answers (3)

Amit Kaneria
Amit Kaneria

Reputation: 5818

DevCenter.ini does not have java VM information. Adding below line of VM info helped resolve connection issue.

-vm
C:\Program Files (x86)\JDK64\1.8.0.74\jre\bin\java.exe

NOTE: above line represents appropriate java.exe from JRE version

Upvotes: 1

Alex Popescu
Alex Popescu

Reputation: 4012

  1. What version of Cassandra are you using? DevCenter supports Cassandra versions >= 1.2

  2. If you still see errors with the change in cassandra.yaml you can post a link to a Gist. But the YAML format is pretty simple so I think you'll figure it out.

  3. If you read my previous answer you'll notice that it required the rpc_address to be set to a different value than 0.0.0.0. Anyways the latest version of DevCenter (1.1.1) will work even all the nodes in your cluster have the rpc_address set to 0.0.0.0 (as a side note I don't think that's generally a good setting).

Upvotes: 1

kkmishra
kkmishra

Reputation: 709

start_native_transport: true

should be there in cassandra.yaml if its not there then you should add it into cassandra.yaml and try after restarting the Cassandra server

Upvotes: 1

Related Questions