Filebeat in a docker container

Dear community,
I have a server on openstack. This target I can reach from everywhere else beside from inside the filebeat docker on my laptop.

If I make an ip add on my laptop I get a bunch of IPs. All these IPs I can reach from inside the conainer. A ping to the target from inside the filebeat container is not possible - but possible from my laptop where the container runs.
That is why I get this error:
2021-02-19T13:28:42.177Z ERROR [publisher_pipeline_output] pipeline/output.go:155 Failed to connect to backoff(async(tcp:// dial tcp i/o timeout
2021-02-19T13:28:42.178Z INFO [publisher_pipeline_output] pipeline/output.go:146 Attempting to reconnect to backoff(async(tcp:// with 8 reconnect attempt(s)
Do you perhaps know how I can start the dock container / do so that it also finds / reach the target Ip? I do not understand the reason for this behaviour
Thank you and kind regards

Hey @smm,

This is more a question about networking :slightly_smiling_face:

Do you access to this server on OpenStack through some VPN?

Can filebeat access the server if you run it on the host network (with --net=host)?

Take a look to this question in stack overflow, it may be the a similar thing: networking - Docker container and host network VPN - Stack Overflow

Hi jsoriano,
thanks for the input.
I found the solution I would like to share now:

docker run
--net host
--volume="/var/run/docker.sock:/var/run/docker.sock:ro" filebeat -e -strict.perms=false
Running on latets linux mint.
The --net host made the difference!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.