Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elasticsearch health check failed: Connection refused #134

Open
kanzihuang opened this issue Apr 23, 2023 · 0 comments
Open

Elasticsearch health check failed: Connection refused #134

kanzihuang opened this issue Apr 23, 2023 · 0 comments

Comments

@kanzihuang
Copy link

kanzihuang commented Apr 23, 2023

问题:

Elasticsearch health check failed:Connection refused

日志:

@timestamp:
    Apr 23, 2023 @ 12:40:41.529
@version:
    1
class:
    org.springframework.boot.actuate.elasticsearch.ElasticsearchRestHealthIndicator
host:
    172.19.0.1
level:
    WARN
message:
    Elasticsearch health check failed
pid:
    1
port:
    50,204
project:
    mall-swarm
service:
    mall-search
stack_trace:
    java.net.ConnectException: Connection refused

解决办法:

  1. 打开 nacos->配置管理->配置列表 页面,进入 mall-search-prod.yaml 编辑配置页面

  2. 将以下配置

spring:
  elasticsearch:
    uris: es:9200

修改为:

spring:
  elasticsearch:
    rest:
      uris: es:9200
  1. 然后重新 docker 服务:docker restart mall-search
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant