こんにちは。
DockerコンテナでDiscourseを実行しており、prometheus-exporterをインストールしました。Railsサーバーの起動にはbundle exec rails server -b 0.0.0.0を使用しており(/bin/unicorn/を使用しても同じエラーが発生します)、ポートマッピング9045:9045を指定し、ポート9045を公開しています。
Pumaのエラーログには、以下のエラーが表示されています。
Prometheus Exporter, failed to send message Cannot assign requested address - connect(2) for "localhost" port 9405
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)>
Discourseは通常、prometheus-exporterがポート9405でTCP接続を開けるように、Pumaに関して何か特別なことをしていますか?