riptano / ccm

A script to easily create and destroy an Apache Cassandra cluster on localhost
Apache License 2.0
1.22k stars 303 forks source link

Creating cluster with debug `-d` fails against C* 4.0 #699

Open michaelsembwever opened 5 years ago

michaelsembwever commented 5 years ago

Can't find jvm.options to edit for debugging…

For example, where --install-dir is pointing to a cassandra trunk checkout

ccm create c_14952 --install-dir=/Users/mick/src/apache/cassandra  -n 6 --vnodes -d

gives

Current cluster is now: c_14952
Traceback (most recent call last):
  File "/Users/mick/.pyenv/versions/2.7.14/bin/ccm", line 105, in <module>
    cmd.run()
  File "/Users/mick/.pyenv/versions/2.7.14/lib/python2.7/site-packages/ccmlib/cmds/cluster_cmds.py", line 174, in run
    cluster.populate(self.nodes, self.options.debug, use_vnodes=self.options.vnodes, ipprefix=self.options.ipprefix, ipformat=self.options.ipformat, install_byteman=self.options.install_byteman)
  File "/Users/mick/.pyenv/versions/2.7.14/lib/python2.7/site-packages/ccmlib/cluster.py", line 287, in populate
    environment_variables=self._environment_variables)
  File "/Users/mick/.pyenv/versions/2.7.14/lib/python2.7/site-packages/ccmlib/cluster.py", line 293, in create_node
    return Node(name, self, auto_bootstrap, thrift_interface, storage_interface, jmx_port, remote_debug_port, initial_token, save, binary_interface, byteman_port, environment_variables, derived_cassandra_version=derived_cassandra_version)
  File "/Users/mick/.pyenv/versions/2.7.14/lib/python2.7/site-packages/ccmlib/node.py", line 129, in __init__
    self.import_config_files()
  File "/Users/mick/.pyenv/versions/2.7.14/lib/python2.7/site-packages/ccmlib/node.py", line 1385, in import_config_files
    self.__update_envfile()
  File "/Users/mick/.pyenv/versions/2.7.14/lib/python2.7/site-packages/ccmlib/node.py", line 1647, in __update_envfile
    common.replace_in_file(jvm_file, remote_debug_port_pattern, remote_debug_options)
  File "/Users/mick/.pyenv/versions/2.7.14/lib/python2.7/site-packages/ccmlib/common.py", line 205, in replace_in_file
    replaces_in_file(file, [(regexp, replace)])
  File "/Users/mick/.pyenv/versions/2.7.14/lib/python2.7/site-packages/ccmlib/common.py", line 211, in replaces_in_file
    with open(file, 'r') as f:
IOError: [Errno 2] No such file or directory: '/Users/mick/.ccm/c_14952/node1/conf/jvm.options'