Commit 5a9c5d9d authored by Stefano Alberto Russo's avatar Stefano Alberto Russo
Browse files

Fixed bug in detecting the host IP address in the agent which returned 127.0.1.1.

parent a2ff53d8
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -268,6 +268,8 @@ logger.info('Reporting for task uuid: "{}"'.format(task_uuid))


# Get IP
# Get IP
ip = socket.gethostbyname(hostname)
ip = socket.gethostbyname(hostname)
if ip == '127.0.1.1':
    ip = socket.gethostbyname(hostname+'.local')
logger.info(' - ip: "{}"'.format(ip))
logger.info(' - ip: "{}"'.format(ip))


# Get port
# Get port