Open ActivePeter opened 5 months ago
would you please try to replace the es
below to the real ip?
gateway.metrics.exporter.es.host=192.168.31.87
metrics-server.spring.data.jest.uri=http://192.168.31.87:9200
would you please try to replace the
es
below to the real ip?gateway.metrics.exporter.es.host=192.168.31.87 metrics-server.spring.data.jest.uri=http://192.168.31.87:9200
It seems the problem is still there.
The es is available
It seems that 192.168.31.87
is the IP address of your computer, which currently isn't reachable from within the Docker container. There should be a network configuration that enables the Docker container to connect with the host.
The Docker Compose documentation suggests that the es
container ought to be accessible by the allinone
container using the hostname es
. This implies that there may be some configuration adjustments required to facilitate this connectivity.
I have used an bridge network now, and I use a curl container to test the es in domain and ip.
The curl results:
The curl script:
sleep 10
curl http://es:9200
curl http://192.168.31.87:9200
They are both reachable.
However, the lookout container is still not ok.
This is the new compose file
version: '3'
services:
test_es:
#curl
image: appropriate/curl
container_name: test_es
# command: ["curl", "http://es:9200"]
# multiple commands
volumes:
- ./curl.sh:/curl.sh
command: sh /curl.sh
depends_on:
- es
networks:
- my_network
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
networks:
my_network:
driver: bridge
- It seems that
192.168.31.87
is the IP address of your computer, which currently isn't reachable from within the Docker container. There should be a network configuration that enables the Docker container to connect with the host.- The Docker Compose documentation suggests that the
es
container ought to be accessible by theallinone
container using the hostnamees
. This implies that there may be some configuration adjustments required to facilitate this connectivity.
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
):