# Discourse Prometheus プラグインが bitnami/discourse:2.6.7 でエラーを発生させる

**URL:** https://meta.discourse.org/t/discourse-prometheus-plugin-throws-error-with-bitnami-discourse-2-6-7/197100
**Category:** Self-hosting
**Tags:** unsupported-install, prometheus
**Created:** [2021 年 7 月 14 日午前 10:34 UTC](https://meta.discourse.org/t/discourse-prometheus-plugin-throws-error-with-bitnami-discourse-2-6-7/197100 "2021-07-14T10:34:48Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![sonal\_jatav](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sonal_jatav/32/172403_2.png) [@sonal\_jatav](https://meta.discourse.org/u/sonal_jatav)
#### Post date: [2021 年 7 月 14 日午前 10:34 UTC](https://meta.discourse.org/t/discourse-prometheus-plugin-throws-error-with-bitnami-discourse-2-6-7/197100/1 "2021-07-14T10:34:48Z")

</div>

こんにちは

この問題を解決するための情報が見つからなかったため、徹底的に検索しました。  
以前から [bitnami/discourse](https://hub.docker.com/r/bitnami/discourse/) イメージ（AKS クラスターにデプロイ）と [discourse-prometheus](https://github.com/discourse/discourse-prometheus) プラグインを使用していました。  
最近、bitnami/discourse:2.6.7 へアップグレードしたところ、discourse-prometheus プラグインが機能しなくなり、ログには以下のようなエラーが表示されます。

```plaintext
App 539 output: Prometheus Exporter, failed to send message Connection refused - connect(2) for "localhost" port 9405 App 539 output: [2021-06-26 13:05:24.3855 539/0x00005605c6d15b38(Worker 1) utils.rb]: *** Exception Errno::ECONNREFUSED in Rack application object (Failed to open TCP connection to localhost:9405 (Connection refused - connect(2) for "localhost" port 9405)) (process 539, thread 0x00005605c6d15b38(Worker 1)): App 539 output: from /opt/bitnami/ruby/lib/ruby/2.6.0/net/http.rb:949:in `rescue in block in connect'

```

Prometheus では、ターゲットがダウンしており、エラー 502 Bad gateway が表示されています。  
ブラウザで /metrics にアクセスすると、「Incomplete response received from application」と表示されます。

---

<div class="post-metadata">

### Author: ![jontrossbach](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jontrossbach/32/215843_2.png) [@jontrossbach](https://meta.discourse.org/u/jontrossbach)
#### Post date: [2021 年 7 月 27 日午後 10:01 UTC](https://meta.discourse.org/t/discourse-prometheus-plugin-throws-error-with-bitnami-discourse-2-6-7/197100/2 "2021-07-27T22:01:19Z")

</div>

> [@sonal\_jatav](#):
>
> `Prometheus Exporter, failed to send message Connection refused - connect(2) for "localhost" port 9405`

私の Kubernetes クラスターでも、プラグインの最新 main ブランチと（投稿時点での）最新バージョンタグ `2.8.0.beta4` で設定した個人用 Discourse において、上記と同じエラーメッセージが発生しています。もし興味があれば、ローカル環境での再現手順を提供できます。

`stable` タグや `stable-branch` を使用すると、以下のようなシーケンスが出力されます：

```Dead
PID 927 の終了を試みています
Prometheus Exporter, failed to send message Connection refused - connect(2) for "localhost" port 9405
Dead worker 927 が検出されました。再起動中...

```
