From abc641b55ecd73aa73f0ff2b5ebbab8e573c581d Mon Sep 17 00:00:00 2001 From: Lukasz Sojka Date: Mon, 29 Jul 2024 15:29:51 +0200 Subject: [PATCH] fix(jmx): fix wait for jmx up 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: https://github.com/scylladb/scylla-cluster-tests/issues/8183 --- sdcm/cluster.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sdcm/cluster.py b/sdcm/cluster.py index dfc42e5c1a..4eb7378434 100644 --- a/sdcm/cluster.py +++ b/sdcm/cluster.py @@ -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: