diff --git a/sn_networking/src/metrics_service.rs b/sn_networking/src/metrics_service.rs index f5ee44f143..5da6fc7a41 100644 --- a/sn_networking/src/metrics_service.rs +++ b/sn_networking/src/metrics_service.rs @@ -19,8 +19,8 @@ use std::{ const METRICS_CONTENT_TYPE: &str = "application/openmetrics-text;charset=utf-8;version=1.0.0"; pub(crate) fn run_metrics_server(registry: Registry) { - // Serve on localhost. - let addr = ([127, 0, 0, 1], 0).into(); + // The server should not bind to localhost/127.0.0.1 as it will not accept connections from containers. + let addr = ([0, 0, 0, 0], 0).into(); tokio::spawn(async move { let server = Server::bind(&addr).serve(MakeMetricService::new(registry));