Bakir Jusufbegovic
Bakir Jusufbegovic

Reputation: 2966

Cannot start cassandra in DataStax Enterprise (single node scenario)

I'm trying to setup cassandra on single node using DataStax Enterprise (this is only for experimental usage of DataStax Enterprise on non-production server). I'm using amazon image which is rhel based and I've used following instructions to install DataStax Enterprise: http://docs.datastax.com/en/datastax_enterprise/4.7/datastax_enterprise/install/installRHELdse.html

Installation passes successfully and then I try to start DSE with following instructions: http://docs.datastax.com/en/datastax_enterprise/4.7/datastax_enterprise/startStop/refDseServ.html (I only need cassandra, therefore I use default option where other services are disabled) HADOOP_ENABLED=0 SOLR_ENABLED=0 SPARK_ENABLED=0

Starting dse:

sudo service dse start
Starting DSE daemon : dse
DSE daemon starting with just Cassandra enabled (edit /etc/default/dse to enable)

Checking netstats output:

netstat -nltp
(No info could be read for "-p": geteuid()=500 but you should be root.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address                  State       PID/Program name
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                        LISTEN      -
tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN      -
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      -
tcp        0      0 :::22                       :::*                        LISTEN      -
tcp        0      0 ::1:631                     :::*                        LISTEN      -

When checking cassandra logs, there is no error:

...
 INFO [main] 2015-09-15 13:32:01,256 CassandraDaemon.java (line 190)  Code Cache Non-heap memory: init = 2555904(2496K) used = 1508800(1473K)   committed = 2555904(2496K) max = 50331648(49152K)
 INFO [main] 2015-09-15 13:32:01,256 CassandraDaemon.java (line 190)   Eden Space Heap memory: init = 62128128(60672K) used = 62128128(60672K)   committed = 62128128(60672K) max = 62128128(60672K)
 INFO [main] 2015-09-15 13:32:01,256 CassandraDaemon.java (line 190)   Survivor Space Heap memory: init = 7733248(7552K) used = 7411240(7237K)   committed = 7733248(7552K) max = 7733248(7552K)
 INFO [main] 2015-09-15 13:32:01,256 CassandraDaemon.java (line 190) CMS Old Gen Heap memory: init = 232783872(227328K) used = 5415784(5288K) committed = 232783872(227328K) max = 232783872(227328K)
 INFO [main] 2015-09-15 13:32:01,257 CassandraDaemon.java (line 190) CMS Perm Gen Non-heap memory: init = 21757952(21248K) used = 19446152(18990K) committed = 21757952(21248K) max = 174063616(169984K)
 INFO [main] 2015-09-15 13:32:01,257 CassandraDaemon.java (line 191)     Classpath: 
...

Cassandra config: /etc/dse/cassandra/cassandra.yaml has following important properties:

seeds: "<AWS_PUBLIC_DNS>"
listen_address: <AWS_PUBLIC_DNS>
rpc_address: <AWS_PUBLIC_DNS>
endpoint_snitch: com.datastax.bdp.snitch.DseDelegateSnitch

Thanks in advance

Upvotes: 3

Views: 3224

Answers (2)

Tea Glaz
Tea Glaz

Reputation: 1

Probably too late...
Hope it saves someone's time. If this happens, check the log /var/log/messages. Kernel is silently killing the jvm for lack of memory:

Apr 11 21:58:47 ikc kernel: Out of memory: Kill process 13123 (java) score 765 or sacrifice child
Apr 11 21:58:47 ikc kernel: Killed process 13123 (java) total-vm:2360168kB, anon-rss:671720kB, file-rss:104812kB 

Upvotes: 0

Ragit
Ragit

Reputation: 29

Did you do a nodetool status after you started DSE. What is the output you get once you do that .

Also, can you check your system.log file its by default in /var/log/cassandra directory. Or if you installed DSE as a service it should be output.log file in the /var/log/cassandra.

So Basically when you configure cassandra.yaml, the settings of list of IP addresses is important.

  • RPC address : Is a public address which is the listen address for client connections
  • Listen Address: is the IP address or hostname that other Cassandra nodes use to connect to this node. So this should be a private address, instead of a public IP set here. This should not be set to 0.0.0.0 at any time.

Upvotes: 1

Related Questions