# TransportClient logs errors as if it was a node?

**URL:** <https://discuss.elastic.co/t/transportclient-logs-errors-as-if-it-was-a-node/6442>\
**Category:** Elasticsearch\
**Created:** [January 19, 2012, 5:42pm UTC](https://discuss.elastic.co/t/transportclient-logs-errors-as-if-it-was-a-node/6442 "2012-01-19T17:42:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark\_Waddle](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_waddle/32/2608_2.png) [@Mark\_Waddle](https://discuss.elastic.co/u/Mark_Waddle)\
**Post date:** [January 19, 2012, 5:42pm UTC](https://discuss.elastic.co/t/transportclient-logs-errors-as-if-it-was-a-node/6442/1 "2012-01-19T17:42:52Z")

</div>

My scenario: I am using the java TransportClient 18.7 in my Play!  
application to query elasticsearch 18.6.

My questions:

1. It is logging messages that look like it is acting like a node, based on  
the "[Nodename]" in the message. I thought TransportClient did not join as  
a node? What is happening here?  
04:50:18,581 WARN ~ [Piper] failed to get node info for  
[#transport#-1][inet[/127.0.0.1:9300]]  
org.elasticsearch.transport.NodeDisconnectedException:  
[][inet[/127.0.0.1:9300]][/cluster/nodes/info] disconnected

2. I have read posts about TransportClient being thread safe and not  
needing pooling so I created a singleton class that has a static Client  
field. It works on the first request, but it always fails on subsequent  
requests. This is regardless of whether or not I am in dev or prod mode.  
Any ideas?  
org.elasticsearch.client.transport.NoNodeAvailableException: No node  
available  
at  
org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:170)  
at  
org.elasticsearch.client.transport.support.InternalTransportClient.search(InternalTransportClient.java:254)  
at  
org.elasticsearch.client.transport.TransportClient.search(TransportClient.java:310)  
at  
org.elasticsearch.client.action.search.SearchRequestBuilder.doExecute(SearchRequestBuilder.java:697)  
at  
org.elasticsearch.client.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:56)  
at  
org.elasticsearch.client.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:51)  
at models.SearchResults.executeQuery(SearchResults.java:105)  
at controllers.Application$1.doJobWithResult(Application.java:86)  
at controllers.Application$1.doJobWithResult(Application.java:1)  
at play.jobs.Job.call(Job.java:146)  
at play.jobs.Job$1.call(Job.java:66)  
at  
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)  
at java.util.concurrent.FutureTask.run(FutureTask.java:166)  
at  
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)  
at  
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)  
at  
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)  
at  
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)  
at java.lang.Thread.run(Thread.java:722)

Thanks,  
Mark

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [January 19, 2012, 6:30pm UTC](https://discuss.elastic.co/t/transportclient-logs-errors-as-if-it-was-a-node/6442/2 "2012-01-19T18:30:22Z")

</div>

On Thu, Jan 19, 2012 at 7:42 PM, Mark Waddle [mark@markwaddle.com](mailto:mark@markwaddle.com) wrote:

> My scenario: I am using the java TransportClient 18.7 in my Play!  
> application to query elasticsearch 18.6.
> 
> My questions:
> 
> 1. It is logging messages that look like it is acting like a node, based  
> on the "[Nodename]" in the message. I thought TransportClient did not join  
> as a node? What is happening here?  
> 04:50:18,581 WARN ~ [Piper] failed to get node info for  
> [#transport#-1][inet[/127.0.0.1:9300]]  
> org.elasticsearch.transport.NodeDisconnectedException:  
> [inet[/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Its just the name associated with the client, it does not mean its a node  
in the cluster.

> 1. I have read posts about TransportClient being thread safe and not  
> needing pooling so I created a singleton class that has a static Client  
> field. It works on the first request, but it always fails on subsequent  
> requests. This is regardless of whether or not I am in dev or prod mode.  
> Any ideas?

Are you sure you are not closing the client? Try and  
set org.elasticsearch.client.transport to TRACE logging level and see what  
happens.

> org.elasticsearch.client.transport.NoNodeAvailableException: No node  
> available  
> at  
> org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:170)  
> at  
> org.elasticsearch.client.transport.support.InternalTransportClient.search(InternalTransportClient.java:254)  
> at  
> org.elasticsearch.client.transport.TransportClient.search(TransportClient.java:310)  
> at  
> org.elasticsearch.client.action.search.SearchRequestBuilder.doExecute(SearchRequestBuilder.java:697)  
> at  
> org.elasticsearch.client.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:56)  
> at  
> org.elasticsearch.client.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:51)  
> at models.SearchResults.executeQuery(SearchResults.java:105)  
> at controllers.Application$1.doJobWithResult(Application.java:86)  
> at controllers.Application$1.doJobWithResult(Application.java:1)  
> at play.jobs.Job.call(Job.java:146)  
> at play.jobs.Job$1.call(Job.java:66)  
> at  
> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)  
> at java.util.concurrent.FutureTask.run(FutureTask.java:166)  
> at  
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)  
> at  
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)  
> at  
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)  
> at  
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)  
> at java.lang.Thread.run(Thread.java:722)
> 
> Thanks,  
> Mark

---

<div class="post-metadata">

**Author:** ![Mark\_Waddle](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_waddle/32/2608_2.png) [@Mark\_Waddle](https://discuss.elastic.co/u/Mark_Waddle)\
**Post date:** [January 20, 2012, 2:52am UTC](https://discuss.elastic.co/t/transportclient-logs-errors-as-if-it-was-a-node/6442/3 "2012-01-20T02:52:13Z")

</div>

Oh ya, that's it. I'm closing the client. Guess I should have realized that  
one. Thanks!

---

<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:42am UTC](https://discuss.elastic.co/t/transportclient-logs-errors-as-if-it-was-a-node/6442/4 "2017-07-06T03:42:02Z")

</div>


