Repository: ambari Updated Branches: refs/heads/trunk 2ef600f4d -> 791b64c98
AMBARI-18263. Agent connection retry fails after one try (magyari_sandor) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/791b64c9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/791b64c9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/791b64c9 Branch: refs/heads/trunk Commit: 791b64c980fb2ccbd538110cc10fde18c7bcd6e0 Parents: 2ef600f Author: Sandor Magyari <[email protected]> Authored: Mon Aug 29 17:35:06 2016 +0200 Committer: Sandor Magyari <[email protected]> Committed: Mon Aug 29 17:35:06 2016 +0200 ---------------------------------------------------------------------- ambari-agent/src/main/python/ambari_agent/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/791b64c9/ambari-agent/src/main/python/ambari_agent/main.py ---------------------------------------------------------------------- diff --git a/ambari-agent/src/main/python/ambari_agent/main.py b/ambari-agent/src/main/python/ambari_agent/main.py index 8e04564..d7864b3 100644 --- a/ambari-agent/src/main/python/ambari_agent/main.py +++ b/ambari-agent/src/main/python/ambari_agent/main.py @@ -345,9 +345,9 @@ def main(heartbeat_stop_callback=None): # Keep trying to connect to a server or bail out if ambari-agent was stopped while not connected and not stopped: for server_hostname in server_hostnames: + server_url = config.get_api_url(server_hostname) try: server_ip = socket.gethostbyname(server_hostname) - server_url = config.get_api_url(server_hostname) logger.info('Connecting to Ambari server at %s (%s)', server_url, server_ip) except socket.error: logger.warn("Unable to determine the IP address of the Ambari server '%s'", server_hostname)
