Describe the bug
Start the docker service failed as https://www.sofastack.tech/projects/sofa-lookout/quick-start-metrics-server/
Expected behavior
No error in log.
Actual behavior
Reaching the inner ip of the container, but es is run as another container.
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'selfMetricsStarter': Unsatisfied dependency expressed through field 'exportChainManager'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'exportManager' defined in class path resource [com/alipay/sofa/lookout/gateway/metrics/starter/MetricPipelineConfiguration.class]: Unsatisfied dependency expressed through method 'exportManager' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'esMetricsExportChain' defined in class path resource [com/alipay/sofa/lookout/gateway/metrics/exporter/es/spring/bean/config/EsExporterConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.alipay.sofa.lookout.gateway.core.prototype.exporter.chain.ExportChain]: Factory method 'esMetricsExportChain' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'esMetricsExporter' defined in class path resource [com/alipay/sofa/lookout/gateway/metrics/exporter/es/spring/bean/config/EsExporterConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.alipay.sofa.lookout.gateway.metrics.exporter.es.ESMetricExporter]: Factory method 'esMetricsExporter' threw exception; nested exception is java.lang.IllegalStateException: java.net.ConnectException: Failed to connect to es/172.19.0.2:9200
Steps to reproduce
docker-compose.yml
version: '3'
services:
allinone:
image: xzchaoo/lookout-allinone:1.6.0-SNAPSHOT
container_name: allinone
ports:
- "7200:7200"
- "9090:9090"
volumes:
- ./foo.properties:/home/admin/deploy/foo.properties
environment:
- JAVA_OPTS=-Dlookoutall.config-file=/home/admin/deploy/foo.properties
# 如果您需要添加其他 JVM 系统属性,您可以通过在此处指定多个 JAVA_OPTS 环境变量来实现
depends_on:
- es
# networks:
# - my_network
es:
image: elasticsearch:5.6
container_name: es
ports:
- "9200:9200"
- "9300:9300"
environment:
- "discovery.type=single-node"
# networks:
# - my_network
foo.properties (replace the ip)
gateway.metrics.exporter.es.host=es
metrics-server.spring.data.jest.uri=http://192.168.31.87:9200
docker-compose up -d
Environment
- SOFALookout version: Docker image: xzchaoo/lookout-allinone:1.6.0-SNAPSHOT
- JVM version (e.g.
java -version):
- OS version Ubuntu 20
- Maven version:
- IDE version:
Describe the bug
Start the docker service failed as https://www.sofastack.tech/projects/sofa-lookout/quick-start-metrics-server/
Expected behavior
No error in log.
Actual behavior
Reaching the inner ip of the container, but es is run as another container.
Steps to reproduce
docker-compose.yml
foo.properties (replace the ip)
docker-compose up -d
Environment
java -version):