fix(scadabridge): default MetricsPort to 8084 (avoid site RemotingPort collision) + validate port distinctness

This commit is contained in:
Joseph Doherty
2026-06-01 16:46:59 -04:00
parent fe25ac3e51
commit c41cb41c7b
11 changed files with 139 additions and 11 deletions
+5 -3
View File
@@ -293,10 +293,12 @@ try
// Read GrpcPort from config (NodeOptions already has default 8083)
var grpcPort = configuration.GetValue<int>("ScadaBridge:Node:GrpcPort", 8083);
// Read MetricsPort from config (NodeOptions already has default 8082).
// Read MetricsPort from config (NodeOptions already has default 8084).
// Separate HTTP/1.1 listener so a standard HTTP/1.1 Prometheus scraper can
// reach /metrics; the gRPC port stays HTTP/2-only below.
var metricsPort = configuration.GetValue<int>("ScadaBridge:Node:MetricsPort", 8082);
// reach /metrics; the gRPC port stays HTTP/2-only below. The default is
// 8084 — distinct from RemotingPort (8082, Akka) and GrpcPort (8083) so the
// metrics listener never collides with the Akka remoting port on site nodes.
var metricsPort = configuration.GetValue<int>("ScadaBridge:Node:MetricsPort", 8084);
// Configure Kestrel for HTTP/2 only on the gRPC port
builder.WebHost.ConfigureKestrel(options =>