# Enabling prometheus-exporter plugin with Discourse Docker instance

**URL:** https://meta.discourse.org/t/enabling-prometheus-exporter-plugin-with-discourse-docker-instance/235673
**Category:** Self-hosting
**Tags:** unsupported-install
**Created:** [August 10, 2022, 12:34am UTC](https://meta.discourse.org/t/enabling-prometheus-exporter-plugin-with-discourse-docker-instance/235673 "2022-08-10T00:34:21Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Martin\_Lim](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/martin_lim/32/246473_2.png) [@Martin\_Lim](https://meta.discourse.org/u/Martin_Lim)
#### Post date: [August 10, 2022, 12:34am UTC](https://meta.discourse.org/t/enabling-prometheus-exporter-plugin-with-discourse-docker-instance/235673/1 "2022-08-10T00:34:21Z")

</div>

Hello,

I have an instance of Discourse running in a Docker container with the prometheus-exporter installed. We are using `bundle exec rails server -b 0.0.0.0` to start the rails server (using /bin/unicorn/ gives the same error) and have specified the port mapping `9045:9045` and exposed port 9045.

The puma error logs show the following errors:

```plaintext
Prometheus Exporter, failed to send message Cannot assign requested address - connect(2) for "localhost" port 9405

```

```plaintext
2022-08-09 22:48:25 +0000 Rack app ("GET /metrics" - (172.22.0.1)): #<Errno::EADDRNOTAVAIL: Failed to open TCP connection to localhost:9405 (Cannot assign requested address - connect(2) for "localhost" port 9405)>

```

Is there something special Discourse normally does with puma to ensure that the prometheus-exporter can open a TCP connection on port 9405?

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [August 10, 2022, 1:39am UTC](https://meta.discourse.org/t/enabling-prometheus-exporter-plugin-with-discourse-docker-instance/235673/2 "2022-08-10T01:39:21Z")

</div>

> [@Martin\_Lim](#):
>
> Is there something special Discourse normally does with puma to ensure that the prometheus-exporter can open a TCP connection on port 9405?

If you install Discourse following the [official install](https://meta.discourse.org/t/142537?silent=true) guide it won’t use Puma, but Unicorn. All our plugins and themes assume an install that follows the [official install](https://meta.discourse.org/t/142537?silent=true).
