Elasticsearch Health Check Failed
今天在使用Elasticsearch的时候,突然报了一个错误信息
1 2
| s.b.a.e.ElasticsearchRestHealthIndicator : Elasticsearch health check failed Caused by: java.net.ConnectException: Connection refused
|
这个信息在之前都没有跳出来过,刚修改了yml配置文件之后启动就报错了,难道是配置问题?看一下当前的配置文件es模块
1 2 3 4 5 6 7
| spring: data: elasticsearch: cluster-nodes: http://106.14.205.212:9300 elasticsearch: rest: uris: ["http://106.14.205.212:9200"]
|
看到这就知道了,原来spring.elasticsearch这个标签被写到了spring.data下面,然后在启动的时候没有读取到配置信息,所以报错。
将配置信息修改一下即可
1 2 3 4 5 6 7
| spring: data: elasticsearch: cluster-nodes: http://106.14.205.212:9300 elasticsearch: rest: uris: ["http://106.14.205.212:9200"]
|