# Elasticsearch node client

**URL:** <https://discuss.elastic.co/t/elasticsearch-node-client/9965>\
**Category:** Elasticsearch\
**Created:** [December 6, 2012, 6:39am UTC](https://discuss.elastic.co/t/elasticsearch-node-client/9965 "2012-12-06T06:39:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deepak](https://avatars.discourse-cdn.com/v4/letter/d/7bcc69/32.png) [@Deepak](https://discuss.elastic.co/u/Deepak)\
**Post date:** [December 6, 2012, 6:39am UTC](https://discuss.elastic.co/t/elasticsearch-node-client/9965/1 "2012-12-06T06:39:11Z")

</div>

Hi,

I am trying to use BulkInsert API and building a node client. So far I have  
ES running and I can telnet to port 9300 and 9200, so there is no firewall  
issue, I have Transport client working, but isnt that true that each  
request using Transport client is two hop process. I havent compared both  
of them, but does anyone has any comparison in performance? I am trying to  
avoid using Transport client and want to run this client node right on the  
local machine for index. I tried everything in my power to make it work but  
every effort resulted in masternot found exception.

Node node = nodeBuilder().local(true  
).settings(ImmutableSettings.settingsBuilder()

```
                            .put("node.data",false)

                            .put("node.client",true)

                            .put("cluster.name", "elasticsearch")

                            .put("discovery.zen.ping.multicast.ttl", 4)

                            .put("discovery.zen.ping.multicast.enabled",

```

true)

```
                            .put(

```

"discovery.zen.ping.multicast.ping.enabled",false)

```
                            .put("discovery.zen.ping.unicast.hosts", "

```

192.168.1.68:9200")

```
                            .put("client.transport.sniff", true))

                            .build().start();

```

Client client = node.client();

Thanks very much...

Deepak

--

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 6, 2012, 11:28pm UTC](https://discuss.elastic.co/t/elasticsearch-node-client/9965/2 "2012-12-06T23:28:50Z")

</div>

Use the 9300 port instead 9200.  
IT should work.  
.put("discovery.zen.ping.unicast.hosts", "192.168.1.68:9300")

HTH

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 6 déc. 2012 à 07:39, Deepak Tiwari [dtiwari356@gmail.com](mailto:dtiwari356@gmail.com) a écrit :

Hi,

I am trying to use BulkInsert API and building a node client. So far I have ES running and I can telnet to port 9300 and 9200, so there is no firewall issue, I have Transport client working, but isnt that true that each request using Transport client is two hop process. I havent compared both of them, but does anyone has any comparison in performance? I am trying to avoid using Transport client and want to run this client node right on the local machine for index. I tried everything in my power to make it work but every effort resulted in masternot found exception.

Node node = nodeBuilder().local(true).settings(ImmutableSettings.settingsBuilder()  
.put("node.data",false)  
.put("node.client",true)  
.put("cluster.name", "elasticsearch")  
.put("discovery.zen.ping.multicast.ttl", 4)  
.put("discovery.zen.ping.multicast.enabled",true)  
.put("discovery.zen.ping.multicast.ping.enabled",false)  
.put("discovery.zen.ping.unicast.hosts", "192.168.1.68:9200")  
.put("client.transport.sniff", true))  
.build().start();

Client client = node.client();

Thanks very much...

Deepak

--

--

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 3:00am UTC](https://discuss.elastic.co/t/elasticsearch-node-client/9965/3 "2017-07-06T03:00:59Z")

</div>


