From d0efc0cf9559c48d3f552c0eafc0a6cafeb67adc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Berland?= Date: Tue, 19 Sep 2023 13:59:47 +0200 Subject: [PATCH] Log no websocket connection as error, not debug In a scenario with misconfigured firewall, this debug log message was not taken seriously when it actually exposed a real error. Thus, elevate this to the ERROR log level. The only two usages of ClientConnectionError in client.py are situations which should yield an ERROR on the log --- src/_ert_job_runner/client.py | 1 + src/_ert_job_runner/reporting/event.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/_ert_job_runner/client.py b/src/_ert_job_runner/client.py index 5afac28381b..6f604577517 100644 --- a/src/_ert_job_runner/client.py +++ b/src/_ert_job_runner/client.py @@ -110,6 +110,7 @@ async def _send(self, msg: AnyStr) -> None: _error_msg = ( f"Not able to establish the " f"websocket connection {self.url}! Max retries reached!" + " Check for firewall issues." f" Exception from {type(exception)}: {str(exception)}" ) raise ClientConnectionError(_error_msg) from exception diff --git a/src/_ert_job_runner/reporting/event.py b/src/_ert_job_runner/reporting/event.py index 9ab5a03f832..053f0178973 100644 --- a/src/_ert_job_runner/reporting/event.py +++ b/src/_ert_job_runner/reporting/event.py @@ -106,7 +106,7 @@ def _event_publisher(self): event = None except ClientConnectionError as exception: # Possible intermittent failure, we retry sending the event - logger.debug(str(exception)) + logger.error(str(exception)) pass except ClientConnectionClosedOK as exception: # The receiving end has closed the connection, we stop