Discourse Prometheus plugin throws error with bitnami/discourse:2.6.7

Hi

I did a thorough search although did not find anything to resolve this issue.
I have been using discourse-prometheus plugin with bitnami/discourse image(deployed on an AKS cluster) since a while.
Post the recent upgrade to bitnami/discourse:2.6.7 i see that discourse-prometheus plugin is not working and the logs show

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 shows target is down with error 502 Bad gateway error.
If /metrics is hit in the browser it shows “Incomplete response received from application”

2 Likes

I’m getting the above same error message on my Kubernetes cluster with my personal Discourse set up on the latest main branch of the plugin and the (as of this post) latest 2.8.0.beta4 version tag. I can provide steps to reproduce this locally if anyone is interested.

If I use the stable tag or the stable-branch I get something similar to the following sequence:

Attempting to kill pid 927
Prometheus Exporter, failed to send message Connection refused - connect(2) for "localhost" port 9405
Detected dead worker 927, restarting...
1 Like