3
votes

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

2
What happens if you try and run CQLSH? - Nathan
Did you install DSE 4.7.3 or another version? Also, are you trying to run cqlsh on that machine or from another machine? Did you change the snitch or was that a default setting? - Chris Gerlt
@Nathan, CQLSH returns following: [ec2-user@ip-10-182-224-98 ~]$ cqlsh Connection error: ('Unable to connect to any servers', {'127.0.0.1': error(111, "Tried connecting to [('127.0.0.1', 9042)]. Last error: Connection refused")}) Same thing happens if I try to start CQLSH <EC2_PUBLIC_DNS>. - Bakir Jusufbegovic
@ChrisGerIt, DSE version is 4.7.3. I have only one machine where everything is installed and I'm trying cqlsh from that machine. Snitch is: endpoint_snitch: com.datastax.bdp.snitch.DseSimpleSnitch which is default one added with DSE - Bakir Jusufbegovic
Same thing happens to me with dse-full-4.6.9-1... I get no errors, but I cannot connect with cqlsh and cassandra-cli; My rpc_address is set to 0.0.0.0 - Emil D

2 Answers

1
votes

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.
0
votes

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