Hi all,
I used spring boot 1.5.3 REALESE, i try to connect to elasticsearch 5.2.1 but get error.
My config:
` @Configuration
@EnableElasticsearchRepositories(basePackages = "com.elasticsearch")
@PropertySource("classpath:config/${spring.profiles.active}/database.properties")
public class ElasticsearchConfiguration {
@Value("${spring.data.elasticsearch.cluster}")
private String clusterName;
@Value("${spring.data.elasticsearch.host}")
private String esHost;
@Value("${spring.data.elasticsearch.port}")
private String esPort;
@Bean
public ElasticsearchTemplate elasticsearchTemplate() throws UnknownHostException {
Settings settings = Settings.settingsBuilder()
.put("cluster.name", clusterName).build();
TransportClient client = TransportClient.builder().settings(settings).build()
.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(esHost), Integer.parseInt(esPort)));
return new ElasticsearchTemplate(client);
}
}`
but get error message:
2017-04-25 14:49:57.016 INFO 1586 --- [ main] org.elasticsearch.client.transport : [Star-Dancer] failed to get node info for {#transport#-1}{172.16.8.70}{172.16.8.70:9301}, disconnecting...
org.elasticsearch.transport.NodeDisconnectedException: [][172.16.8.70:9301]
[cluster:monitor/nodes/liveness] disconnected
Could you tell me how can i fixed it? Thanks all :)
Hi all, I used spring boot 1.5.3 REALESE, i try to connect to elasticsearch 5.2.1 but get error. My config: ` @Configuration @EnableElasticsearchRepositories(basePackages = "com.elasticsearch") @PropertySource("classpath:config/${spring.profiles.active}/database.properties")
}` but get error message:
Could you tell me how can i fixed it? Thanks all :)