diff --git a/ccmlib/node.py b/ccmlib/node.py index cc8f565a..68fa722c 100644 --- a/ccmlib/node.py +++ b/ccmlib/node.py @@ -704,8 +704,9 @@ def nodetool(self, cmd, capture_output=True, wait=True): if capture_output and not wait: raise common.ArgumentError("Cannot set capture_output while wait is False.") env = self.get_env() + host = self.address() nodetool = self.get_tool('nodetool') - args = [nodetool, '-h', 'localhost', '-p', str(self.jmx_port)] + args = [nodetool, '-h', host, '-p', str(self.jmx_port)] args += cmd.split() if capture_output: p = subprocess.Popen(args, env=env, stdout=subprocess.PIPE, stderr=subprocess.PIPE)