apache / apache/cassandra-ccm

Mysterious failures trying to start cluster traced to environment.

Open
#163 1 comment 0 reactions 1 assignee Claimed by @ptnapoleon View on GitHub
Dominant language
Python
Stars
1.2k
Forks
309
PR merge metrics
No merged PRs in 30d

Description

I needed to switch dev environments back to our 'legacy' one which didn't use CCM, so I shutdown my cluster, started up the legacy dev env (which runs cassandra directly), did some work and then shut that down and went back to try to restart CCM. I ran up against a couple of errors, depending on whether I tried to start one or more nodes:
ccm create --cassandra-version 2.0.10 --nodes 1 --start test
Current cluster is now: test
[node1 ERROR] Invalid yaml. Please remove properties [row_cache_provider, reduce_cache_sizes_at, reduce_cache_capacity_to, flush_largest_memtables_at] from your cassandra.yaml
[node1 ERROR] Fatal configuration error; unable to start. See log for stacktrace.
C-c C-cTraceback (most recent call last):
File "/usr/local/bin/ccm", line 70, in
cmd.run()
File "/usr/local/lib/python2.7/dist-packages/ccmlib/cmds/cluster_cmds.py", line 122, in run
if cluster.start(verbose=self.options.debug, wait_for_binary_proto=self.options.binary_protocol, jvm_args=self.options.jvm_args, profile_options=profile_options) is None:
File "/usr/local/lib/python2.7/dist-packages/ccmlib/cluster.py", line 222, in start
node.watch_log_for("Listening for thrift clients...", process=p, verbose=verbose, from_mark=mark)
File "/usr/local/lib/python2.7/dist-packages/ccmlib/node.py", line 266, in watch_log_for
time.sleep(.5)
KeyboardInterrupt
or
ccm create --cassandra-version 2.0.10 --nodes 3 --start test
Current cluster is now: test
[node1 ERROR] Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 7199; nested exception is:
[node1 ERROR] java.net.BindException: Address already in use
C-c C-cTraceback (most recent call last):
File "/usr/local/bin/ccm", line 70, in
cmd.run()
File "/usr/local/lib/python2.7/dist-packages/ccmlib/cmds/cluster_cmds.py", line 122, in run
if cluster.start(verbose=self.options.debug, wait_for_binary_proto=self.options.binary_protocol, jvm_args=self.options.jvm_args, profile_options=profile_options) is None:
File "/usr/local/lib/python2.7/dist-packages/ccmlib/cluster.py", line 222, in start
node.watch_log_for("Listening for thrift clients...", process=p, verbose=verbose, from_mark=mark)
File "/usr/local/lib/python2.7/dist-packages/ccmlib/node.py", line 266, in watch_log_for
time.sleep(.5)
KeyboardInterrupt

Removing and restarting the cluster, rm -rf ~/.ccm and re-downloading didn't help. Finally I checked my environment and noticed that the 'legacy' development env had left the following variables set in the environment: ( substituted to protect the guilty :-)
env | grep -i CASSANDRA
CASSANDRA_COMMITLOG_DIR=/tmp//cassandra/commitlog
CASSANDRA_WORKSPACE=/tmp/cyportal/cassandra
CASSANDRA_PID_FILE=/tmp//cassandra/pid
CASSANDRA_DATA_DIR=/tmp//cassandra/data
CASSANDRA_PATH=/usr/sbin/
CASSANDRA_CONF=/home/rthille/dev//etc/cassandra
CASSANDRA_INCLUDE=/home/rthille/dev//etc/cassandra/cassandra.in.sh

Switching to a new, clean shell fixed my issues.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.