gpt4 book ai didi

elasticsearch - Spring Boot Elasticsearch 不起作用

转载 作者:行者123 更新时间:2023-12-02 23:26:05 26 4
gpt4 key购买 nike

在 Spring 启动项目中。

gradle:

dependencies {
compile('org.springframework.boot:spring-boot-starter-data-elasticsearch')
compile('io.searchbox:jest:2.0.3')
runtime('net.java.dev.jna:jna')
}

config.yml:
spring:
data:
elasticsearch:
cluster-nodes: 10.19.132.207:9300
cluster-name: es
elasticsearch:
jest:
uris: http://10.19.132.207:9200
read-timeout: 10000

和我的ES配置:
cluster.name: es
node.name: node-1
network.host: 0.0.0.0
transport.tcp.port: 9300
http.port: 9200

当我想将数据保存到es时。控制台打印:
Caused by: org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: [{#transport#-1}{10.19.132.207}{10.19.132.207:9300}]
at org.elasticsearch.client.transport.TransportClientNodesService.ensureNodesAreAvailable(TransportClientNodesService.java:326) ~[elasticsearch-2.4.4.jar:2.4.4]
at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:223) ~[elasticsearch-2.4.4.jar:2.4.4]
at org.elasticsearch.client.transport.support.TransportProxyClient.execute(TransportProxyClient.java:55) ~[elasticsearch-2.4.4.jar:2.4.4]

和我的ES打印日志:
java.lang.IllegalStateException: Received message from unsupported version: [2.0.0] minimal compatible version is: [5.0.0]
at org.elasticsearch.transport.TcpTransport.messageReceived(TcpTransport.java:1323) ~[elasticsearch-5.2.2.jar:5.2.2]
at org.elasticsearch.transport.netty4.Netty4MessageChannelHandler.channelRead(Netty4MessageChannelHandler.java:74) ~[transport-netty4-5.2.2.jar:5.2.2]

我该如何解决这个问题?

最佳答案

乍一看,似乎“spring-boot-starter-data-elasticsearch”和“jest 2.0.3”都不支持Elasticsearch5。我尝试将您的Elasticsearch实例降级为2.4.4,看看是否可行。

关于elasticsearch - Spring Boot Elasticsearch 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42942186/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com