Search code examples
cassandraccm

Error creating cluster with version 3.4


I'm trying to create a cluster with version 3.4, but it keeps giving me an error. The strange thing is that if I try to do it with version 2.1.5 for example, everything runs smoothly.

So for instance if I try to create a cluster with ccm create -v 3.4 -n 3 mycluster This is what I get:

WARN:Downloading 3.4 failed, due to [Errno 2] No such file or directory. Trying to build from git instead.
http://git-wip-us.apache.org/repos/asf/cassandra.git git:cassandra-3.4
Cloning Cassandra...
Traceback (most recent call last):
  File "/usr/local/bin/ccm", line 5, in <module>
    pkg_resources.run_script('ccm==2.1.4', 'ccm')
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 528, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1401, in run_script
    exec(script_code, namespace, namespace)
  File "/usr/local/lib/python2.7/dist-packages/ccm-2.1.4-py2.7.egg/EGG-INFO/scripts/ccm", line 74, in <module>

  File "build/bdist.linux-x86_64/egg/ccmlib/cmds/cluster_cmds.py", line 158, in run
  File "build/bdist.linux-x86_64/egg/ccmlib/cluster.py", line 63, in __init__
  File "build/bdist.linux-x86_64/egg/ccmlib/cluster.py", line 76, in load_from_repository
  File "build/bdist.linux-x86_64/egg/ccmlib/repository.py", line 77, in setup
  File "build/bdist.linux-x86_64/egg/ccmlib/repository.py", line 203, in clone_development
ccmlib.common.CCMError: Building C* version git:cassandra-3.4 failed. Attempted to delete /home/pedro/.ccm/repository/gitCOLONcassandra-3.4 but failed. This will need to be manually deleted

However if I do ls -a /home/pedro/.ccm/repository/ -l, I don't see the folder that had to be manually deleted according to the stacktrace:

total 12
drwxrwxr-x 3 pedro pedro 4096 Mar 25 18:01 .
drwxrwxr-x 3 pedro pedro 4096 Mar 25 17:59 ..
drwxrwxr-x 9 pedro pedro 4096 Mar 25 17:36 2.1.5
-rw-rw-r-- 1 pedro pedro    0 Mar 25 17:59 last.log

Solution

  • Ok, so it was one of those problems... On my .profile (I'm on Ubuntu), I was initializing the JAVA_HOME, after the PATH, so when the PATH was export the value "JAVA_HOME/bin" didn't existed. Although it's somewhat embarassing, I'm maintaning this post up, because I couldn't possibly figure this out from the output of the error, so maybe this can help someone out.