# Issue with transport client and sniffing nodes

**URL:** <https://discuss.elastic.co/t/issue-with-transport-client-and-sniffing-nodes/140363>\
**Category:** Elasticsearch\
**Created:** [July 17, 2018, 3:53pm UTC](https://discuss.elastic.co/t/issue-with-transport-client-and-sniffing-nodes/140363 "2018-07-17T15:53:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vvelichkovich](https://avatars.discourse-cdn.com/v4/letter/v/edb3f5/32.png) [@vvelichkovich](https://discuss.elastic.co/u/vvelichkovich)\
**Post date:** [July 17, 2018, 3:53pm UTC](https://discuss.elastic.co/t/issue-with-transport-client-and-sniffing-nodes/140363/1 "2018-07-17T15:53:43Z")

</div>

Elasticsearch versio 6.2.4

I have few issues, most likely related.

1. If I enable sniffing Transport client, it doesn't see any nodes and trying to use it, in specific example, getting all indices from cluster, results in error:  
`NoNodeAvailableException[None of the configured nodes are available: [{#transport#-1}{IK6R6eFjTk-wLEbJXIBE4A}{localhost}{127.0.0.1:9300}] ] at org.elasticsearch.client.transport.TransportClientNodesService.ensureNodesAreAvailable(TransportClientNodesService.java:347)`

But, when I remove sniffing from settings, then I can see my client nodeServices.nodes list has my node.  
When analyzing client in debugger, I can see that there is an issue in client.injector "Method threw 'java.lang.StackOverflowError' exception. Cannot evaluate org.elasticsearch.common.inject.InjectorImpl.toString()", but that doesn't stop client of creating new index when I tried that.  
Not sure if this error is what causes issue number 2.

1. Because if above, I commented out sniffing settings, just to see how far I will get, and trying to get all indices from cluster:

client.admin().  
cluster().  
prepareState().  
execute().  
actionGet().  
getState().  
getMetaData().  
getIndices();

Well, that fails:

client: org.elasticsearch.transport.client.PreBuiltTransportClient@7cfb4736  
Exception in thread "main" TransportSerializationException[Failed to deserialize response from handler [org.elasticsearch.transport.TransportService$ContextRestoreResponseHandler]]; nested: IllegalArgumentException[Unknown NamedWriteable [org.elasticsearch.cluster.metadata.MetaData$Custom][ml]];  
at org.elasticsearch.transport.TcpTransport.handleResponse(TcpTransport.java:1441)  
at org.elasticsearch.transport.TcpTransport.messageReceived(TcpTransport.java:1400)  
at org.elasticsearch.transport.netty4.Netty4MessageChannelHandler.channelRead(Netty4MessageChannelHandler.java:64)  
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)  
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)  
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)  
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)  
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:297)  
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:413)  
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)  
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)  
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)  
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)  
at io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:241)  
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)  
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)  
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)  
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1359)  
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)  
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)  
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:935)  
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:134)  
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645)  
at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:545)  
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:499)  
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459)  
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)  
at java.lang.Thread.run(Thread.java:745)  
Caused by: java.lang.IllegalArgumentException: Unknown NamedWriteable [org.elasticsearch.cluster.metadata.MetaData$Custom][ml]  
at org.elasticsearch.common.io.stream.NamedWriteableRegistry.getReader(NamedWriteableRegistry.java:112)  
at org.elasticsearch.common.io.stream.NamedWriteableAwareStreamInput.readNamedWriteable(NamedWriteableAwareStreamInput.java:45)  
at org.elasticsearch.common.io.stream.NamedWriteableAwareStreamInput.readNamedWriteable(NamedWriteableAwareStreamInput.java:39)  
at org.elasticsearch.cluster.metadata.MetaData.readFrom(MetaData.java:775)  
at org.elasticsearch.cluster.ClusterState.readFrom(ClusterState.java:668)  
at org.elasticsearch.action.admin.cluster.state.ClusterStateResponse.readFrom(ClusterStateResponse.java:81)  
at org.elasticsearch.transport.TransportResponseHandler.read(TransportResponseHandler.java:47)  
at org.elasticsearch.transport.TransportService$ContextRestoreResponseHandler.read(TransportService.java:1085)  
at org.elasticsearch.transport.TcpTransport.handleResponse(TcpTransport.java:1437)

---

<div class="post-metadata">

**Author:** ![vvelichkovich](https://avatars.discourse-cdn.com/v4/letter/v/edb3f5/32.png) [@vvelichkovich](https://discuss.elastic.co/u/vvelichkovich)\
**Post date:** [July 17, 2018, 5:36pm UTC](https://discuss.elastic.co/t/issue-with-transport-client-and-sniffing-nodes/140363/2 "2018-07-17T17:36:56Z")

</div>

Note: my transport client and nodes are same version (since I just read that can cause issues)

---

<div class="post-metadata">

**Author:** ![vvelichkovich](https://avatars.discourse-cdn.com/v4/letter/v/edb3f5/32.png) [@vvelichkovich](https://discuss.elastic.co/u/vvelichkovich)\
**Post date:** [July 17, 2018, 6:41pm UTC](https://discuss.elastic.co/t/issue-with-transport-client-and-sniffing-nodes/140363/3 "2018-07-17T18:41:35Z")

</div>

I have xpack on cluster. maybe something with machine learning node or some node settings?

---

<div class="post-metadata">

**Author:** ![vvelichkovich](https://avatars.discourse-cdn.com/v4/letter/v/edb3f5/32.png) [@vvelichkovich](https://discuss.elastic.co/u/vvelichkovich)\
**Post date:** [July 18, 2018, 3:11pm UTC](https://discuss.elastic.co/t/issue-with-transport-client-and-sniffing-nodes/140363/4 "2018-07-18T15:11:29Z")

</div>

Ok, when I use PreBuiltXPackTransportClient - then I resolved issue with response deserializing.

But I still have issue when I enable sniffing nodes (note: I have only one node on cluster, it was created for test) - I get NoNodeAvailableException. If I comment that setting out, all works.

---

<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:** [August 15, 2018, 3:11pm UTC](https://discuss.elastic.co/t/issue-with-transport-client-and-sniffing-nodes/140363/5 "2018-08-15T15:11:37Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
