<p dir="auto">I have 3 nodes in my cluster and two are master cum data nodes and one node is client node. When I issues stats api(_cluster/stats), I still see the count of client as 0 even though its is up and working.</p>
<p dir="auto">Below is the response of stats API</p>
<p dir="auto">nodes: {<br>
count: {<br>
total: 3,<br>
master_only: 0,<br>
data_only: 0,<br>
master_data: 2,<br>
client: 0<br>
},<br>
versions: [<br>
"2.0.1"<br>
],</p>
<p dir="auto">jvm: {<br>
max_uptime_in_millis: 1181282,<br>
versions: [<br>
{<br>
version: "1.8.0_73",<br>
vm_name: "Java HotSpot(TM) 64-Bit Server VM",<br>
vm_version: "25.73-b02",<br>
vm_vendor: "Oracle Corporation",<br>
count: 3<br>
}<br>
],</p>
<p dir="auto">OS is<br>
name: "Linux",<br>
arch: "amd64",<br>
version: "2.6.18-308.4.1.0.1.el5",<br>
available_processors: 32<br>
:</p>
<p dir="auto">From a cluster running ES 2.1.1 (or ES 1.x) with 8 nodes, two of which were client nodes:</p>
<div class="highlight highlight-source-httpspec notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="GET _cluster/stats"><pre class="notranslate"><span class="pl-k">GET</span> <span class="pl-ii">_cluster/stats</span></pre></div>
<p dir="auto">produces:</p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&quot;nodes&quot;: {
  &quot;count&quot;: {
    &quot;total&quot;: 8,
    &quot;master_only&quot;: 2,
    &quot;data_only&quot;: 4,
    &quot;master_data&quot;: 0,
    &quot;client&quot;: 0
  }
  ...
}"><pre class="notranslate"><span class="pl-ent">"nodes"</span>: {
  <span class="pl-ent">"count"</span>: {
    <span class="pl-ent">"total"</span>: <span class="pl-c1">8</span>,
    <span class="pl-ent">"master_only"</span>: <span class="pl-c1">2</span>,
    <span class="pl-ent">"data_only"</span>: <span class="pl-c1">4</span>,
    <span class="pl-ent">"master_data"</span>: <span class="pl-c1">0</span>,
    <span class="pl-ent">"client"</span>: <span class="pl-c1">0</span>
  }
  <span class="pl-ii">...</span>
}</pre></div>
<p dir="auto">These nodes were set to being client nodes implicitly by using</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="node.master: false
node.data: false"><pre class="notranslate"><span class="pl-ent">node.master</span>: <span class="pl-c1">false</span>
<span class="pl-ent">node.data</span>: <span class="pl-c1">false</span></pre></div>
<p dir="auto">It appears that the node.client count is only tripped when using <code class="notranslate">node.client: true</code>, but it should be <code class="notranslate">node.client || (node.master || node.data || node.ingest) == false</code>. This should be done at the source where ever we do that check initially. The annoying thing is that it kind of prevents other types of nodes from being dynamically added without "lying" if we change that check.</p>