Open seihtam opened 5 years ago
If I understand this correctly, this was fixed when you added: --network="host"
?
I could be that things have changed with the :new: docker that was just released?
Yes that is correct. From my host OS curl http://localhost:9200/
returned elasticsearch information and to confirm that the engine docker couldn't connect to elasticsearch i opened a shell inside that container and ran wget http://localhost:9200/
which resulted in connection refused.
So i attempted giving the engine docker access to the "host" network and that fixed the problem. Though this is a workaround since I would rather not give the docker container access to the "host" network.
So docker shouldn't talk to elasticsearch on localhost it should talk to it on http://elasticsearch:9200 because it is linked into the container with --link
?
I'll try this in docker as well and check.
Yes that makes sense. By the way I will follow up on all the other issues i opened this Thursday. Thanks for the quick responses :)
I forgot to mention this, but it doesn't change anything about the way the issue should be fixed. For the workaround to work the elk stack will also have to be started with --network="host"
:
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock --network="host" malice/engine elk
I got same problem,add --network="host", it work as expected
I'll add this to the docs in the README thank you!
The engine container is not able to connect to the elasticsearch container. I confirmed that the problem was not any of the bugs described in https://github.com/maliceio/malice/blob/master/docs/KnownBugs.md.
Connecting to elasticsearch from my host OS works:
Following command fails with
connect: connection refused
:As a workaround adding
--network="host"
to the command above makes it work as expected.Docker version:
Docker info (with some info removed):