Java node client missing license plugin

Hello,

I'm testing elasticsearch 2.2.0 and I am unable to add a java client node to a cluster. The following message is logged when the java client tries to join the cluster:

INFO: [java-client] failed to send join request to master [{local}{XdRAgfRYTzOIQY_S1SXs7w}{127.0.0.1}{127.0.0.1:9300}], reason [RemoteTransportException[[local][127.0.0.1:9300][internal:discovery/zen/join]]; nested: IllegalStateException[failure when sending a validation request to node]; nested: RemoteTransportException[[java-client][127.0.0.1:9301][internal:discovery/zen/join/validate]]; nested: IllegalArgumentException[No custom metadata nprototype registered for type [licenses], node like missing plugins]; ]

If I remove the license plugin from the master node the java client is able to join.

My java client is configured as follows:

protected Client node = NodeBuilder.nodeBuilder().settings(Settings.settingsBuilder()
                .put("cluster.name", "dev")
                .put("node.name", "java-client")
                .put("path.home", "/tmp")
                .put("http.enabled", "false")
                .put("node.client", "true")
                .put("node.data", "false"))
        .node().client();

I have the following Maven dependencies:

<dependency>
    <groupId>org.elasticsearch</groupId>
    <artifactId>elasticsearch</artifactId>
    <version>2.2.0</version>
</dependency>
<dependency>
    <groupId>org.elasticsearch.plugin</groupId>
    <artifactId>license</artifactId>
    <version>2.2.0</version>
</dependency>

Is there something I need to do to load the licensing plugin?

Thanks for your help!

This might help: Add plugins from classpath in embedded Elasticsearch client node

Note that we are probably going to recommend not using the Node Client anymore. See:

Thanks for the response, this is very helpful.

Two follow up questions:

  1. would you expect a measurable performance difference between a Node client and this new recommendation (local elasticsearch + transport client)?
  2. is the Node client builder going to be removed entirely in a future release or just not recommended?
  1. Not noticeable difference as the Node and the TransportClient will be running on the same physical machine, so no network hop.

  2. I don't know ATM. I expect that a new HTTP / Rest client will replace the Java Transport one. Well, it has been announced yesterday at elasticon.