elasticsearch nest SniffingConnectionPool not working
<p>I'm using Nest.ElasticClient to connect to Elasticsearch cluster. The cluster is located in Azure VM with just one node. </p>

<p>the cluster is accessible outside the vm by url : <a href="http://xxxx.cloudapp.net:9200" rel="nofollow">http://xxxx.cloudapp.net:9200</a> and also accessible by ElasticClient if not using SniffingConnectionPool. But not accessible by ElasticClient if using SniffingConnectionPool. </p>

<p>Here is the network config</p>

<pre><code>network.host: [_local_, _site_]
</code></pre>

<p>Below is the source code I'm using to get client and check index exists. </p>

<pre><code>var pool = new SniffingConnectionPool(urls.Select(url =&gt; new Uri(url)));
ConnectionSettings config = new ConnectionSettings(pool) ;
client = new Nest.ElasticClient(config);
IExistsResponse indexExistsResponse = client.IndexExists(indexName);  
</code></pre>

<p>The debug info message when I try to use the client to check whether a Index exists, the hostnanme and ip address is modified:</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>Invalid NEST response built from a unsuccessful low level call on HEAD: /globalleads
# Audit trail of this API call:
 - SniffOnStartup: Took: 00:00:00.9846171
 - SniffSuccess: Node: http://xxxx.cloudapp.net:9200/ Took: 00:00:00.9595496
 - PingFailure: Node: http://10.85.xxx.xx:9200/ Exception: PipelineException Took: 00:00:21.4154660
 - SniffOnFail: Took: 00:00:21.1967809
 - SniffFailure: Node: http://10.85.xxx.xx:9200/ Exception: PipelineException Took: 00:00:21.1787333
# OriginalException: Elasticsearch.Net.ElasticsearchClientException: One or more errors occurred. ---&gt; System.AggregateException: One or more errors occurred. ---&gt; Elasticsearch.Net.PipelineException: Failed sniffing cluster state. ---&gt; System.AggregateException: One or more errors occurred. ---&gt; Elasticsearch.Net.PipelineException: An error occurred trying to establish a connection with the specified node.
   at Elasticsearch.Net.RequestPipeline.Sniff() in D:\dev\git\elasticsearch-net-2.x\src\Elasticsearch.Net\Transport\Pipeline\RequestPipeline.cs:line 326
   --- End of inner exception stack trace ---
   --- End of inner exception stack trace ---
   at Elasticsearch.Net.RequestPipeline.Sniff() in D:\dev\git\elasticsearch-net-2.x\src\Elasticsearch.Net\Transport\Pipeline\RequestPipeline.cs:line 341
   at Elasticsearch.Net.RequestPipeline.SniffOnConnectionFailure() in D:\dev\git\elasticsearch-net-2.x\src\Elasticsearch.Net\Transport\Pipeline\RequestPipeline.cs:line 301
   at Elasticsearch.Net.Transport`1.Ping(IRequestPipeline pipeline, Node node) in D:\dev\git\elasticsearch-net-2.x\src\Elasticsearch.Net\Transport\Transport.cs:line 179
   at Elasticsearch.Net.Transport`1.Request[TReturn](HttpMethod method, String path, PostData`1 data, IRequestParameters requestParameters) in D:\dev\git\elasticsearch-net-2.x\src\Elasticsearch.Net\Transport\Transport.cs:line 68
   --- End of inner exception stack trace ---
   --- End of inner exception stack trace ---
# Audit exception in step 2 PingFailure:
Elasticsearch.Net.PipelineException: An error occurred trying to establish a connection with the specified node.
   at Elasticsearch.Net.RequestPipeline.Ping(Node node) in D:\dev\git\elasticsearch-net-2.x\src\Elasticsearch.Net\Transport\Pipeline\RequestPipeline.cs:line 248
# Audit exception in step 4 SniffFailure:
Elasticsearch.Net.PipelineException: An error occurred trying to establish a connection with the specified node.
   at Elasticsearch.Net.RequestPipeline.Sniff() in D:\dev\git\elasticsearch-net-2.x\src\Elasticsearch.Net\Transport\Pipeline\RequestPipeline.cs:line 326
# Request:
&lt;Request stream not captured or already read to completion by serializer. Set DisableDirectStreaming() on ConnectionSettings to force it to be set on the response.&gt;
# Response:
&lt;Response stream not captured or already read to completion by serializer. Set DisableDirectStreaming() on ConnectionSettings to force it to be set on the response.&gt;</code></pre>
</div>
</div>
</p>