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
(cherry picked from commit abc641b)
  • Loading branch information
soyacz committed Jul 31, 2024
1 parent a476399 commit ce356ab
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 @@ -1222,7 +1222,9 @@ def db_up(self):
return self.is_port_used(port=self.CQL_PORT, service_name="scylla-server")

def jmx_up(self):
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 ce356ab

Please sign in to comment.