From 5a9c5d9d2103bc93f643ecd17413b56dc16d9d24 Mon Sep 17 00:00:00 2001 From: Stefano Alberto Russo <stefano.russo@gmail.com> Date: Fri, 8 Apr 2022 11:47:35 +0200 Subject: [PATCH] Fixed bug in detecting the host IP address in the agent which returned 127.0.1.1. --- services/webapp/code/rosetta/core_app/api.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/webapp/code/rosetta/core_app/api.py b/services/webapp/code/rosetta/core_app/api.py index c0373cc..af006ff 100644 --- a/services/webapp/code/rosetta/core_app/api.py +++ b/services/webapp/code/rosetta/core_app/api.py @@ -268,6 +268,8 @@ logger.info('Reporting for task uuid: "{}"'.format(task_uuid)) # Get IP ip = socket.gethostbyname(hostname) +if ip == '127.0.1.1': + ip = socket.gethostbyname(hostname+'.local') logger.info(' - ip: "{}"'.format(ip)) # Get port -- GitLab