ruvnet/ruflo · error
Invalid METRICS_PORT value: ${config.METRICS_PORT}
Error message
Invalid METRICS_PORT value: ${config.METRICS_PORT} What it means
Log warning in startStandaloneServer: config.METRICS_PORT does not parse to a valid integer port (0-65535), so the standalone Prometheus metrics HTTP server is not started.
Source
Thrown at ruflo/src/ruvocal/src/lib/server/metrics.ts:214
ageBuckets: 5,
}),
timeToChooseTools: new Summary<ModelLabel>({
name: "time_to_choose_tools_ms",
help: "Time spent selecting tools in milliseconds",
labelNames,
registers: [registry],
maxAgeSeconds: 5 * 60,
ageBuckets: 5,
}),
},
};
}
private startStandaloneServer() {
const port = Number(config.METRICS_PORT || "5565");
if (!Number.isInteger(port) || port < 0 || port > 65535) {
logger.warn(`Invalid METRICS_PORT value: ${config.METRICS_PORT}`);
return;
}
this.httpServer = createServer(async (req, res) => {
if (req.method !== "GET") {
res.statusCode = 405;
res.end("Method Not Allowed");
return;
}
try {
const payload = await this.render();
res.setHeader("Content-Type", "text/plain; version=0.0.4");
res.end(payload);
} catch (error) {
logger.error(error, "Failed to render metrics");
res.statusCode = 500;
res.end("Failed to render metrics");View on GitHub (pinned to fa13ee4ad6)
Solutions
- Set METRICS_PORT to a valid port number (1-65535) or unset it to use the default.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at ruflo/src/ruvocal/src/lib/server/metrics.ts:214 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18).
Data as JSON: /api/errors/2cdf9bfad084b171.
Report an issue: GitHub.