Elasticsearch 2.0 java client

Hello,

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, /10.0.2.15:36369 => example.com/153.65.234.45:9300]], closing connection
java.lang.NullPointerException
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?

Thanks!

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!