Linux+spring boot+elasticsearch+Kibana,上线部署连接es报节点错误怎么办?
爱情尘埃 2019-05-05 01:45:25 spring boot中配置如下:
spring.data.elasticsearch.cluster-nodes=ip:9300
spring.data.elasticsearch.cluster-name=elasticsearch
es文件的yml配置如下:
http.port: 9200
http.cors.enabled: true
http.cors.allow-origin: "*"
network.host: 0.0.0.0,可是它一直就报节点连接错误:
org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: [{#transport#-1}{C426DCizScqpa2ZglWdLiQ}{39.98.51.64}{39.98.51.64:9300}]
会不会是因为版本原因呢,我使用的是es6.7.1,但是pom中导入了
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>6.4.3</version>
</dependency>
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-high-level-client</artifactId>
<version>6.4.3</version>
</dependency>
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>transport</artifactId>
<version>6.4.3</version>
</dependency>
之前我用了spring boot+elasticsearch+head做了 这么做一点问题都没有,但是加了Linux就完了,无论怎么样总是报节点连接错误!