Discourse Prometheus plugin throws error with bitnami/discourse:2.6.7


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”