你好,
我进行了彻底的搜索,但未能找到解决此问题的方法。
我一直使用 discourse-prometheus 插件配合 bitnami/discourse 镜像(部署在 AKS 集群上)有一段时间了。
在近期升级到 bitnami/discourse:2.6.7 后,我发现 discourse-prometheus 插件无法正常工作,日志显示如下:
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,会显示“从应用程序接收到的响应不完整”。