<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: How to point an ambari-agent to 2 ambari-servers? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-point-an-ambari-agent-to-2-ambari-servers/m-p/224407#M69956</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/39293/kabadourawia.html" nodeid="39293"&gt;@raouia &lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ambari Agent can currently point to Only One Ambari Server at a time.   You can see the [server] section of agent file "/etc/ambari-agent/conf/ambari-agent.ini"&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;PRE&gt;[server]
hostname=ambari1.hortonworks.com&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Currently it is Manual:  &lt;/STRONG&gt;All the agents "/etc/ambari-agent/conf/ambari-agent.ini" file need to be manually updated to point to the Failover Ambari Server Hostname and then agents needs to be restarted so that based on the new entry for [server]  Ambari Server new Host,    the agents can communicate.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;Although there are some improvement JIRA opened for the same (for future releases):   &lt;A href="https://issues.apache.org/jira/browse/AMBARI-17126" target="_blank"&gt;https://issues.apache.org/jira/browse/AMBARI-17126&lt;/A&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;Regarding your queries:&lt;/P&gt;&lt;P&gt;1- How to point an ambari-agent to 2 ambari-servers?&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;   "/etc/ambari-agent/conf/ambari-agent.ini" file need to be manually 
updated to point to the Failover Ambari Server Hostname and then agents 
needs to be restarted.&lt;/P&gt;&lt;P&gt;2. Is it possible 
to mention multiple hostnames in 
/etc/ambari-agent/conf/ambari-agent.ini? &lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; No currently you can define only one ambari-server hostname in the ambari-agent.ini file. &lt;/P&gt;&lt;P&gt; 3. How can i use Zookeeper to 
negotiate this?&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Currently it is not designed.  Ambari Server does not use Zookeeper for communication with agents / other ambari servers.&lt;/P&gt;&lt;P&gt;4- What is the solution to use heartbeat between the 2 ambari-servers? Any suggestion?&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Ambari Agents sends heartbeat messages to Ambari Server.    But currently there is no feature available inside ambari server to send/advertise  heartbeat messages to other ambari servers.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;</description>
    <pubDate>Thu, 19 Oct 2017 18:30:11 GMT</pubDate>
    <dc:creator>jsensharma</dc:creator>
    <dc:date>2017-10-19T18:30:11Z</dc:date>
    <item>
      <title>How to point an ambari-agent to 2 ambari-servers?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-point-an-ambari-agent-to-2-ambari-servers/m-p/224406#M69955</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm trying to ensure ambari-server failover. After research on this topic, i found these steps which are implemented by some users to fix this issue as described here:&lt;BR /&gt;
1)	Deploy 2 ambari-server with it database in 2 machine, say primary and backup;&lt;BR /&gt;
2)	Sync data from primary database to backup database(using postgresql streaming sync) when have data updated.&lt;BR /&gt;
3)	Use heartbeat between the 2 ambari-server to discover server_lost 
event, and make backup server to be primary; and the new backup server 
stop communicate with ambari-agent&lt;BR /&gt;
4)	Each agent have 2 ambari-server’s address configurations(or negotiate
 from zookeeper?), once primary server changed, agent should register to
 new one.&lt;BR /&gt;
5)	Backup web UI can redirect page to primary one. GET method REST API can access both ambari-server.&lt;/P&gt;&lt;P&gt;My questions are:&lt;/P&gt;&lt;P&gt;1- How to point an ambari-agent to 2 ambari-servers? Is it possible to mention multiple hostnames in /etc/ambari-agent/conf/ambari-agent.ini? How can i use Zookeeper to negotiate this?&lt;/P&gt;&lt;P&gt;2- What is the solution to use heartbeat between the 2 ambari-servers? Any suggestion?&lt;/P&gt;&lt;P&gt;Finally, my purpose is to ensure ambari-server failover.So, i's open to any different method that can be useful to reach my goal.&lt;/P&gt;&lt;H1&gt;&lt;/H1&gt;</description>
      <pubDate>Thu, 19 Oct 2017 18:24:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-point-an-ambari-agent-to-2-ambari-servers/m-p/224406#M69955</guid>
      <dc:creator>kabadou_rawia</dc:creator>
      <dc:date>2017-10-19T18:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to point an ambari-agent to 2 ambari-servers?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-point-an-ambari-agent-to-2-ambari-servers/m-p/224407#M69956</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/39293/kabadourawia.html" nodeid="39293"&gt;@raouia &lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ambari Agent can currently point to Only One Ambari Server at a time.   You can see the [server] section of agent file "/etc/ambari-agent/conf/ambari-agent.ini"&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;PRE&gt;[server]
hostname=ambari1.hortonworks.com&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Currently it is Manual:  &lt;/STRONG&gt;All the agents "/etc/ambari-agent/conf/ambari-agent.ini" file need to be manually updated to point to the Failover Ambari Server Hostname and then agents needs to be restarted so that based on the new entry for [server]  Ambari Server new Host,    the agents can communicate.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;Although there are some improvement JIRA opened for the same (for future releases):   &lt;A href="https://issues.apache.org/jira/browse/AMBARI-17126" target="_blank"&gt;https://issues.apache.org/jira/browse/AMBARI-17126&lt;/A&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;Regarding your queries:&lt;/P&gt;&lt;P&gt;1- How to point an ambari-agent to 2 ambari-servers?&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;   "/etc/ambari-agent/conf/ambari-agent.ini" file need to be manually 
updated to point to the Failover Ambari Server Hostname and then agents 
needs to be restarted.&lt;/P&gt;&lt;P&gt;2. Is it possible 
to mention multiple hostnames in 
/etc/ambari-agent/conf/ambari-agent.ini? &lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; No currently you can define only one ambari-server hostname in the ambari-agent.ini file. &lt;/P&gt;&lt;P&gt; 3. How can i use Zookeeper to 
negotiate this?&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Currently it is not designed.  Ambari Server does not use Zookeeper for communication with agents / other ambari servers.&lt;/P&gt;&lt;P&gt;4- What is the solution to use heartbeat between the 2 ambari-servers? Any suggestion?&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Ambari Agents sends heartbeat messages to Ambari Server.    But currently there is no feature available inside ambari server to send/advertise  heartbeat messages to other ambari servers.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2017 18:30:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-point-an-ambari-agent-to-2-ambari-servers/m-p/224407#M69956</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2017-10-19T18:30:11Z</dc:date>
    </item>
  </channel>
</rss>

