微服务无法到达Elasticsearch图像 [英] Microservice can not reach Elasticsearch Image
问题描述
我有一个带有Jhipster版本5v的微服务,以及在无所事事的centos 7v中运行的ElasticSearch映像2.4.1.这两个映像正在运行,但是保存和搜索操作无法到达Elasticsearch映像.
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:
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:
application_dev.yml:
data:
elasticsearch:
properties:
path:
home: target/elasticsearch
application_prod:
application_prod:
data:
jest:
uri: http://localhost:9200
域:
推荐答案
The issue is that one of your ES node in your cluster is running on low disk space, hence you are getting this exception.
请确保您清理了要在其上获得异常的ES节点上的磁盘空间.我已经遇到过2-3次此问题,并且它不取决于Elasticsearch索引大小,因此即使您在大磁盘上可能有一个很小的索引(假设为2 TB),但是如果您不这样做,如果可用磁盘空间超过10%(将近200 GB,这是巨大的),您仍然会遇到此异常,因此需要清理磁盘空间.
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.
这篇关于微服务无法到达Elasticsearch图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!