springboot es报错Caused by: java.net.ConnectException: Timeout connecting to [localhost/127.0.0.1:9200
报错原因localhost/127.0.0.1:9200es开放的端口,所以和es有关系解决方案spring默认会去监听本地127.0.0.1:9200,修改就好了。spring:elasticsearch:rest:uris: http://ip地址:9200还有中说法是es的健康监测机制时间太短,所以加长它的时间# actuatormanagement:endpoints:web:exposu
·
报错原因
localhost/127.0.0.1:9200es开放的端口,所以和es有关系
解决方案
spring默认会去监听本地127.0.0.1:9200,修改就好了。
spring:
elasticsearch:
rest:
uris: http://ip地址:9200
还有中说法是es的健康监测机制时间太短,所以加长它的时间
# actuator
management:
endpoints:
web:
exposure:
include: ['*']
health:
elasticsearch:
response-timeout: 3s
关闭健康监测,不建议
management:
health:
elasticsearch:
enabled: false
更多推荐
已为社区贡献1条内容
所有评论(0)