We have a java client(1.3) that talks to elasticsearch(1.3) in our application.
try {
((TransportClient) this.client).addTransportAddress(
new InetSocketTransportAddress(InetAddress.getByName("local"), 9300));
} catch (UnknownHostException e) {
LOGGER.error(e.getMessage(),e);
}
and our elasticsearch.yml file content is :
cluster.name: 'elasticsearch'
node.name: 'localhost'
path.data: /home/vagrant/elasticsearch/data
path.logs: /home/vagrant/elasticsearch/logs
network.host: 0.0.0.0
transport.tcp.port: 9300
http.port: 9200
indices.query.bool.max_clause_count: 10240
The Java client was able to talk to Elasticsearch and perform the requested operation. All fine till here
We migrated to Elasticsearch 5.5 and now the java client looks like :
public TransportClient getTransportClient() {
TransportClient client = new PreBuiltTransportClient(Settings.EMPTY);
return client;
}
try {
((TransportClient) this.client).addTransportAddress(
new InetSocketTransportAddress(InetAddress.getByName("local"), 9300));
} catch (UnknownHostException e) {
LOGGER.error(e.getMessage(),e);
}
and our elasticsearch.yml looks like the same as 1.3 except for the cluster name.
We changed the cluster.name to elasticsearch-cluster.
Now the java client is not able to talk to elasticsearch.
we get "no node avaliable exception".
Can someone please suggest, as to, what we need to modify here ?
Regards,
Maney