Closed abovegrd closed 5 years ago
So when running in Docker, the 127.0.0.1 is specific to that container, and can't be used to connect to services running on the host machine, or in other containers.
The way this is usually done with Docker is to reference the other container by name... If Elastic Search is also running in Docker, give that container a name, say elasticsearch
. You can then link the container:
docker run --link elasticsearch ...
Then use a URL like http://elasticsearch:9200
.
If Elastic Search is running on the host OS, you might be able to get the IP address of the docker0 interface, use that IP address in the Elastic Search URL.
Ultimately this is a Docker configuration issue and not EveBox.
@jasonish thank you very much. i will try this.
Closing as this is a support issue. Re-open if needed.
environment: os: ubuntu16.04 x64 version: EveBox latest (0.10.2) use docker to install evebox elasticsearch: 6.3.2
the elasticsearch and evebox are deployed on the same server, with IP address: 192.168.198.26/24.
the elasticsearch is running ok:
but when the evebbox starts, it cannot connect to elasticsearch. the error message is : (server.go:350) -- Failed to ping Elastic Search, delaying startup: : Get http://localhost:9200/: dial tcp 127.0.0.1:9200: connect: connection refused
but when i change the '127.0.0.1:9200' to '192.168.198.26:9200', the evebox runs successfully.
I don't known why it can't use the 127.0.0.1, because we can't configure the ip address by the hard code ways.