extracted the get_server_ipaddress method