【发布时间】:2019-12-18 14:14:46
【问题描述】:
我正在使用 sping 启动应用程序,如果我使用本地弹性搜索,我可以连接,但如果我使用远程弹性搜索,我将无法连接。
spring:
data:
elasticsearch:
cluster-name: es_psc
cluster-nodes: 100.84.57.2:9300
如果我在浏览器中运行(http://100.84.57.2:9200/) 我可以看到详细信息
{
"name" : "i58Q9JC",
"cluster_name" : "es_psc",
"cluster_uuid" : "EKeTJwviQvWeTzbS1h1w4w",
"version" : {
"number" : "6.4.3",
"build_flavor" : "default",
"build_type" : "tar",
"build_hash" : "fe40335",
"build_date" : "2018-10-30T23:17:19.084789Z",
"build_snapshot" : false,
"lucene_version" : "7.4.0",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
},
"tagline" : "You Know, for Search"
}
但我运行我的 Spring Boot 应用程序,它给出以下错误:
Caused by: org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: [{#transport#-1}{6SiLGoTHTmmiuzBTvweb3A}{100.84.57.2}{100.84.57.2:9300}]
【问题讨论】:
标签: spring-boot elasticsearch remote-connection