<?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: Communication between Ambari Server and Ambari Agent seems to be blocked in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Communication-between-Ambari-Server-and-Ambari-Agent-seems/m-p/162925#M53524</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/15775/kargolmeister.html" nodeid="15775"&gt;@Kargol Meister&lt;/A&gt;&lt;/P&gt;&lt;P&gt;in Ambari listens on 2 different ports,&lt;/P&gt;&lt;P&gt;one port is to server REST calls - example Ambari UI makes REST call to server &lt;/P&gt;&lt;P&gt;second port is to server Agent request - all the agents communicates with server on this port.&lt;/P&gt;&lt;P&gt;client.threadpool.size.max - this property is being used by port listening for REST calls&lt;/P&gt;&lt;P&gt;agent.threadpool.size.max- this propetry is being used by port listening for Agents&lt;/P&gt;</description>
    <pubDate>Tue, 07 Feb 2017 23:26:04 GMT</pubDate>
    <dc:creator>apappu</dc:creator>
    <dc:date>2017-02-07T23:26:04Z</dc:date>
    <item>
      <title>Communication between Ambari Server and Ambari Agent seems to be blocked</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Communication-between-Ambari-Server-and-Ambari-Agent-seems/m-p/162919#M53518</link>
      <description>&lt;P&gt;Problem:
Runtime issue of a "fresh" Ambari server for SLES 11.4 installation (see &lt;A href="http://docs.hortonworks.com/HDPDocuments/Ambari-2.4.2.0/bk_ambari-installation/content/ch_Installing_Ambari.html)" target="_blank"&gt;http://docs.hortonworks.com/HDPDocuments/Ambari-2.4.2.0/bk_ambari-installation/content/ch_Installing_Ambari.html)&lt;/A&gt;. There is no communication between Ambari Server and Ambari Agent via handshake or registration/heartbeat ports. A connection to the port can be established on client-side but there is no server-side response from the application listening on the port.

curl shows "TLSv1.0, TLS handshake, Client hello (1)" only (answer "TLSv1.0, TLS handshake, Server hello (1)" is missing):
ls5567:~ # curl -v &lt;A href="https://localhost:8440" target="_blank"&gt;https://localhost:8440&lt;/A&gt;;
* About to connect() to localhost port 8440 (#0)
*  Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 8440 (#0)
* successfully set certificate verify locations:
*  CAfile: none
  CApath: /etc/ssl/certs/
* TLSv1.0, TLS handshake, Client hello (1):
* SSL connection timeout
* Closing connection #0
curl: (28) SSL connection timeout

openssl hangs forever:
ls5567:~ # openssl s_client -connect localhost:8440
CONNECTED(00000003)
^C

netstat reports this:
ls5567:~ # netstat -nopa|grep :844
tcp  0  0 127.0.0.1:49634  127.0.0.1:8440  ESTABLISHED 62178/openssl  off (0.00/0/0)
tcp  0  0 127.0.0.1:44860  127.0.0.1:8440  ESTABLISHED 36869/python  off (0.00/0/0)
tcp  0  0 :::8440  :::*  LISTEN  61747/java  off (0.00/0/0)
tcp  0  0 :::8441  :::*  LISTEN  61747/java  off (0.00/0/0)
tcp  0  0 :::8443  :::*  LISTEN  61747/java  off (0.00/0/0)
tcp  137  0 127.0.0.1:8440  127.0.0.1:48270  CLOSE_WAIT  61747/java  off (0.00/0/0)
tcp  137  0 127.0.0.1:8440  127.0.0.1:55292  CLOSE_WAIT  61747/java  off (0.00/0/0)
tcp  128  0 127.0.0.1:8440  127.0.0.1:49634  ESTABLISHED 61747/java  off (0.00/0/0)
tcp  128  0 127.0.0.1:8440  127.0.0.1:44860  ESTABLISHED 61747/java  off (0.00/0/0)

Please share ideas to find the root cause of this issue.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2017 02:33:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Communication-between-Ambari-Server-and-Ambari-Agent-seems/m-p/162919#M53518</guid>
      <dc:creator>kargol_meister</dc:creator>
      <dc:date>2017-02-07T02:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: Communication between Ambari Server and Ambari Agent seems to be blocked</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Communication-between-Ambari-Server-and-Ambari-Agent-seems/m-p/162920#M53519</link>
      <description>&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/15775/kargolmeister.html"&gt;Kargol Meister&lt;/A&gt;&lt;/P&gt;&lt;P&gt;what is the ambari-server system configuration?&lt;/P&gt;&lt;P&gt;
can you increase the "agent.threadpool.size.max" to say 120  ( by default it will have 25)  and restart the ambari-server?&lt;/P&gt;&lt;P&gt;we do see some issues in the higher end machines where there are more number of CPUs. &lt;/P&gt;&lt;P&gt;let us know the result.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2017 03:42:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Communication-between-Ambari-Server-and-Ambari-Agent-seems/m-p/162920#M53519</guid>
      <dc:creator>apappu</dc:creator>
      <dc:date>2017-02-07T03:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: Communication between Ambari Server and Ambari Agent seems to be blocked</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Communication-between-Ambari-Server-and-Ambari-Agent-seems/m-p/162921#M53520</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/15775/kargolmeister.html" nodeid="15775"&gt;@Kargol Meister&lt;/A&gt;&lt;P&gt;Is it single node cluster? I see localhost so wondering if you registered ambari agent correctly.&lt;/P&gt;&lt;P&gt;You can try below command and see if it helps.&lt;/P&gt;&lt;PRE&gt;ambari-agent stop
ambari-agent reset &amp;lt;ambari-server-hostname&amp;gt;
ambari-agent start&lt;/PRE&gt;&lt;P&gt;If it's a production cluster. Please be careful. This command will reset ambari agent configuration including SSL certs(mostly self signed unless you have configured non default options) used for communication between ambari agent and server.&lt;/P&gt;&lt;P&gt;No HDP services will be affected by running this command.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2017 14:33:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Communication-between-Ambari-Server-and-Ambari-Agent-seems/m-p/162921#M53520</guid>
      <dc:creator>KuldeepK</dc:creator>
      <dc:date>2017-02-07T14:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: Communication between Ambari Server and Ambari Agent seems to be blocked</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Communication-between-Ambari-Server-and-Ambari-Agent-seems/m-p/162922#M53521</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/11311/apappu.html" nodeid="11311"&gt;@apappu&lt;/A&gt;&lt;P&gt;many thanks: increasing the value of parameter agent.threadpool.size.max did it.
do you have any "rule-of-thumb" or "best-practice" formula at hand to what minimum size this value should be set ?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2017 15:20:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Communication-between-Ambari-Server-and-Ambari-Agent-seems/m-p/162922#M53521</guid>
      <dc:creator>kargol_meister</dc:creator>
      <dc:date>2017-02-07T15:20:27Z</dc:date>
    </item>
    <item>
      <title>Re: Communication between Ambari Server and Ambari Agent seems to be blocked</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Communication-between-Ambari-Server-and-Ambari-Agent-seems/m-p/162923#M53522</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/11311/apappu.html" nodeid="11311"&gt;@apappu&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Additional question (because of these findings in the ambari-server.log file):&lt;/P&gt;&lt;P&gt;ls5567:~ # grep ambari-client-thread /var/log/ambari-server/ambari-server.log&lt;/P&gt;&lt;P&gt;07 Feb 2017 12:10:47,371  WARN [main] AmbariServer:693 - The configured Jetty ambari-client-thread thread pool value of 25 is not sufficient on a host with 80 processors. Increasing the value to 60.&lt;/P&gt;&lt;P&gt;07 Feb 2017 12:10:47,372  INFO [main] AmbariServer:701 - Jetty is configuring ambari-client-thread with 40 reserved acceptors/selectors and a total pool size of 60 for 80 processors.&lt;/P&gt;&lt;P&gt;What is the relationship between client.threadpool.size.max and agent.threadpool.size.max values ?&lt;/P&gt;&lt;P&gt;- client.threadpool.size.max &amp;lt;= or &amp;lt; agent.threadpool.size.max ?&lt;/P&gt;&lt;P&gt;- client.threadpool.size.max &amp;gt;= or &amp;gt; agent.threadpool.size.max ?&lt;/P&gt;&lt;P&gt;- client.threadpool.size.max = agent.threadpool.size.max ?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2017 21:10:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Communication-between-Ambari-Server-and-Ambari-Agent-seems/m-p/162923#M53522</guid>
      <dc:creator>kargol_meister</dc:creator>
      <dc:date>2017-02-07T21:10:14Z</dc:date>
    </item>
    <item>
      <title>Re: Communication between Ambari Server and Ambari Agent seems to be blocked</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Communication-between-Ambari-Server-and-Ambari-Agent-seems/m-p/162924#M53523</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/15775/kargolmeister.html" nodeid="15775"&gt;@Kargol Meister&lt;/A&gt; &lt;/P&gt;&lt;P&gt;There is no rule of thumb/formula here but jetty seems to have some problem with high CPU machines. ideally 32 should be good enough for 5 to 6 nodes of cluster, but if you have more nodes then you may have to increase this number.&lt;/P&gt;&lt;P&gt;Please select the correct answer.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2017 23:22:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Communication-between-Ambari-Server-and-Ambari-Agent-seems/m-p/162924#M53523</guid>
      <dc:creator>apappu</dc:creator>
      <dc:date>2017-02-07T23:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: Communication between Ambari Server and Ambari Agent seems to be blocked</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Communication-between-Ambari-Server-and-Ambari-Agent-seems/m-p/162925#M53524</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/15775/kargolmeister.html" nodeid="15775"&gt;@Kargol Meister&lt;/A&gt;&lt;/P&gt;&lt;P&gt;in Ambari listens on 2 different ports,&lt;/P&gt;&lt;P&gt;one port is to server REST calls - example Ambari UI makes REST call to server &lt;/P&gt;&lt;P&gt;second port is to server Agent request - all the agents communicates with server on this port.&lt;/P&gt;&lt;P&gt;client.threadpool.size.max - this property is being used by port listening for REST calls&lt;/P&gt;&lt;P&gt;agent.threadpool.size.max- this propetry is being used by port listening for Agents&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2017 23:26:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Communication-between-Ambari-Server-and-Ambari-Agent-seems/m-p/162925#M53524</guid>
      <dc:creator>apappu</dc:creator>
      <dc:date>2017-02-07T23:26:04Z</dc:date>
    </item>
    <item>
      <title>Re: Communication between Ambari Server and Ambari Agent seems to be blocked</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Communication-between-Ambari-Server-and-Ambari-Agent-seems/m-p/162926#M53525</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/15775/kargolmeister.html" nodeid="15775"&gt;@Kargol Meister&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ambari internally uses "Jetty" server where we have "acceptors" and "selector" threads just like any other servers.
From Jetty9 the formula for calculating the "acceptors" and "selector" threads are much more enhanced and changed.&lt;/P&gt;&lt;P&gt;Some informations regarding "acceptors" and "selector": &lt;/P&gt;&lt;P&gt;Acceptor threads accepts new connections from client. They run a loop on a blocking accept() call to accept connections. With a box with 80 cores, which is not typical, you are recommended to manually configure the number of acceptors and selectors, since the guesses we make are probably off. The right number of acceptor threads is determined by the server load and the traffic shape, in particular by connection open/close rate. We can higher this rate, the more acceptors you want.&lt;/P&gt;&lt;P&gt;Selector threads manage events on connected sockets. Every time a socket connects, the acceptor threads accepts the connection and assign the socket to a selector, chosen in a round robin fashion. The selector is responsible to detect activity on that socket (I/O events such as read availability and write availability) and signal that event to other code in Jetty that will handle the event. One thread runs one selector. This is basic async I/O using selectors. If you have a very busy server (say 100k connected clients at any time  or more), If you want to "spread" those clients among many selectors, so that each selector will handle a portion of the connected clients and be faster in responding to client activity.&lt;/P&gt;&lt;P&gt;
From Ambari 2.5.0 onwards the logic is much enhanced as part of : &lt;STRONG&gt;&lt;A href="https://issues.apache.org/jira/browse/AMBARI-18827" target="_blank"&gt;https://issues.apache.org/jira/browse/AMBARI-18827&lt;/A&gt;  &lt;/STRONG&gt;to avoid blocking of ambari agent restart for hosts where we have higher number of cores.&lt;/P&gt;&lt;P&gt;Now from ambari 2.5 the formula will be following for configuring the threadpool:&lt;/P&gt;&lt;PRE&gt;configureJettyThreadPool(serverForAgent, acceptors * 2, AGENT_THREAD_POOL_NAME, configs.getAgentThreadPoolSize());&lt;/PRE&gt;&lt;P&gt;
The AGENT_THREADPOOL_SIZE is controlled by the "agent.threadpool.size.max" (default value is 25) property [1]
"agent.threadpool.size.max" sets max number of threads used to process heartbeats from ambari agents and view.extraction.threadpool.size.max - for Views UI.&lt;/P&gt;&lt;P&gt;The CLIENT_THREADPOOL_SIZE is controlled by the "client.threadpool.size.max" property [2] used for REST API calls:&lt;/P&gt;&lt;P&gt;We might use:&lt;/P&gt;&lt;PRE&gt;totalCPUs=Number of CPU cores on host machine
client.threadpool.size.max=totalCPUs+1
agent.threadpool.size.max=totalCPUs+1 &lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;
[1] &lt;A href="https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java#L2035-L2036" target="_blank"&gt;https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java#L2035-L2036&lt;/A&gt;&lt;/P&gt;&lt;P&gt;[2] &lt;A href="https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java#L2020" target="_blank"&gt;https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java#L2020&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2017 23:28:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Communication-between-Ambari-Server-and-Ambari-Agent-seems/m-p/162926#M53525</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2017-02-07T23:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: Communication between Ambari Server and Ambari Agent seems to be blocked</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Communication-between-Ambari-Server-and-Ambari-Agent-seems/m-p/162927#M53526</link>
      <description>&lt;P&gt;@apappu&lt;/P&gt;&lt;P&gt;many, many thanks again for your effort (your first answer helped me a lot to solve the issue on my side).&lt;/P&gt;&lt;P&gt;@Jay SenSharma&lt;/P&gt;&lt;P&gt;also many thanks for your detailed explanation and providing URLs to the latest Java sources.&lt;/P&gt;&lt;P&gt;PS (to Jay SenSharma): I saw that the number of your "Reputation" credits are higher than those of apappu. Therefore I marked his first answer with "Accept". I hope you can live with it.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2017 02:48:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Communication-between-Ambari-Server-and-Ambari-Agent-seems/m-p/162927#M53526</guid>
      <dc:creator>kargol_meister</dc:creator>
      <dc:date>2017-02-08T02:48:44Z</dc:date>
    </item>
  </channel>
</rss>

