Elasticsearch 2.0 java client


I'm trying to use the elasticsearch 2.0 java client and to create a transport node which connects to an elasticsearch 1.6.0 cluster.
However, I'm getting this exception:
2015-11-23 13:32:02 WARN netty:723 - [Roma] exception caught on transport layer [[id: 0x26a9f009, / => example.com/]], closing connection
at org.elasticsearch.transport.netty.MessageChannelHandler.handleException(MessageChannelHandler.java:206)
at org.elasticsearch.transport.netty.MessageChannelHandler.handlerResponseError(MessageChannelHandler.java:201)
at org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:136)

The question is, can we connect with a 2.0 java client to a 1.6.0 es cluster?


No. You can't.

Ok thanks for the info. This does only apply for Transport nodes, right?
Because when I tried to connect with a normal node, I didn't get any exception.

Sorry. What is a "transport node"?

Sorry, my Mistake, I meant TransportClient. https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/transport-client.html

I think this should not work with:

  • Node Client
  • Transport Client

Even if it works for some simple cases, don't mix 1.x versions with 2.x versions. Definitely not supported.

Ok, thanks!