Microservice can not reach Elasticsearch Image

Deadly 提交于 2019-12-12 23:22:31

问题


I have one Microservice with Jhipster version 5v and a image 2.4.1 of the ElasticSearch running in vagrant centos 7v. The two image are running but the operations of save and search can not reach the Elasticsearch image.

docker-compose:

service-app:
    image: "..."
    depends_on:
      - service-mysql
      - service-elasticsearch
      - kafka
      - zookeeper
      - jhipster-registry
    environment:
      - SPRING_PROFILES_ACTIVE=dev,swagger
      - SPRING_CLOUD_CONFIG_URI=http://admin:admin@jhipster-registry:8761/config
      - SPRING_DATASOURCE_URL=jdbc:mysql://service-mysql:3306/service?useUnicode=true&characterEncoding=utf8&useSSL=false
      - SPRING_DATA_CASSANDRA_CONTACTPOINTS=cassandra
      - JHIPSTER_SLEEP=30
      - JHIPSTER_LOGGING_LOGSTASH_HOST=jhipster-logstash
      - JHIPSTER_LOGGING_LOGSTASH_PORT=5000
      - SPRING_DATA_ELASTICSEARCH_CLUSTER-NAME=SERVICE
      - SPRING_DATA_ELASTICSEARCH_CLUSTER_NODES=service-elasticsearch:9300
      - SPRING_CLOUD_STREAM_KAFKA_BINDER_BROKERS=kafka
      - SPRING_CLOUD_STREAM_KAFKA_BINDER_ZK_NODES=zookeeper
      - EUREKA_CLIENT_SERVICEURL_DEFAULTZONE=http://admin:admin@jhipster-registry:8761/eureka
    ports:
      - 60088:8088
    logging:
      driver: "json-file"
      options:
        max-size: "100m"
        max-file: "10"

  service-elasticsearch:
    image: ...
    volumes:
      - service-elasticsearch:/usr/share/elasticsearch/data/
    environment:
      - network.host=0.0.0.0
      - cluster.name=service
      - discovery.type=single-node
      - CLUSTER_NAME=SERVICE
    logging:
      driver: "json-file"
      options:
        max-size: "100m" 
        max-file: "10"

application_dev.yml:

    data:
        elasticsearch:
            properties:
                path:
                    home: target/elasticsearch

application_prod:

    data:
        jest:
            uri: http://localhost:9200

domain:


回答1:


The issue is that one of your ES node in your cluster is running on low disk space, hence you are getting this exception.

Please make sure that you as clean up the disk space on the ES nodes on which you are getting the exception. I have faced this issue 2-3 times and it does not depend on the Elasticsearch index size, hence even you might have a very small index on large disk(let's suppose 2 TB) but if you don't have a free disk space more than 10% (which is almost 200 GB, which is huge) still you will get this exception and you need to clean up your disk space.



来源:https://stackoverflow.com/questions/56886551/microservice-can-not-reach-elasticsearch-image

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!