Skip to content

Commit

Permalink
fix(jmx): fix wait for jmx up
Browse files Browse the repository at this point in the history
As we now verify ports being open from sct runner, we cannot use it for
jmx as it listens on localhost.

Fix by verifying JMX being up by verification of log message in
scylla-jmx service status.

fixes: scylladb#8183
  • Loading branch information
soyacz committed Jul 29, 2024
1 parent 030ad47 commit 8cdb9da
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sdcm/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -1231,7 +1231,9 @@ def db_up(self):
def jmx_up(self):
if not self.is_service_exists(service_name='scylla-jmx'):
return True
return self.is_port_used(port=7199, service_name="scylla-jmx")
return self.remoter.run(f"{self.systemctl} is-active scylla-jmx.service && "
f"{self.systemctl} status scylla-jmx.service | grep 'JMX is enabled to receive remote connections on port'",
timeout=10, ignore_status=True).return_code == 0

def cs_installed(self, cassandra_stress_bin=None):
if cassandra_stress_bin is None:
Expand Down

0 comments on commit 8cdb9da

Please sign in to comment.