Elasticsearch: exception caught on transport layer

13,432

Make sure to keep the elasticsearch client library jar in sync with the version of your cluster.

For example when using Maven:

 <dependency>
      <groupId>org.elasticsearch</groupId>
      <artifactId>elasticsearch</artifactId>
      <version>2.1.0</version>
 </dependency>
Share:
13,432
Peter G.
Author by

Peter G.

My profile is that of a software product owner with a strong engineering background. I like building end-to-end solutions that typically require a mix of technical skills, business skills, and mathematical knowledge. I understand how to optimize data algorithms, and how to explain my findings. My technical background allows me to deal with data at scale. I'm an active learner with a strong aptitude towards technology and discovering the new. My areas of expertise are Mobile and Data Analytics. I have a niche for data-driven apps. That area poses a set of new challenges and opportunities and also it is one of the most rapidly growing fields.

Updated on June 07, 2022

Comments

  • Peter G.
    Peter G. almost 2 years

    After upgrading Elasticsearch from version 1.6 to 2.1 I see an error in my Java application.

    The application used to work with Java before, but now the connection gets terminated immediately and a similar error (org.elasticsearch.client.transport.NoNodeAvailableException) is thrown in the application as result.

    It all happens during first connection attempt, which points to a clash between the versions, but may as well be something else.

    What can it be specifically, is there any way to fix it other than changing the versions?

    elasticsearch.log:

    [2015-12-08 17:42:54,035][WARN ][transport.netty          ] [Lorna Dane] exception caught on transport layer [[id: 0x9f75ad33, /192.168.0.208:21248 => /192.168.0.140:9300]], closing connection
    java.lang.IllegalStateException: Message not fully read (request) for requestId [0], action [cluster/nodes/info], readerIndex [39] vs expected [57]; resetting
            at org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:120)
            at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
            at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
            at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
            at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
            at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462)
            at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443)
            at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)
            at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
            at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
            at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
            at org.elasticsearch.common.netty.OpenChannelsHandler.handleUpstream(OpenChannelsHandler.java:75)
            at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
            at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)
            at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
            at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
            at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
            at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)
            at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)
            at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)
            at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
            at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
            at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
            at java.lang.Thread.run(Thread.java:745)
    

    Java console:

    Exception in thread "main" org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: []
        at org.elasticsearch.client.transport.TransportClientNodesService.ensureNodesAreAvailable(TransportClientNodesService.java:298)
        at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:214)
        at org.elasticsearch.client.transport.support.InternalTransportClusterAdminClient.execute(InternalTransportClusterAdminClient.java:85)
        at org.elasticsearch.client.support.AbstractClusterAdminClient.state(AbstractClusterAdminClient.java:138)
        at org.elasticsearch.action.admin.cluster.state.ClusterStateRequestBuilder.doExecute(ClusterStateRequestBuilder.java:94)
        at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:91)
        at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:65)