Elasticsearch version:
2.4.0
Plugins installed: [
carrot2/elasticsearch-carrot2: 2.4.0.1
]
JVM version:
1.8
OS version:
Ubuntu 14.04
Description of the problem including expected versus actual behavior:
When issuing a request via the Java API, the "proxy" is null: TransportProxyClient@55
You can find more information that I filled with the plugin provider, though this is a general elastic problem. Any insight would be great!
Provide logs (if relevant):
https://github.com/carrot2/elasticsearch-carrot2/issues/52
I figured out the problem.
I had to add the plugin to the TransportClient. Can someone tell me why I have to do this? Why doesn't the TransportClient know that the server has this plugin installed? When I look at the node info without the added the plugin, it's there. I am really confused.
return instance = TransportClient
.builder()
.addPlugin(ClusteringPlugin.class)
.settings(settings)
.build()
.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("localhost"), 9300));
Why doesn't the TransportClient know that the server has this plugin installed
42 - I mean how would that work we look at the server and then load a class dynamically? You have to install all plugins that you need on the client and the server. The plugin might contain transport protocol classes that you need to serialize / deserialize things so you need it on both ends.
Thanks! That makes sense. I just didn't have to do that in previous version of elasticsearch. I would think that the plugin would register itself. I'll talk with the plugin developer. Cheers!
The plugin registers itself if you run the full ES node (because ES scans for plugins and loads them), but not if you create a transport client from your code and then try to connect to a remote instance -- then you have to register the code that contain plugin's transport classes.
Most helpful comment
42 - I mean how would that work we look at the server and then load a class dynamically? You have to install all plugins that you need on the client and the server. The plugin might contain transport protocol classes that you need to serialize / deserialize things so you need it on both ends.