X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_mon%2Fcmd%2Fcommon_functions.py;h=78f924221c6fa4581f67a8074e40ae78d2603fe3;hb=refs%2Fchanges%2F03%2F10503%2F1;hp=b85a90e5123578185adf4df5ca97d3de621c1cfa;hpb=806fe459500347c2ed0b8c787aae2d94b709d836;p=osm%2FMON.git diff --git a/osm_mon/cmd/common_functions.py b/osm_mon/cmd/common_functions.py index b85a90e..78f9242 100644 --- a/osm_mon/cmd/common_functions.py +++ b/osm_mon/cmd/common_functions.py @@ -44,7 +44,15 @@ def wait_till_core_services_are_ready(config, process_name="osm-mon", commondb_w port_in_use = False try: with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: - if s.connect_ex(("kafka", int(config.conf["message"].get("port")))) == 0: + if ( + s.connect_ex( + ( + config.conf.get("message", {}).get("host", "kafka"), + int(config.conf["message"].get("port")), + ) + ) + == 0 + ): port_in_use = True except Exception as e: logging.info("Error when trying to get kafka status.")