# Filebeat docker installation connection refused

**URL:** <https://discuss.elastic.co/t/filebeat-docker-installation-connection-refused/215607>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [January 19, 2020, 7:33am UTC](https://discuss.elastic.co/t/filebeat-docker-installation-connection-refused/215607 "2020-01-19T07:33:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![NZHawk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nzhawk/32/46494_2.png) [@NZHawk](https://discuss.elastic.co/u/NZHawk)\
**Post date:** [January 19, 2020, 7:33am UTC](https://discuss.elastic.co/t/filebeat-docker-installation-connection-refused/215607/1 "2020-01-19T07:33:51Z")

</div>

So I've just embarked on the windy ELK road and as a training ground I thought I'd look into the ease of Docker deployments before I get under the hood and drill down on config specifics. I've installed an ELK docker stack and it works fine.

The trouble I'm having is when I come to install filebeats I get a connection refused. I'm clearly needing to pass the username elastic and default password "changeme" to the docker run setup but for the life of me I can't seem to get this parsed:

root@elk:/home/elk# docker run [docker.elastic.co/beats/filebeat:7.5.1](http://docker.elastic.co/beats/filebeat:7.5.1) setup -E setup.kibana.host=0.0.0.0:5601 -E output.elasticsearch.hosts=["0.0.0.0:9200"] username="elastic" password="changeme" -v

Exiting: Couldn't connect to any of the configured Elasticsearch hosts. Errors: [Error connection to Elasticsearch [http://0.0.0.0:9200](http://0.0.0.0:9200): Get [http://0.0.0.0:9200](http://0.0.0.0:9200): dial tcp 0.0.0.0:9200: connect: connection refused]

If anyone could give me a pointer I'd be most appreciative. I'm sure the answer is staring me in the face but I've gone a little blind.

---

<div class="post-metadata">

**Author:** ![Miyam0t0](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@Miyam0t0](https://discuss.elastic.co/u/Miyam0t0)\
**Post date:** [January 19, 2020, 3:53pm UTC](https://discuss.elastic.co/t/filebeat-docker-installation-connection-refused/215607/2 "2020-01-19T15:53:09Z")

</div>

I'm on the same journey and had the same problem. I'm using CentOS 7. My issue was my host firewall was refusing connections. I added the following rule to the firewall. Note that 172.17.0.0/16 is the default docker network.

rule family="ipv4" source address="172.17.0.0/16" service name="docker" log level="info" audit accept

I reloaded the firewall and successfully installed Filebeat!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 16, 2020, 3:53pm UTC](https://discuss.elastic.co/t/filebeat-docker-installation-connection-refused/215607/3 "2020-02-16T15:53:12Z")

</div>

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